More linting.
More linting and refactorings mainly in _transformation.py.