Fix various warnings, mostly indentation, reported by flake8.