diff --git a/nlsr_sync.c b/nlsr_sync.c
index 548890e..73449af 100644
--- a/nlsr_sync.c
+++ b/nlsr_sync.c
@@ -52,64 +52,64 @@
 		struct ccn_charbuf *name)
 {
 	int res;
-	//--Doing our thing from here
-	//struct ccn_indexbuf cid={0};
-
-	//struct ccn_indexbuf *components=&cid;
-	struct ccn_indexbuf *components=ccn_indexbuf_create();
-	res=ccn_name_split (name, components);
+	struct ccn_charbuf *content_name; 
+	struct ccn_indexbuf *content_comps;
+	struct ccn_indexbuf *name_comps;
+	
+	content_comps = ccn_indexbuf_create();
+	res = ccn_name_split(name, content_comps);
 	if ( res < 0 )
 		return 0;
-	//ccn_name_chop(name,components,-3);
-	//process_content_from_sync(name,components);
-
-	struct ccn_charbuf *content_name = ccn_charbuf_create();
-	ccn_name_init(content_name);
-	if (components->n < 2)
+	
+	if (content_comps->n < 2)
 		return 0;
-	res = ccn_name_append_components(content_name, name->buf, components->buf[0]
-			, components->buf[components->n - 1]);
+
+	content_name = ccn_charbuf_create();
+	ccn_name_init(content_name);
+	
+	res = ccn_name_append_components( content_name,	name->buf,
+			content_comps->buf[0], content_comps->buf[content_comps->n - 1]);
 
 	if ( res < 0)
 		return 0;
 
-
-	// debugging purpose
+	// for debugging
 	struct ccn_charbuf *temp=ccn_charbuf_create();
 	ccn_uri_append(temp, content_name->buf, content_name->length, 0);
 	if ( nlsr->debugging )
 		printf("Name before chopping: %s \n",ccn_charbuf_as_string(temp));
 	ccn_charbuf_destroy(&temp);
 
-	//struct ccn_indexbuf cid1={0};
-	//struct ccn_indexbuf *components1=&cid1;
-	struct ccn_indexbuf *components1=ccn_indexbuf_create();
-	res=ccn_name_split (content_name, components1);
-	if ( res < 0)
+	name_comps = ccn_indexbuf_create();
+	res=ccn_name_split (content_name, name_comps);
+	if (res < 0)
 		return 0;		
 
 	if ( nlsr->debugging )
 	{
 		printf("Number of components in name = %d \n",res);
 		printf("Number of components in name as indexbuf->n = %d \n",
-				(int)components1->n);
+				(int)name_comps->n);
 	}
-	ccn_name_chop(content_name,components1,-3);
+
+	ccn_name_chop(content_name, name_comps, -3);
 	if ( nlsr->debugging )
 		printf("Number of components in name as indexbuf->n after chopping= %d \n"
-				,(int)components1->n);	
+				, (int)name_comps->n);	
 
-	//debugging purpose
+	//for debugging 
 	struct ccn_charbuf *temp1=ccn_charbuf_create();
 	ccn_uri_append(temp1, content_name->buf, content_name->length, 0);
 	if ( nlsr->debugging )
 		printf("Name after chopping: %s \n",ccn_charbuf_as_string(temp1));
 	ccn_charbuf_destroy(&temp1);
 
-	process_content_from_sync(content_name,components1);
+	//main method which process contents from the sync.
+	process_content_from_sync(content_name, name_comps);
+	
 	ccn_charbuf_destroy(&content_name);
-	ccn_indexbuf_destroy(&components);
-	ccn_indexbuf_destroy(&components1);
+	ccn_indexbuf_destroy(&content_comps);
+	ccn_indexbuf_destroy(&name_comps);
 
 	return(0);
 }
@@ -361,7 +361,8 @@
 }
 
 	void
-process_content_from_sync(struct ccn_charbuf *content_name, struct ccn_indexbuf *components)
+process_content_from_sync (struct ccn_charbuf *content_name, 
+								struct ccn_indexbuf *components)
 {
 	size_t comp_size;
 	char *lst;
@@ -383,15 +384,23 @@
 	struct ccn_charbuf *uri = ccn_charbuf_create();
 	ccn_uri_append(uri, content_name->buf, content_name->length, 0);	
 
-	struct name_prefix *orig_router=(struct name_prefix *)malloc(sizeof(struct name_prefix));
+	struct name_prefix *orig_router=(struct name_prefix *)
+								calloc( 1, sizeof(struct name_prefix));
 
-
-
-	ccn_name_comp_get(content_name->buf, components,components->n-1-2,&second_last_comp, &comp_size);
+	ccn_name_comp_get( content_name->buf, components, 
+					  components->n-1-2, &second_last_comp, &comp_size);
+	
 	if (nlsr->debugging)
-		printf("2nd Last Component: %s \n",second_last_comp);
+		printf("2nd Last Component: %s \n", second_last_comp);
 
-	second_comp_type=strtok_r((char *)second_last_comp,sep,&rem);		
+	second_comp_type=strtok_r((char *)second_last_comp, sep, &rem);
+	if (second_comp_type == NULL || rem == NULL)
+	{
+		printf ("Error: unable to tokenize the string: %s, calling exit()\n",
+													(char *)second_last_comp); 
+		exit(0);
+	}
+
 	if ( strcmp( second_comp_type, "lsId" ) == 0 )
 	{	
 		lsid=rem;
@@ -532,15 +541,13 @@
 sync_monitor(char *topo_prefix, char *slice_prefix)
 {
 
-	//static struct ccns_name_closure nc={0};
-	//nlsr->closure = &nc;
-	nlsr->closure=(struct ccns_name_closure *)calloc(1,sizeof(struct ccns_name_closure));
 	struct ccn_charbuf *prefix = ccn_charbuf_create();
-	//struct ccn_charbuf *roothash = NULL;
 	struct ccn_charbuf *topo = ccn_charbuf_create(); 
+	
+	nlsr->closure=(struct ccns_name_closure *) 
+						calloc(1,sizeof(struct ccns_name_closure));
+
 	nlsr->slice = ccns_slice_create();
-	//ccn_charbuf_reset(prefix);
-	//ccn_charbuf_reset(topo);
 
 	ccn_charbuf_reset(prefix);
 	ccn_name_from_uri(prefix, slice_prefix);
@@ -552,10 +559,8 @@
 	nlsr->closure->callback = &sync_cb;
 	nlsr->ccns = ccns_open(nlsr->ccn, nlsr->slice, nlsr->closure, NULL, NULL);
 
-	//01/31/2013
-	//ccn_charbuf_destroy(&prefix);
-	//ccn_charbuf_destroy(&topo);
-	//ccn_charbuf_destroy(&roothash);
+	ccn_charbuf_destroy(&prefix);
+	ccn_charbuf_destroy(&topo);
 	return 0;
 }
 
@@ -597,7 +602,6 @@
 	struct ccn_seqwriter *w = NULL;
 	int blocksize = 4096;
 	int freshness = -1;
-	int torepo = 1;
 	int scope = 1;
 	int res;
 	size_t blockread;
@@ -610,7 +614,6 @@
 		return -1;
 	}
 
-
 	w = ccn_seqw_create(temp_ccn, name);
 	if (w == NULL) {
 		fprintf(stderr, "ccn_seqw_create failed\n");
@@ -619,21 +622,19 @@
 	ccn_seqw_set_block_limits(w, blocksize, blocksize);
 	if (freshness > -1)
 		ccn_seqw_set_freshness(w, freshness);
-	if (torepo) {
-		struct ccn_charbuf *name_v = ccn_charbuf_create();
-		ccn_seqw_get_name(w, name_v);
-		ccn_name_from_uri(name_v, "%C1.R.sw");
-		ccn_name_append_nonce(name_v);
-		templ = make_template(scope);
-		res = ccn_get(temp_ccn, name_v, templ, 60000, NULL, NULL, NULL, 0);
-		ccn_charbuf_destroy(&templ);
-		ccn_charbuf_destroy(&name_v);
-		if (res < 0) {
-			fprintf(stderr, "No response from repository\n");
-			return -1;
-		}
-	}
 
+	struct ccn_charbuf *name_v = ccn_charbuf_create();
+	ccn_seqw_get_name(w, name_v);
+	ccn_name_from_uri(name_v, "%C1.R.sw");
+	ccn_name_append_nonce(name_v);
+	templ = make_template(scope);
+	res = ccn_get(temp_ccn, name_v, templ, 60000, NULL, NULL, NULL, 0);
+	ccn_charbuf_destroy(&templ);
+	ccn_charbuf_destroy(&name_v);
+	if (res < 0) {
+		fprintf(stderr, "No response from repository\n");
+		return -1;
+	}
 
 	blockread = 0;
 
@@ -654,10 +655,8 @@
 
 	return 0;
 }
-
-
 	int
-create_sync_slice(char *topo_prefix, char *slice_prefix)
+	create_sync_slice(char *topo_prefix, char *slice_prefix)
 {
 	int res;
 	struct ccn *handle; //obaid: probably we don't need it use the same handle i.e. nlsr->ccn
