Delete useless references