Refactoring the Migrator