Removing unsused ids in template.