Misc minor fixes

In this PR are a number of improvements that I made; I grouped them because I don't think any of them should be too controversial, rather than because they were topically linked.