Various minor bug fixes and documentation upgrades.