Added initial functionality for the graph and basic tests. API subject to change.