Fixed various minor problems reported by pylint.