Migrator refactor