Starting on Py3 compatibility
Should mostly fix Py3