Index: trunk/src/scriptbuilder/structures/MyScriptHandler.java
===================================================================
--- trunk/src/scriptbuilder/structures/MyScriptHandler.java	(revision 41)
+++ trunk/src/scriptbuilder/structures/MyScriptHandler.java	(revision 45)
@@ -6,4 +6,5 @@
 package scriptbuilder.structures;
 
+import java.util.ArrayList;
 import java.util.Random;
 import java.util.Stack;
@@ -63,5 +64,5 @@
      * Map containing all Units. Keys = Unit number. Values = Unit object.
      */
-    private TreeMap<String, Unit> unitMap;
+    private ArrayList<Unit> units;
 
     /**
@@ -246,5 +247,5 @@
         incidentMap = new TreeMap<Integer, ScriptIncident>();
         eventMap = new TreeMap<ELEMENT, I_ScriptEvent>();
-        unitMap = new TreeMap<String, Unit>();
+        units = new ArrayList<Unit>();
         pcData = new TreeMap<ELEMENT, String>();
         docPosition = new Stack<ELEMENT>();
@@ -266,7 +267,7 @@
      * @returns Vector of Unit objects.
      */
-    public Vector<Unit> getUnits()
-    {
-        return new Vector<Unit>(unitMap.values());
+    public ArrayList<Unit> getUnits()
+    {
+        return units;
     }
 
@@ -768,5 +769,5 @@
             {
                 Location_Info locInfo = new Location_Info();
-                
+
                 locInfo.Location_ID = LocationInfoID;
                 locInfo.Direction = pcData.remove(ELEMENT.Direction);
@@ -774,5 +775,5 @@
                 locInfo.Route = pcData.remove(ELEMENT.Route);
                 locInfo.Postmile = pcData.remove(ELEMENT.Postmile);
-                cad.locInfo.add(locInfo);                
+                cad.locInfo.add(locInfo);
             }
             else if (currentElement == ELEMENT.MAINTENANCE_RADIO)
@@ -785,4 +786,8 @@
             {
                 cad.Master_Inc_Num = pcData.remove(currentElement);
+            }
+            else if (currentElement == ELEMENT.P)
+            {
+                cad.P = pcData.remove(currentElement);
             }
             else if (currentElement == ELEMENT.PARAMICS)
@@ -890,79 +895,77 @@
             else if (currentElement == ELEMENT.NEW_UNIT)
             {
-                if (unitMap.get(NewUnitNum) == null)
-                {
-                    Unit unit = new Unit();
-                    unit.UnitNum = NewUnitNum;
-                    if (pcData.containsKey(ELEMENT.AGY))
-                    {
-                        unit.Agy = pcData.remove(ELEMENT.AGY);
-                    }
-                    if (pcData.containsKey(ELEMENT.ALIAS))
-                    {
-                        unit.Alias = pcData.remove(ELEMENT.ALIAS);
-                    }
-                    if (pcData.containsKey(ELEMENT.AREA))
-                    {
-                        unit.Area = pcData.remove(ELEMENT.AREA);
-                    }
-                    if (pcData.containsKey(ELEMENT.BADGE_NUM))
-                    {
-                        unit.Badge_Num = pcData.remove(ELEMENT.BADGE_NUM);
-                    }
-                    if (pcData.containsKey(ELEMENT.CURR_LOC))
-                    {
-                        unit.Curr_Loc = pcData.remove(ELEMENT.CURR_LOC);
-                    }
-                    if (pcData.containsKey(ELEMENT.DESTINATION))
-                    {
-                        unit.Destination = pcData.remove(ELEMENT.DESTINATION);
-                    }
-                    if (pcData.containsKey(ELEMENT.ID))
-                    {
-                        unit.ID = pcData.remove(ELEMENT.ID);
-                    }
-                    if (pcData.containsKey(ELEMENT.MASTER_INC_NUM))
-                    {
-                        unit.Master_Inc_Num = pcData.remove(ELEMENT.MASTER_INC_NUM);
-                    }
-                    if (pcData.containsKey(ELEMENT.MISC_INFO))
-                    {
-                        unit.Misc_Info = pcData.remove(ELEMENT.MISC_INFO);
-                    }
-                    if (pcData.containsKey(ELEMENT.OOS))
-                    {
-                        unit.OOS = pcData.remove(ELEMENT.OOS);
-                    }
-                    if (pcData.containsKey(ELEMENT.OFFICE))
-                    {
-                        unit.Office = pcData.remove(ELEMENT.OFFICE);
-                    }
-                    if (pcData.containsKey(ELEMENT.OFFICER))
-                    {
-                        unit.Officer = pcData.remove(ELEMENT.OFFICER);
-                    }
-                    if (pcData.containsKey(ELEMENT.P))
-                    {
-                        unit.P = pcData.remove(ELEMENT.P);
-                    }
-                    if (pcData.containsKey(ELEMENT.PRIMARY))
-                    {
-                        unit.Primary = pcData.remove(ELEMENT.PRIMARY);
-                    }
-                    if (pcData.containsKey(ELEMENT.STACK))
-                    {
-                        unit.Stack = pcData.remove(ELEMENT.STACK);
-                    }
-                    if (pcData.containsKey(ELEMENT.STATUS))
-                    {
-                        unit.Status = pcData.remove(ELEMENT.STATUS);
-                    }
-                    if (pcData.containsKey(ELEMENT.TIMER))
-                    {
-                        unit.Timer = pcData.remove(ELEMENT.TIMER);
-                    }
-                    unitMap.put(NewUnitNum, unit);
-                }
-            }
+                Unit unit = new Unit();
+                unit.UnitNum = NewUnitNum;
+                if (pcData.containsKey(ELEMENT.AGY))
+                {
+                    unit.Agy = pcData.remove(ELEMENT.AGY);
+                }
+                if (pcData.containsKey(ELEMENT.ALIAS))
+                {
+                    unit.Alias = pcData.remove(ELEMENT.ALIAS);
+                }
+                if (pcData.containsKey(ELEMENT.AREA))
+                {
+                    unit.Area = pcData.remove(ELEMENT.AREA);
+                }
+                if (pcData.containsKey(ELEMENT.BADGE_NUM))
+                {
+                    unit.Badge_Num = pcData.remove(ELEMENT.BADGE_NUM);
+                }
+                if (pcData.containsKey(ELEMENT.CURR_LOC))
+                {
+                    unit.Curr_Loc = pcData.remove(ELEMENT.CURR_LOC);
+                }
+                if (pcData.containsKey(ELEMENT.DESTINATION))
+                {
+                    unit.Destination = pcData.remove(ELEMENT.DESTINATION);
+                }
+                if (pcData.containsKey(ELEMENT.ID))
+                {
+                    unit.ID = pcData.remove(ELEMENT.ID);
+                }
+                if (pcData.containsKey(ELEMENT.MASTER_INC_NUM))
+                {
+                    unit.Master_Inc_Num = pcData.remove(ELEMENT.MASTER_INC_NUM);
+                }
+                if (pcData.containsKey(ELEMENT.MISC_INFO))
+                {
+                    unit.Misc_Info = pcData.remove(ELEMENT.MISC_INFO);
+                }
+                if (pcData.containsKey(ELEMENT.OOS))
+                {
+                    unit.OOS = pcData.remove(ELEMENT.OOS);
+                }
+                if (pcData.containsKey(ELEMENT.OFFICE))
+                {
+                    unit.Office = pcData.remove(ELEMENT.OFFICE);
+                }
+                if (pcData.containsKey(ELEMENT.OFFICER))
+                {
+                    unit.Officer = pcData.remove(ELEMENT.OFFICER);
+                }
+                if (pcData.containsKey(ELEMENT.P))
+                {
+                    unit.P = pcData.remove(ELEMENT.P);
+                }
+                if (pcData.containsKey(ELEMENT.PRIMARY))
+                {
+                    unit.Primary = pcData.remove(ELEMENT.PRIMARY);
+                }
+                if (pcData.containsKey(ELEMENT.STACK))
+                {
+                    unit.Stack = pcData.remove(ELEMENT.STACK);
+                }
+                if (pcData.containsKey(ELEMENT.STATUS))
+                {
+                    unit.Status = pcData.remove(ELEMENT.STATUS);
+                }
+                if (pcData.containsKey(ELEMENT.TIMER))
+                {
+                    unit.Timer = pcData.remove(ELEMENT.TIMER);
+                }
+                units.add(unit);
+            }
+
             else if (qName.equals(ELEMENT.TIME_INDEX.tag))
             {
