When are templates in TMS applied to systems?