fix docstring typos and pep8 issues