Overhaul importer structure and use graphite library