WIP: move migrate_data into new class