Remove unnecessary references.