A whole bunch of stuff

I am sloppy and made lots of disrelated changes without separate
commits.