Change a few things to be Python 3 compliant