Refactoring importing script