cleans edges in network data