Start of engine refactoring