Add TemplateMerger class with fields member and merge() function