Cleaned up game loop.