pep8 fixes

Syntax fixes. I replaced tabs with 4 spaces project wide and clear some unneeded whitespaces.

I know that this is kind of intrusive commit, so I understand if you are reluctant to merge it :)