Dual Py2/Py3 Compat

Hello, this passes the testsuite on both Py2 and Py3 without having to go through the 2to3 fixers. I also migrated tabs to spaces.