Some cleanup

A slight grab-bag here, but small changes and all atomic commits.