getting rid of unused links