Python 3 stuff

A few things that break in Python 3. Won't affect functionality for Python 2 at all, although makes Python 3.4 work.