Fix some pep8 issues and some docstrings