Fix some doc strings and add comments.