Using TH to generate embedded templates