Make code pep8 compliant

[pep8](http://legacy.python.org/dev/peps/pep-0008/) compliant now. The pep8 [package](https://pypi.python.org/pypi/pep8) has also been added to `requirements.txt` for future use.