Tons of CS fixes all over the place

(Remaining are mostly missing docs, and a few "line too long" errors)

Note that the comments add @cellog everywhere, as a "default" author so to speak (i.e. all pre-existing ones are preserved; he's added when there's no author information).
Namespace change?