 		private function createPackages():void
 		{
 			var tempPackages:Object = {};
-			var topmostPackage:Definition = new Definition();
-			topmostPackage.id = "";
-			topmostPackage.name = "";
-			topmostPackage.isPackage = true;
+			var topmostPackage:Definition = newPackageDefinition("");
 			topmostPackage.isExternal = true;
 			tempPackages[topmostPackage.id] = topmostPackage;
 

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

			d.isExternal = true;
			return d;
		}

		private function newPackageDefinition(packageName:String):Definition
		{
			var d:Definition = new Definition();
			d.id = packageName;
			d.name = packageName.length > 0 ? packageName.slice(packageName.lastIndexOf(".") + 1) : packageName;
			d.isPackage = true;
			return d;
		}
	}
}