Some cleanup

Aesthetics and consistency fixes, except 2873f52, which fixes a typo in code.