some more cleaning of the game loop