 
 package weave.core
 {
-	import flash.utils.Dictionary;
-	
 	import weave.api.core.ICallbackCollection;
 	import weave.api.core.IDisposableObject;
+	import weave.api.core.ILinkableCompositeObject;
 	import weave.api.core.ILinkableDynamicObject;
 	import weave.api.core.ILinkableHashMap;
 	import weave.api.core.ILinkableObject;
 	import weave.api.core.ISessionManager;
 	import weave.compiler.StandardLib;
+	import weave.primitives.Dictionary2D;
 	
 	/**
 	 * This is used to dynamically attach a set of callbacks to different targets.

			var subPath:Array = [];
			for each (var name:* in _targetPath)
			{
				if (node is ILinkableDynamicObject)
					addPathDependency(node as ILinkableDynamicObject);
				
				subPath[0] = name;
				var child:ILinkableObject = sm.getObject(node, subPath);

			internalSetTarget(node);
		}
		
		private function addPathDependency(parent:ILinkableCompositeObject, pathElement:Object):void
		{
			// if parent is an ILinkableHashMap and pathElement is a String, we don't need to add the dependency
			var lhm:ILinkableHashMap = parent as ILinkableHashMap;
			if (lhm && pathElement is String)
				return;
			
			var ldo:ILinkableDynamicObject = parent as ILinkableDynamicObject;
			if (ldo)
				pathElement = null;
			
			if (!_pathDependencies.get(parent, pathElement))
			{
				var child:ILinkableObject = WeaveAPI.SessionManager.getObject(parent, [pathElement]);
				_pathDependencies.set(parent, pathElement, child);
				var dependencyCallbacks:ICallbackCollection = getDependencyCallbacks(parent);
				dependencyCallbacks.addImmediateCallback(this, handlePathDependencies);
				dependencyCallbacks.addDisposeCallback(this, handlePathDependencies);
			}
		}
		
		private function getDependencyCallbacks(parent:ILinkableObject):ICallbackCollection
		{
			var lhm:ILinkableHashMap = parent as ILinkableHashMap;
			if (lhm)
				return lhm.childListCallbacks;
			return WeaveAPI.SessionManager.getCallbackCollection(parent);
		}
		
		private function handlePathDependencies():void
		{
			var sm:ISessionManager = WeaveAPI.SessionManager;
			for (var parent:Object in _pathDependencies.dictionary)
			{
				for (var pathElement:Object in _pathDependencies.dictionary[parent])
				{
					var oldChild:ILinkableObject = _pathDependencies.get(parent, pathElement);
					var newChild:ILinkableObject = sm.getObject(parent as ILinkableObject, [pathElement]);
					if (sm.objectWasDisposed(parent) || oldChild != newChild)
					{
						resetPathDependencies();
						handlePath();
						return;
					}
				}
			}
		}
		
		private function resetPathDependencies():void
		{
			for (var parent:Object in _pathDependencies.dictionary)
				getDependencyCallbacks(parent as ILinkableObject).removeCallback(handlePathDependencies);
			_pathDependencies = new Dictionary2D(true, false);
		}
		
		/**
