Simplify template use and reduce template count