Python3 fixes, more tests.