Py3k compatibility + test coverage