Changed edges to list from vector for fast erasure