Cleaned up import_merge().