Made some corrections to functions_migration.R