cleaned up the general structure of the game