Support changing location parent in importer

and a bit of cleanup and some tests

can read commit by commit