refactorings in engines