fixup! Lots of cleanup. Tests, comments, dead code removal