Lots of documentation and minor changes.