Python 3 support

Quick pass with 2to3