Refactored much of the main game code into its own functional state