Some slight optimization of surface.py.
Automatic Py3k merge for testing