pep8 convention

Broke some lines over 80 columns, fixed indentations mixed spaces and tabs.
And also fixed unexpected not-indented line bug.