docstrings and pep8 improvements