removes useless links