Sorting the templates out