Removing useless links