Lots of work on Py3 compat

Argh! Damned bytes vs str issues...