Resolve cyclic dependencies