Cleaned up game logic