Correct bugs in importer
Fix tests
Improve testing