Refactored RoomFactory for better readability and functionality