Track incoming and outgoing edges so we can generate a spanning tree easier