Refactoring GameEngine run method.