revised icgp with nodes in a map, globally unique node ids, discarding nodes