Fix PEP8 errors

This big patch should fix the overall PEP8 errors in the code