fix tests
misc cosmetic tweaks
more TODOs