Minor refactoring

I’m working my way through Writing Idiomatic Python so I’m refactoring
this project.