python 3 fixes and then some