Renamed some functions in engine.