Ready for python3 and python2
Flake 8 fixes