py3 compat & import statement clean up