turn the importer code into python-style classes