Separated EngineState into a different file