Improve the engine to support GameEngine