Simplify and fix getting parallel edges of undirected edges