Fixed most PEP-8 errors

The only ones remaining are line length ones. Some of these may potentially be controversial.