Simplification of graph