Refactored the engine parts to a sub folder