Importer refactor

Merge of first round of importer refactorings with @motasem-salem work effectively merging #140 and #149.
I would prefer for the deleted lines to be commented out instead so that we don't forget to revert them when possible.