Fix issues raised by lint and tox