Remove unneeded references.