Ironed out some bugs with the main game mode control flow.