pep8 and pyflakes applied

I didn't do anything with line length yet.
I prefer `and` on the beginning of a new line. It may more clear to find it's and/or of condition. What's your opinion?