refactored and made RoomManager. Still need to do more refactoring