Removes redundant template