Added base engine code