Engine refactoring.