syntax and import fixes for py3 - more work need for unicode