refactoring MigrationController and AmberMigrationService.