Minor Pythonic changes