Cleanup and fixes
Bunch of stuff I did last night and forgot to commit

(Left window open, just noticed it, forgot to commit cause I was tired)

This fixes a bunch of stuff. All tests (except dependents, which I also
could not get working on old code) pass.

Still have work I need/want to do to this before it is production ready,
but very good progress.