Added ability to traverse a tree and discover all dependencies.