Made some aesthetic changes suggested by pylint.