lots of documentation changes, and some small source changes