Minor clean ups

Fixing some minor issues found with pylint.  I've done them in separate commits in case you don't want all ofg the fixes.  Feel free to squash if necessary.

This is actually a functional change, I want to confirm that it doesn't break anything.