software improvements suggested by pylint