Move Template transformation to the code transformer