Sorts edges on parse