Pep8 C0330 and C0111 compliance

These commits fix the indentation and the format of variable, method, etc names to achieve C0330 and C0111 compliance (see ticket #706)

I did these changes carefully and ran the test-suite afterwards. There should be no more failed tests than there were before. If these changes break something that was working before, please let me know and I will fix it.