Issue #227: Clean up pep8 and pyflakes (and @seancribbs) warnings