PEP 8 corrections and adding several docstrings