Refactoring for new engine design