Py3k fixes

Everybody loves Python 3