Update for building templates in one event with matching (not ok for bkgbkg)