Fixed up scaling issues for depgraph and deal with orphaned cases