Increase code re-use for graph operations; memoize expensive getDependencies and resolve (local caching was getting to be tricky between graph operations)