Minor bugfixes and documentation edits.