Minor py3k and pep8 fixes