Refactoring automator factory