Remove irrelevant templates