Clean up code, add more tests to importer (and make it work!)

:smile_cat: