Index: trunk/src/tmcsim/cadsimulator/managers/TrafficModelManager.java
===================================================================
--- trunk/src/tmcsim/cadsimulator/managers/TrafficModelManager.java	(revision 206)
+++ trunk/src/tmcsim/cadsimulator/managers/TrafficModelManager.java	(revision 210)
@@ -76,4 +76,10 @@
      */
     private Properties props = null;
+    
+    /** 
+     * The Coordinator object from which we obtain the simulation clock.
+     */ 
+    private Coordinator theCoordinator;
+
     /**
      * Highways in traffic network
@@ -95,12 +101,8 @@
     private String currentClock = "";
     
-    /**
-     * GUI for this driver
-     */
-    //private TrafficModelViewer theView;
-    
+   
     /**
      * Constructor. Loads the Properties file and initializes the
-     * ATMSCommunicator with the parsed data.
+     * highway network model. 
      *
      * @param propertiesFile Target file path of properties file.
@@ -118,5 +120,12 @@
                 props.getProperty(PROPERTIES.FEPSIM_IP_ADDR.name),
                 8080); 
-        
+        this.theCoordinator = theCoordinator;
+    }
+    /**
+     * Load the traffic events and start processing the event queue.
+     * Usage: addObserver must be called before calling run.
+     */
+    public void run()
+    {
         loadEvents();
         
@@ -378,40 +387,4 @@
     }
 
-    /**
-     * Construct the CADClient with the properties file path, either from the
-     * command line arguments or default.
-     *
-     * @param args Command line arguments.
-     */
-    public static void main(String[] args) throws RemoteException
-    {
-        final String CONFIG_FILE_NAME = "traffic_model_config.properties";        
-        if (System.getProperty("CONFIG_DIR") == null)
-        {
-            System.setProperty("CONFIG_DIR", "config");
-        }
-        CADSimulatorState theModel = new CADSimulatorState();
-        Coordinator theCoordinator = new Coordinator(theModel);
-        try
-        {
-            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
-            TrafficModelManager mgr = new TrafficModelManager(System.getProperty("CONFIG_DIR") + System.getProperty("file.separator") + CONFIG_FILE_NAME,                    
-            theCoordinator);
-            TrafficModelViewer view = new TrafficModelViewer(mgr);
-            view.setVisible(true);
-            mgr.addObserver(view);
-        }
-        catch (Exception e)
-        {
-            logger.logp(Level.SEVERE, "SimulationManager", "Main",
-                    "Error initializing application.");
-
-            JOptionPane.showMessageDialog(new JWindow(), e.getMessage(),
-                    "Error - Program Exiting", JOptionPane.ERROR_MESSAGE);
-
-            System.exit(-1);
-        }
-
-    }
     class WriteToConsoleThread extends Thread
     {
