Fixed a bunch of PEP8 style errors

Although it's not a complete, I ran the pep8 and pylint tools to quickly get a list of the main pep8 style errors and fixed them.