Remove shared vertices