Minor py3 / flake8 tweaks