Added several functions to the engine class