Refactoring: get rid of the engine package