Omnibus pull request

This contains all my recent pull requests in one test-passing, clean-building, properly merged set. You may want to look at those PRs to see what I was doing but just merge this one as they sort of go together.