Edges refactor