Removes self-looping and duplicated edges. Fixed!!!