Improved replacement functionality in the base transformation assistant
Updated the union type transformation to use the new functionality in the base transformaton assistant
Additional improvements in the transformation classes such that they use the new replacement functionality