Major cleanup for import tests