Partial implementation of the graph factories
Merge.