refactor main classes, add tests for GameThread and RoomController