 					packageDefinition = tempPackages[packageName];
 					if (packageDefinition == null)
 					{
-						packageDefinition = new Definition();
-						packageDefinition.id = packageName;
-						packageDefinition.name = packageName.slice(packageName.lastIndexOf(".") + 1);
-						packageDefinition.isPackage = true;
+						packageDefinition = newPackageDefinition(packageName);
 						packageDefinition.isExternal = true;
 						tempPackages[packageName] = packageDefinition;
 					}

			d.isExternal = true;
			return d;
		}
	}
}
		private function createPackages():void
		{
			var tempPackages:Object = {};
			var topmostPackage:Definition = newPackageDefinition("");
			topmostPackage.isExternal = true;
			tempPackages[topmostPackage.id] = topmostPackage;

