Refactored. Added game modes and scenes.