Clean pyflakes warnings

This is the code for https://bugs.launchpad.net/pyflakes/+bug/1311145

I used __all__ to silence the linter and included the pyflakes check into travis and tox suite.

Thanks!