DOC: documentation and styling

Minor documentation additions and style changes. Also fixes some trivial
bugs.