cleaned up game state code