Fix set_edges() and add get_next_edge()
On of the setter functions was broken (set_edges()) and a getter function was missing (get_next_edge()), so fix that.
On of the setter functions was broken (set_edges()) and a getter function was missing (get_next_edge()), so fix that.