Add basic graph features, and unit tests for them.