Cosmetic fixes, mainly to shut up pylint.