Made docstrings and indentation PEP8 compliant. Fixed a few typos.