Simplify term selection algorithm.