Basic Python 3 port (2to3); untested yet.
Runtime Python 3.3 compatibility and flake8 happyness. May still produce corner-cases errors as there are no unit-tests and I couldn't check everything manually.