remove redundant class names from templates