remove debug function; rename error event to err

also restructure Rooms object