made TransformSession a TextTransformationContext and added lots of additional helper methods to let it be used directly from templates