Various documentation improvements.

Also removes some dead or obviously unecessary code.

Since this essentially is only about documentation, I am going to merge this without proper review.