Added the ability to use transform.

Not suficiently tested, ugly way to pass the settings around, but it
should prove the formula validity.