removes unusued links