Py3: Python3 compatibility and other minor issues.
Py3: Run 2to3 on examples.