A number of pedantic changes

See the commit messages