Added migrateAccounts function and usage example