Implement deleting refs.