Refactored importer so that it is easier to scale