 				_maxLevel = definition.level;
 			}
 		}
+
+		private function newCompiledDefinition(defXML:XML, scriptXML:XML):Definition
+		{
+			var d:Definition = new Definition();
+			d.id = defXML.@id;
+			d.script = scriptXML.@name;
+			d.modified = scriptXML.@mod;
+			d.size = scriptXML.@size;
+			d.optimizedSize = scriptXML.@optimizedsize;
+			d.name = d.id.slice(d.id.lastIndexOf(":") + 1);
+			return d;
+		}
+
+		private function newExternalDefinition(id:String):Definition
+		{
+			var d:Definition = new Definition();
+			d.id = id;
+			d.name = d.id.slice(d.id.lastIndexOf(":") + 1);
+			d.isExternal = true;
+			return d;
+		}
 	}
 }
			var tempPrerequisites:Object = {};

			// Fill definitions and temp dependencies
			var ns:Namespace = _source.namespace("");

			// http://code.google.com/p/redtamarin/wiki/SWC

			var scriptName:Object = ns ? new QName(ns, "script") : "script";
			var defName:Object = ns ? new QName(ns, "def") : "def";
			var depName:Object = ns ? new QName(ns, "dep") : "dep";
			var preName:Object = ns ? new QName(ns, "pre") : "pre";

			for each (var scriptXML:XML in _source.descendants(scriptName))
			{
				var defXML:XML = scriptXML[defName][0];
				if (defXML)
				{
					var definition:Definition = new Definition();
					definition.id = defXML.@id;
					definition.script = scriptXML.@name;
					definition.modified = scriptXML.@mod;
					definition.size = scriptXML.@size;
					definition.optimizedSize = scriptXML.@optimizedsize;
					definition.name = definition.id.slice(definition.id.lastIndexOf(":") + 1);

					var v:Vector.<String>;

					v = tempDependencies[definition.id] = new <String>[];
					for each (var depXML:XML in scriptXML[depName])
					{
						v.push(depXML.@id);
					}

					v = tempPrerequisites[definition.id] = new <String>[];
					for each (var preXML:XML in scriptXML[preName])
					{
						v.push(preXML.@id);
					}

					_lookup[definition.id] = definition;

			}

			// Create external definitions
			for each (var extXML:XML in _source[extDefName][extName])
			{
				definition = _lookup[String(extXML.@id)];
				if (definition == null)
				{
					definition = newExternalDefinition(extXML.@id);
					_lookup[definition.id] = definition;
				}
				definition.isExternal = true;
			}

			// Create externals for missing definitions
			var missingDefinitions:Vector.<Definition> = new <Definition>[];
			for each (definition in _lookup)
			{
				for each (defId in tempDependencies[definition.id])
				{
					if (!_lookup[defId])
					{
						missingDefinitions.push(newExternalDefinition(defId));
					}
				}
				for each (defId in tempPrerequisites[definition.id])
				{
					if (!_lookup[defId])
					{
						missingDefinitions.push(newExternalDefinition(defId));
					}
				}
			}
			for each (definition in missingDefinitions)
			{
				_lookup[definition.id] = definition;
			}

			// Fill dependencies and prerequisites
			for each (definition in _lookup)
			{
				for each (defId in tempDependencies[definition.id])
				{
					var dependency:Definition = _lookup[defId];
					if (dependency)
					{
						definition.dependencies.push(dependency);
					}
				}
				for each (defId in tempPrerequisites[definition.id])
				{
					var prerequisite:Definition = _lookup[defId];
					if (prerequisite)
					{
						definition.prerequisites.push(prerequisite);
