Index: branches/FEPSimulator/FEPSim.cpp
===================================================================
--- branches/FEPSimulator/FEPSim.cpp	(revision 148)
+++ branches/FEPSimulator/FEPSim.cpp	(revision 177)
@@ -21,8 +21,8 @@
 }
 
-void FEPSim::sendReplys(char * xml) {
-    NetworkReader networkReader = NetworkReader(xml);
-    vector<FEP_LINE*> lines = networkReader.getLines();
-    vector<STATION*> ldsMap = networkReader.getStations();
+void FEPSim::sendReplys(char * buffer) {
+    HighwaysParser highwaysParser = HighwaysParser(buffer);
+    vector<FEP_LINE*> lines = highwaysParser.getLines();
+    vector<STATION*> ldsMap = highwaysParser.getStations();
 
     // Send one reply for every FEPLine
@@ -89,7 +89,8 @@
             fepReply.answers.fep_answer_list_u.shortp.answers[0] = fsa;
             // send out data
-            printf("Transferring line=%d, lds_drop_no=%d...\n", lines.at(i)->lineNum, ldsMap.at(index)->drop);
+            printf("Transferring line=%d, lds_drop_no=%d...\n", lines.at(i)->lineNum, (int)ldsMap.at(index)->drop);
             // Make RPC Call and handle response
             // printf("Handling ATMS response...\n");
+            // Transfer the station data to ATMS and listen for response
             handleCallResponse(fep_reply_xfer_32(&fepReply, clnt));
         }
@@ -97,7 +98,11 @@
 }
 
-void FEPSim::updateATMS(char * xml) {
-    if (createClient()) {
-        sendReplys(xml);
+void FEPSim::manageClientConnection(char * buffer) 
+{
+    // Attempt to create RPC client
+    if (createClient()) 
+    {
+        // Prepare and send the highway status as FEP replies
+        sendReplys(buffer);
         cout << "Destroying client..." << endl;
         clnt_destroy(clnt);
@@ -184,5 +189,5 @@
 
         // send data to atms
-        updateATMS(buffer);
+        manageClientConnection(buffer);
     }
 }
