Make node required a set
Improve graph strategy

* Precalculate all required dependencies before evaluating graph
* Use simple pruning algorithm to discard unneeded keys