Some minor fixes discovered with PyLint