Small cleanups 3

I've made small independent commits. You should be able to just look at the commits to see what has changed.