Mostly updates for Python 3