Cleaned up code for pause during the game.