mapff - tentative
cleanup
more cleanup + unit test fixes
more unit tests