Python2-3 and Pep8

More fixes towards supporting Python 2.7 and 3.4.
Mostly Pep8 compliant except long lines