Documentation fixes

A stash of some documentation updates I had collected during the last two weeks. Since release 3.0.4 is on it's way, it looked like a nice moment to push this.

It also includes some code changes, but that's only whitespace fixes.