Various fixes + optimizing graph.subgraph and graph.literal
Merge pull request #3 from Obvious/jeremy-perf

Various fixes + optimizing graph.subgraph and graph.literal