clean output
Py3 compat fixes