Eliminate unused references.