Additional mostly-trivial cleanup

Cleaning up some of the mess here. Commit messages hopefully make clear what I'm doing: do ask if something isn't clear enough.