Python 3 compatibility work

A set of work that addresses python 3 changes for this library from basic Python 2to3 changes to more advanced and nuanced changes. Please review carefully.
If python 2.6 will need to stay supported ```from future import print_function``` will need to be added to this file. See [PEP 3105](http://legacy.python.org/dev/peps/pep-3105/)