pep8
Simplify code following code review.
Merge pull request #1627 from nouiz/cleanup

Cleanup