Implemented reduction of labeled edges.