Index: /branches/fep_client_cpp/fep_client.cpp
===================================================================
--- /branches/fep_client_cpp/fep_client.cpp	(revision 72)
+++ /branches/fep_client_cpp/fep_client.cpp	(revision 73)
@@ -30,7 +30,7 @@
 void xfer_replys(CLIENT *clnt, FEP_LINE_LDS *lines, int lines_size, LDS_LOOP *ldsMap)
 {
-	printf("Lines_size %d\n", lines_size);
 	int i, j; // i == line_index, j == lds_index
 	void *rv;
+
 	// Send one reply for every "line" in the FEP
 	for (i = 0; i < lines_size; i++)
@@ -59,5 +59,4 @@
 		*/
 		fepReply.schedule_time = time(NULL);
-
 
 		fepReply.user_info1 = lines[i].lineNum;
@@ -99,5 +98,5 @@
 			
 			// send out data
-			printf("line=%d, lds=%d\n", lines[i].lineNum, ldsMap[index].drop);
+			printf("Transferring line=%d, lds_drop_no=%d...\n", lines[i].lineNum, ldsMap[index].drop);
 			rv = fep_reply_xfer_32(&fepReply, clnt);
 
@@ -138,14 +137,17 @@
 	/* Load data to be xfered to ATMS */
 	int lines_size = 0;
-	printf("Loading lines and ldsMap\n");
+	printf("Loading lines\n");
 	FEP_LINE_LDS *lines = load_lines(&lines_size, "./lines_atms.txt");
-	printf("Done loading lines\n");
+	printf("Loading ldsMap...\n");
 	LDS_LOOP *ldsMap = load_lds("./lds_atms.txt");
-	printf("Done loading lines and lds...\n");
 
 	/* Transfer data to ATMS */
+	printf("Transferring data to ATMS...\n");
 	xfer_replys(clnt, lines, lines_size, ldsMap);
 
 	/* Free allocated memory */
+	printf("Freeing lines and ldsMap...\n");
+	free(lines);
+	free(ldsMap);
 
 	/* Destroy client */
Index: /branches/fep_client_cpp/network.h
===================================================================
--- /branches/fep_client_cpp/network.h	(revision 72)
+++ /branches/fep_client_cpp/network.h	(revision 73)
@@ -4,9 +4,8 @@
 
 using namespace std;
-// the first byte is not considered in the calculation of "BYTE 2"
-const int Fixed_Byte_To_Checksum = 25;
 
+/*** CONSTANTS ***/
+const int Fixed_Byte_To_Checksum = 25; // the first byte is not considered in the calculation of "BYTE 2"
 const int CONTROL_DATA_LEN = 27;
-
 char * const dp5[8] = { "ML_1", "ML_2", "ML_3", "ML_4", "ML_5",
                                                 "ML_6", "HOV_Lane", "FYW_Conn"};
@@ -18,6 +17,5 @@
                                                 "SD_6", "Pass_Vol_Count", "X"};
 
-
-
+/*** NETWORK STRUCTS ***/
 typedef struct loopagg LOOPAGG;
 struct loopagg
@@ -52,4 +50,5 @@
 };
 
+// Loop detector station: has several loops
 typedef struct Lds_loop LDS_LOOP;
 struct  Lds_loop 
Index: /branches/fep_client_cpp/network_factory.cpp
===================================================================
--- /branches/fep_client_cpp/network_factory.cpp	(revision 72)
+++ /branches/fep_client_cpp/network_factory.cpp	(revision 73)
@@ -2,4 +2,5 @@
 #include <vector>
 #include <math.h>
+
 // determine if a loop has data based on lane config data
 bool DataAvail(char flag, int num)
@@ -34,8 +35,11 @@
 }
 
+// Initializes the LDS_LOOP dataPack with all necessary static data and default dynamic data
 void init_loop_dataPack(LDS_LOOP *loop)
 {
-	int j = 0;
+	int j;
+	// Allocate memory for dataPack
 	loop->dataPack = (unsigned char *) calloc(sizeof(unsigned char), loop->length);
+
 	// dataPack 5-8: lane config
 	char d5 = 0, d6 = 0, d7 = 0, d8 = 0;		
