Assorted suggestions

Some changes that I think are almost entirely reasonable. The tests still pass, so I clearly didn't break anything.

If you don't want to cherry pick the changes that you like, let me know what to do differently and I'll update.
Done.