Began to extract game logic from the GUI