Removing duplicated templates