python3 compatibility edits

I ran the 2to3 utility and all the tests passed in both python3 and python2.  Too easy.