Remove unused terms.