Major rework of depedency graph, circular dependency exceptions

Fixes #84