minor code and docs edits