Fixed all issues showed by flake8

I used flake8 to check what were different from pep8 recommendations and fixed it.