Refactored data migration.