pep8 and docstrings -- still need to fix temporary directories and dedupe code