More documentation. Minor code fixups.