remove unneeded links