Removing unnecessary links