Fixed search and added output of irreducible edges.