More doc work

Here is the end of the doc-work branch I've been working on. Not sure how it works since half of this branch has already been merged and then I added more commits. Hopefully it's easy to merge again.