implemented templates for compiling TotalFinder beast