Function for removing unduplicated edges was implemented.