Fix most PEP-8 issues

Hi.

I've fixed most of the PEP-8 issues I could find. The code (apart from tests) is now PEP-8 clean as reported by flake8. Tests still pass (tested 2.7 and 3.4). I'd be grateful if you'd merge that in. I plan on making some additional changes (new features) that I need for my project and this would help me a lot to share those back to you.

Best regards
ZK