Lots of dependency graph fixes
Merge pull request #69 from pauljz/master

DependencyGraph fixes