Added a transform-diff function.