Setup the initial framework. Mainly added the state management for the game.