Mimimal changes for graph reference.

This commit should have a minimal set of changes needed for making the APIs work against a graph reference.