Restructured the engine