Change read_lump function; also add read_userstate and write_userstate.