Refactored engine structure.