diff --git a/nlsr-sync-0.0/nlsr_adl.c b/nlsr-sync-0.0/nlsr_adl.c
index 3f271a1..042466a 100755
--- a/nlsr-sync-0.0/nlsr_adl.c
+++ b/nlsr-sync-0.0/nlsr_adl.c
@@ -318,23 +318,17 @@
 
 	hashtb_start(nlsr->adl, e);
 
-	//printf("Neighbor: %s , Length: %d \n",nbr->name, nbr->length);
-
 	res = hashtb_seek(e, nbr->name, nbr->length, 0);
 
 	if( res == HT_OLD_ENTRY )
 	{
-		//printf("Old Neighbor\n");
 		nnbr=e->data;
 		nnbr->lsdb_interest_timed_out += increment;
-		//printf("lsdb_interest_timed_out: %d \n",nnbr->lsdb_interest_timed_out);
 	}
 	else if(res == HT_NEW_ENTRY)
 	{
 		hashtb_delete(e);
-	}
-
-	//print_adjacent_from_adl();		
+	}		
 	hashtb_end(e);
 }
 
diff --git a/nlsr-sync-0.0/nlsr_lsdb.c b/nlsr-sync-0.0/nlsr_lsdb.c
index 70c6111..d7a3068 100755
--- a/nlsr-sync-0.0/nlsr_lsdb.c
+++ b/nlsr-sync-0.0/nlsr_lsdb.c
@@ -30,7 +30,6 @@
 void
 set_new_lsdb_version(void)
 {
-//Obaid: this method needs to be modified, no need to free and allocate memory again
 	char *time_stamp=(char *)malloc(20);
 	memset(time_stamp,0,20);
 	get_current_timestamp_micro(time_stamp);
@@ -95,7 +94,6 @@
 		writeLogg(__FILE__,__FUNCTION__,__LINE__,"build_and_install_name_lsas called\n");
 
 	int i, npl_element;
-	//struct name_prefix *np;
 	struct name_prefix_list_entry *npe;
 
 	struct hashtb_enumerator ee;
@@ -467,7 +465,6 @@
 							int check=add_npt_entry(new_name_lsa->header->orig_router->name,new_name_lsa->name_prefix->name,next_hop,faces,route_costs);
 							if ( check == HT_NEW_ENTRY )
 							{
-								//printf("Added in npt \n");
 								if ( nlsr->debugging )
 									printf("Added in npt \n");
 								if ( nlsr->detailed_logging )
@@ -728,9 +725,6 @@
 
 	int no_link=no_active_nbr();
 	
-	//printf("Number of link in Adjacent LSA: %d\n",no_link);
-
-	/*Filling Up Header Data */
 	adj_lsa->header=(struct alsa_header *)malloc(sizeof(struct alsa_header ));
 	adj_lsa->header->orig_router=(struct name_prefix *)malloc(sizeof(struct name_prefix ));
 	adj_lsa->header->orig_router->name=(char *)malloc(strlen(nlsr->router_name)+1);
@@ -749,9 +743,6 @@
 	memcpy(adj_lsa->header->orig_time,time_stamp,strlen(time_stamp)+1);	
 	free(time_stamp);
 
-
-	/* Filling Up Body Data */
-
 	adj_lsa->no_link=no_link;
 
 
@@ -764,14 +755,6 @@
 	memcpy(adj_lsa->body,(char *)data,strlen(data)+1);
 	ccn_charbuf_destroy(&c);
 
-
-
-	/*if( !nlsr->is_send_lsdb_interest_scheduled )
-	{	
-		nlsr->event_send_lsdb_interest= ccn_schedule_event(nlsr->sched, 1000, &send_lsdb_interest, NULL, 0);
-		nlsr->is_send_lsdb_interest_scheduled=1;
-	}*/
-
 	nlsr->adj_build_count++;
 
 
@@ -791,15 +774,11 @@
 	char *time_stamp=(char *)malloc(20);
 	memset(time_stamp,0,20);
 	get_current_timestamp_micro(time_stamp);
-	//long int lsa_life_time=get_time_diff(time_stamp,adj_lsa->header->orig_time);
-
-	//printf("time difference: %ld \n",lsa_life_time);
 
 
 		char *key=(char *)malloc(adj_lsa->header->orig_router->length+2+2);
 		memset(key,0,adj_lsa->header->orig_router->length+2);
 		make_adj_lsa_key(key,adj_lsa);
-		//printf("Adjacent LSA key: %s \n",key);
 
 		struct alsa *new_adj_lsa=(struct alsa*)malloc(sizeof(struct alsa ));
 
@@ -879,8 +858,6 @@
 
 				if ( adj_lsa->no_link > 0)
 				{				
-					//new_adj_lsa = e->data;
-
 					writeLogg(__FILE__,__FUNCTION__,__LINE__," Adj-LSA\n");
 					writeLogg(__FILE__,__FUNCTION__,__LINE__," Deleting adj lsa\n");
 					write_log_for_adj_lsa(new_adj_lsa);
@@ -1111,7 +1088,6 @@
 		writeLogg(__FILE__,__FUNCTION__,__LINE__,"build_and_install_others_adj_lsa called \n");
 	struct alsa *adj_lsa=(struct alsa *)malloc(sizeof( struct alsa ));
 	build_others_adj_lsa(adj_lsa,orig_router,ls_type,orig_time,no_link,data);
-	//print_adj_lsa(adj_lsa);
 	install_adj_lsa(adj_lsa);
 	
 
@@ -1130,7 +1106,6 @@
 void 
 build_others_adj_lsa(struct alsa *adj_lsa,char *orig_router,int ls_type,char *orig_time,int no_link,char *data)
 {
-	//printf("build_others_adj_lsa called \n");
 	if ( nlsr->debugging )
 		printf("build_others_adj_lsa called  \n");	
 	if ( nlsr->detailed_logging )
@@ -1193,10 +1168,10 @@
 	return num_element; 
 }
 
+/*
 void 
 get_name_lsdb_summary(struct ccn_charbuf *name_lsdb_data)
 {
-	//printf("get_name_lsdb_summary called \n");
 	if ( nlsr->debugging )
 		printf("get_name_lsdb_summary called  \n");	
 	if ( nlsr->detailed_logging )
@@ -1241,8 +1216,9 @@
 	hashtb_end(e);
 
 }
+*/
 
-
+/*
 void 
 get_adj_lsdb_summary(struct ccn_charbuf *adj_lsdb_data)
 {
@@ -1281,8 +1257,9 @@
 
 	hashtb_end(e);
 }
+*/
 
-
+/*
 void 
 get_lsdb_summary(struct ccn_charbuf *lsdb_data)
 {
@@ -1317,6 +1294,7 @@
 	free(num_element);
 
 }
+*/
 
 int 
 check_is_new_name_lsa(char *orig_router,char *lst,char *lsid,char *orig_time)
@@ -1403,7 +1381,6 @@
 void 
 get_name_lsa_data(struct ccn_charbuf *lsa_data, struct name_prefix *lsaId)
 {
-	//printf("get_name_lsa_data called \n");
 	if ( nlsr->debugging )
 		printf("get_name_lsa_data called  \n");	
 	if ( nlsr->detailed_logging )
@@ -1619,8 +1596,7 @@
 int 
 delete_name_lsa(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags)
 {
-	//printf("delete_name_lsa called \n");
-
+	
 	if ( nlsr->debugging )
 		printf("delete_name_lsa called  \n");	
 	if ( nlsr->detailed_logging )
@@ -1680,8 +1656,6 @@
 	if ( nlsr->detailed_logging )
 		writeLogg(__FILE__,__FUNCTION__,__LINE__,"New Version Number of LSDB: %s \n",nlsr->lsdb->lsdb_version);
 	
-	//print_name_lsdb();
-	
 	nlsr_unlock();
 
 	return 0;
@@ -1690,8 +1664,6 @@
 int 
 delete_adj_lsa(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags)
 {
-	//printf("delete_adj_lsa called \n");
-
 	if ( nlsr->debugging )
 		printf("delete_adj_lsa called  \n");	
 	if ( nlsr->detailed_logging )
@@ -1703,8 +1675,6 @@
 	}
 	nlsr_lock();
 
-	//printf("LSA Key: %s \n",(char *)ev->evdata);
-
 	if ( nlsr->debugging )
 		printf("LSA Key: %s \n",(char *)ev->evdata);
 	if ( nlsr->detailed_logging )
@@ -1753,8 +1723,6 @@
 		nlsr->is_route_calculation_scheduled=1;
 	}
 
-	//print_adj_lsdb();
-
 	nlsr_unlock();
 
 	return 0;
@@ -1763,15 +1731,11 @@
 void
 refresh_name_lsdb(void)
 {
-	//printf("refresh_name_lsdb called \n");
-
 	if ( nlsr->debugging )
 		printf("refresh_name_lsdb called  \n");	
 	if ( nlsr->detailed_logging )
 		writeLogg(__FILE__,__FUNCTION__,__LINE__,"refresh_name_lsdb called  \n");
 
-	//int lsa_change_count=0;
-
 	char *time_stamp=(char *)malloc(20);
 	memset(time_stamp,0,20);
 	get_current_timestamp_micro(time_stamp);
@@ -1846,7 +1810,6 @@
 
 
 					make_name_lsa_key(key, name_lsa->header->orig_router->name,name_lsa->header->ls_type,name_lsa->header->ls_id);	
-					//printf("Key:%s Length:%d\n",key,(int)strlen(key));
 				
 					nlsr->event = ccn_schedule_event(nlsr->sched, 10, &delete_name_lsa, (void *)key, 0);
 				}
@@ -1866,7 +1829,6 @@
 							
 
 				print_name_lsdb();
-				//lsa_change_count++;
 			}	
 		}
 		else 
@@ -1892,10 +1854,8 @@
 
 
 				make_name_lsa_key(key, name_lsa->header->orig_router->name,name_lsa->header->ls_type,name_lsa->header->ls_id);	
-				//printf("Key:%s Length:%d\n",key,(int)strlen(key));
 				
 				nlsr->event = ccn_schedule_event(nlsr->sched, 10, &delete_name_lsa, (void *)key, 0);
-				//lsa_change_count++;
 			}
 		}
 
@@ -1912,7 +1872,6 @@
 void
 refresh_adj_lsdb(void)
 {
-	//printf("refresh_adj_lsdb called \n");
 
 	if ( nlsr->debugging )
 		printf("refresh_adj_lsdb called  \n");	
@@ -1938,8 +1897,7 @@
 	{
 		adj_lsa=e->data;
 
-		lsa_life_time=get_time_diff(time_stamp,adj_lsa->header->orig_time);
-		//printf("LSA Life Time: %ld \n",lsa_life_time);	
+		lsa_life_time=get_time_diff(time_stamp,adj_lsa->header->orig_time);	
 
 		if ( nlsr->debugging )
 			printf("LSA Life Time: %ld \n",lsa_life_time);	
@@ -1950,7 +1908,6 @@
 		{
 			if ( lsa_life_time > nlsr->lsa_refresh_time )
 			{
-				//printf("Own Adj LSA need to be refrshed\n");
 				if ( nlsr->debugging )
 					printf("Own Adj LSA need to be refrshed\n");
 				if ( nlsr->detailed_logging )
@@ -1996,7 +1953,6 @@
 		{
 			if ( lsa_life_time > nlsr->router_dead_interval )
 			{
-				//printf("Others Adj LSA need to be deleted\n");
 
 				if ( nlsr->debugging )
 				 	printf("Others Adj LSA need to be deleted\n");
@@ -2006,7 +1962,7 @@
 				char *key=(char *)malloc(adj_lsa->header->orig_router->length+2+2);
 				memset(key,0,adj_lsa->header->orig_router->length+2);
 				make_adj_lsa_key(key,adj_lsa);
-				//printf("Adjacent LSA key: %s \n",key);				
+				
 				nlsr->event = ccn_schedule_event(nlsr->sched, 10, &delete_adj_lsa, (void *)key, 0);
 			}
 		}
@@ -2031,8 +1987,6 @@
 
 	nlsr_lock();
 
-	//printf("refresh_lsdb called \n");
-
 	if ( nlsr->debugging )
 		printf("refresh_lsdb called\n");
 	if ( nlsr->detailed_logging )
diff --git a/nlsr-sync-0.0/nlsr_lsdb.h b/nlsr-sync-0.0/nlsr_lsdb.h
index 32972d9..8944802 100755
--- a/nlsr-sync-0.0/nlsr_lsdb.h
+++ b/nlsr-sync-0.0/nlsr_lsdb.h
@@ -72,10 +72,6 @@
 long int get_name_lsdb_num_element(void);
 long int get_adj_lsdb_num_element(void);
 
-void get_name_lsdb_summary(struct ccn_charbuf *name_lsdb_data);
-void get_adj_lsdb_summary(struct ccn_charbuf *adj_lsdb_data);
-void get_lsdb_summary(struct ccn_charbuf *lsdb_data);
-
 int check_is_new_name_lsa(char *orig_router,char *lst,char *lsid,char *orig_time);
 int check_is_new_adj_lsa(char *orig_router,char *lst,char *orig_time);
 
diff --git a/nlsr-sync-0.0/nlsr_ndn.c b/nlsr-sync-0.0/nlsr_ndn.c
index 5e5c082..a98c0aa 100755
--- a/nlsr-sync-0.0/nlsr_ndn.c
+++ b/nlsr-sync-0.0/nlsr_ndn.c
@@ -275,20 +275,12 @@
 
 	res=ccn_name_comp_get(info->interest_ccnb, info->interest_comps,nlsr_position+1,&comp_ptr1, &comp_size);
 
-	//printf("Det= %s \n",comp_ptr1);
 
 	if(!strcmp((char *)comp_ptr1,"info"))
 	{
 		process_incoming_interest_info(selfp,info);
 	}
-	if(!strcmp((char *)comp_ptr1,"lsdb"))
-	{
-		process_incoming_interest_lsdb(selfp,info);
-	}
-	if(!strcmp((char *)comp_ptr1,"lsa"))
-	{
-		process_incoming_interest_lsa(selfp,info);
-	}
+
 }
 
 void 
@@ -373,264 +365,6 @@
 }
 
 
-void 
-process_incoming_interest_lsdb(struct ccn_closure *selfp, struct ccn_upcall_info *info)
-{
-	//printf("process_incoming_interest_lsdb called \n");
-
-	if ( nlsr->debugging )
-		printf("process_incoming_interest_lsdb called \n");
-	if ( nlsr->detailed_logging )
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"process_incoming_interest_lsdb called \n");
-	
-
-	int l,res;
-	const unsigned char *exclbase;
-	size_t size;
-	struct ccn_buf_decoder decoder;
-	struct ccn_buf_decoder *d;
-	const unsigned char *comp;
-	int dbcmp=0;
-
-	l = info->pi->offset[CCN_PI_E_Exclude] - info->pi->offset[CCN_PI_B_Exclude];
-	if (l > 0) 
-	{
-		comp = NULL;
-		size = 0;
-		exclbase = info->interest_ccnb + info->pi->offset[CCN_PI_B_Exclude];
-		d = ccn_buf_decoder_start(&decoder, exclbase, l);
-		if (ccn_buf_match_dtag(d, CCN_DTAG_Exclude)) 
-		{
-			ccn_buf_advance(d);
-			if (ccn_buf_match_dtag(d, CCN_DTAG_Any))
-				ccn_buf_advance_past_element(d);
-			if (ccn_buf_match_dtag(d, CCN_DTAG_Component)) 
-			{
-				ccn_buf_advance(d);
-				ccn_buf_match_blob(d, &comp, &size);
-				ccn_buf_check_close(d);			
-
-
-			}
-			ccn_buf_check_close(d);
-		}
-		if (comp != NULL)
-		{
-			if ( nlsr->debugging )
-			{
-				printf("LSDB Version in Exclusion Filter is %s\n",comp);
-				printf("LSDB Version of own NLSR is: %s \n",nlsr->lsdb->lsdb_version);
-			}
-			if ( nlsr->detailed_logging )
-			{
-				writeLogg(__FILE__,__FUNCTION__,__LINE__,"LSDB Version in Exclusion Filter is %s\n",comp);
-				writeLogg(__FILE__,__FUNCTION__,__LINE__,"LSDB Version of own NLSR is: %s \n",nlsr->lsdb->lsdb_version);
-			}
-			dbcmp=strcmp(nlsr->lsdb->lsdb_version,(char *)comp);
-		}
-		/* Now comp points to the start of your potential number, and size is its length */
-	}
-	else
-	{
-		if ( nlsr->debugging )
-			printf("LSDB Version in Exclusion Filter is: None Added\n");
-		if ( nlsr->detailed_logging )
-			writeLogg(__FILE__,__FUNCTION__,__LINE__,"LSDB Version in Exclusion Filter is: None Added\n");
-		dbcmp=1;		
-
-	}
-
-	struct ccn_charbuf *data=ccn_charbuf_create();
-	struct ccn_charbuf *name=ccn_charbuf_create();
-	struct ccn_signing_params sp=CCN_SIGNING_PARAMS_INIT;
-	
-	ccn_charbuf_append(name, info->interest_ccnb + info->pi->offset[CCN_PI_B_Name],info->pi->offset[CCN_PI_E_Name] - info->pi->offset[CCN_PI_B_Name]);
-
-	sp.template_ccnb=ccn_charbuf_create();
-	ccn_charbuf_append_tt(sp.template_ccnb,CCN_DTAG_SignedInfo, CCN_DTAG);
-	ccnb_tagged_putf(sp.template_ccnb, CCN_DTAG_FreshnessSeconds, "%ld", 10);
-        sp.sp_flags |= CCN_SP_TEMPL_FRESHNESS;
-        ccn_charbuf_append_closer(sp.template_ccnb);
-
-
-	if(dbcmp>0)
-	{
-		if ( nlsr->debugging )
-		{
-			printf("Has Updated Database than Neighbor\n");
-			printf("Sending LSDB Summary of Updated LSDB Content...\n");			
-		}
-		if ( nlsr->detailed_logging )
-		{
-			writeLogg(__FILE__,__FUNCTION__,__LINE__,"Has Updated Database than Neighbor\n");
-			writeLogg(__FILE__,__FUNCTION__,__LINE__,"Sending LSDB Summary of Updated LSDB Content...\n");	
-		}
-		ccn_name_append_str(name,nlsr->lsdb->lsdb_version);
-
-		struct ccn_charbuf *lsdb_data=ccn_charbuf_create();
-		get_lsdb_summary(lsdb_data);
-
-		char *raw_data=ccn_charbuf_as_string(lsdb_data);
-
-		//printf("Content Data to be sent: %s \n",raw_data);		
-
-		if( nlsr->is_build_adj_lsa_sheduled == 1 || strlen((char *)raw_data) == 0 )
-		{
-			 res= ccn_sign_content(nlsr->ccn, data, name, &sp, "WAIT" , strlen("WAIT"));
-		}
-		else
-		{
-			res= ccn_sign_content(nlsr->ccn, data, name, &sp, raw_data , strlen(raw_data));
-		}
-
-		if(res >= 0)
-		{
-			if ( nlsr->debugging )
-				printf("Signing LSDB Summary of Updated LSDB Content is successful  \n");
-			if ( nlsr->detailed_logging )
-				writeLogg(__FILE__,__FUNCTION__,__LINE__,"Signing LSDB Summary of Updated LSDB Content is successful  \n");
-		}		
-
-	    	res=ccn_put(nlsr->ccn,data->buf,data->length);
-
-		if(res >= 0)
-		{
-			if ( nlsr->debugging )
-				printf("Sending LSDB Summary of Updated LSDB Content is successful  \n");
-			if ( nlsr->detailed_logging )
-				writeLogg(__FILE__,__FUNCTION__,__LINE__,"Sending LSDB Summary of Updated LSDB Content is successful  \n");
-		}
-		
-		ccn_charbuf_destroy(&lsdb_data);
-	}
-	else
-	{
-		if ( nlsr->debugging )
-		{
-			printf("Does not have Updated Database than Neighbor\n");		
-			printf("Sending NACK Content.....\n");	
-		}
-		if ( nlsr->detailed_logging )
-		{
-			writeLogg(__FILE__,__FUNCTION__,__LINE__,"Does not have Updated Database than Neighbor\n");		
-			writeLogg(__FILE__,__FUNCTION__,__LINE__,"Sending NACK Content.....\n");
-		}
-
-		res= ccn_sign_content(nlsr->ccn, data, name, &sp, "NACK", strlen("NACK")); 
-
-		if(res >= 0)
-		{
-			if ( nlsr->debugging )
-				printf("Signing NACK Content is successful  \n");
-			if ( nlsr->detailed_logging )
-				writeLogg(__FILE__,__FUNCTION__,__LINE__,"Signing NACK Content is successful  \n");
-		}
-
-	    	res=ccn_put(nlsr->ccn,data->buf,data->length);
-
-		if(res >= 0)
-		{
-			if ( nlsr->debugging )
-				printf("Sending NACK Content is successful  \n");
-			if ( nlsr->detailed_logging )
-				writeLogg(__FILE__,__FUNCTION__,__LINE__,"Sending NACK Content is successful  \n");
-		}
-
-		
-	}
-
-	ccn_charbuf_destroy(&data);
-	ccn_charbuf_destroy(&name);
-	ccn_charbuf_destroy(&sp.template_ccnb);
-
-
-}
-
-
-void 
-process_incoming_interest_lsa(struct ccn_closure *selfp, struct ccn_upcall_info *info)
-{
-	if ( nlsr->debugging )
-		printf("process_incoming_interest_lsa called \n");
-	if ( nlsr->detailed_logging )
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"process_incoming_interest_lsa called \n");
-
-	int res;
-
-	struct name_prefix *lsaId=(struct name_prefix *)malloc(sizeof(struct name_prefix ));
-	get_lsa_identifier(lsaId,selfp,info,0);
-
-	//printf("LSA Identifier: %s Length: %d\n",lsaId->name,lsaId->length);
-	int ls_type=get_ls_type(selfp, info);
-
-	struct ccn_charbuf *lsa_data=ccn_charbuf_create();
-
-	if ( ls_type == LS_TYPE_NAME )
-	{
-		if ( nlsr->debugging )
-			printf("Interest Received for NAME LSA \n");
-		if ( nlsr->detailed_logging )
-			writeLogg(__FILE__,__FUNCTION__,__LINE__,"Interest Received for NAME LSA \n");
-		get_name_lsa_data(lsa_data,lsaId);
-	}
-	else if ( ls_type == LS_TYPE_ADJ )
-	{
-		if ( nlsr->debugging )
-			printf("Interest Received for ADJ LSA \n");
-		if ( nlsr->detailed_logging )
-			writeLogg(__FILE__,__FUNCTION__,__LINE__,"Interest Received for ADJ LSA \n");
-		get_adj_lsa_data(lsa_data,lsaId);
-	}
-
-	char *rdata=ccn_charbuf_as_string(lsa_data);
-	char *raw_data=(char *)malloc(strlen(rdata)+1);
-	memset(raw_data,0,strlen(rdata)+1);
-	memcpy(raw_data,(char *)rdata,strlen(rdata)+1);
-	//printf("Content Data to be sent: %s\n",raw_data);
-
-	struct ccn_charbuf *data=ccn_charbuf_create();
-	struct ccn_charbuf *name=ccn_charbuf_create();
-	struct ccn_signing_params sp=CCN_SIGNING_PARAMS_INIT;
-
-	ccn_charbuf_append(name, info->interest_ccnb + info->pi->offset[CCN_PI_B_Name],info->pi->offset[CCN_PI_E_Name] - info->pi->offset[CCN_PI_B_Name]); 
-
-	sp.template_ccnb=ccn_charbuf_create();
-	ccn_charbuf_append_tt(sp.template_ccnb,CCN_DTAG_SignedInfo, CCN_DTAG);
-	ccnb_tagged_putf(sp.template_ccnb, CCN_DTAG_FreshnessSeconds, "%ld", 10);
-        sp.sp_flags |= CCN_SP_TEMPL_FRESHNESS;
-        ccn_charbuf_append_closer(sp.template_ccnb);
-
-	res= ccn_sign_content(nlsr->ccn, data, name, &sp, raw_data , strlen(raw_data)); 
-
-	if(res >= 0)
-	{
-		if ( nlsr->debugging )
-			printf("Signing LSA Content is successful  \n");
-		if ( nlsr->detailed_logging )
-			writeLogg(__FILE__,__FUNCTION__,__LINE__,"Signing LSA Content is successful  \n");
-	}
-
-	res=ccn_put(nlsr->ccn,data->buf,data->length);
-
-	if(res >= 0)
-	{
-		if ( nlsr->debugging )
-			printf("Sending LSA Content is successful  \n");
-		if ( nlsr->detailed_logging )
-			writeLogg(__FILE__,__FUNCTION__,__LINE__,"Sending LSA Content is successful  \n");
-	}
-
-
-
-	ccn_charbuf_destroy(&data);
-	ccn_charbuf_destroy(&name);
-	ccn_charbuf_destroy(&sp.template_ccnb);
-	ccn_charbuf_destroy(&lsa_data);
-
-	free(raw_data);
-	free(lsaId);
-}
-
 /* Call back function registered in ccnd to get all content coming to NLSR application */
 
 enum ccn_upcall_res incoming_content(struct ccn_closure* selfp,
@@ -701,7 +435,6 @@
 void 
 process_incoming_content(struct ccn_closure *selfp, struct ccn_upcall_info* info)
 {
-	//printf("process_incoming_content called \n");
 	if ( nlsr->debugging )
 		printf("process_incoming_content called \n");
 	if ( nlsr->detailed_logging )
@@ -725,20 +458,11 @@
 
 	res=ccn_name_comp_get(info->interest_ccnb, info->interest_comps,nlsr_position+1,&comp_ptr1, &comp_size);
 
-	//printf("Det= %s \n",comp_ptr1);
 
 	if(!strcmp((char *)comp_ptr1,"info"))
 	{
 		process_incoming_content_info(selfp,info);
 	}
-	/*if(!strcmp((char *)comp_ptr1,"lsdb"))
-	{
-		process_incoming_content_lsdb(selfp,info);
-	}
-	if(!strcmp((char *)comp_ptr1,"lsa"))
-	{
-		process_incoming_content_lsa(selfp,info);
-	}*/
 
 }
 
@@ -746,7 +470,6 @@
 void 
 process_incoming_content_info(struct ccn_closure *selfp, struct ccn_upcall_info* info)
 {
-	//printf("process_incoming_content_info called \n");
 	if ( nlsr->debugging )
 		printf("process_incoming_content_info called \n");
 	if ( nlsr->detailed_logging )
@@ -764,7 +487,6 @@
 	const unsigned char *ptr;
 	size_t length;
 	ccn_content_get_value(info->content_ccnb, info->pco->offset[CCN_PCO_E_Content]-info->pco->offset[CCN_PCO_B_Content], info->pco, &ptr, &length);
-	//printf("Content data: %s\n",ptr);
 
 	long int interval=atoi((char *)ptr);
 
@@ -801,257 +523,6 @@
 }
 
 
-void 
-process_incoming_content_lsdb(struct ccn_closure *selfp, struct ccn_upcall_info* info)
-{
-	if ( nlsr->debugging )
-		printf("process_incoming_content_lsdb called \n");
-	if ( nlsr->detailed_logging )
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"process_incoming_content_lsdb called \n");
-
-	const unsigned char *ptr;
-	size_t length;
-	ccn_content_get_value(info->content_ccnb, info->pco->offset[CCN_PCO_E_Content]-info->pco->offset[CCN_PCO_B_Content], info->pco, &ptr, &length);
-	//printf("Content data: %s\n",ptr);
-
-	if( (strcmp("NACK",(char *)ptr) != 0 ) && (strcmp("WAIT",(char *)ptr) != 0 ) )
-	{
-		struct name_prefix *nbr=(struct name_prefix *)malloc(sizeof(struct name_prefix ));
-		get_nbr(nbr,selfp,info);
-
-		char *nl;
-		int num_element;
-		int i;
-		char *rem;
-		const char *sep="|";
-		char *orig_router;
-		char *lst;
-		int ls_type;
-		char *lsid;
-		long int ls_id;
-		char *orig_time;
-
-		nl=strtok_r((char *)ptr,sep,&rem);
-		num_element=atoi(nl);		
-
-		for(i = 0 ; i < num_element ; i++)
-		{
-			orig_router=strtok_r(NULL,sep,&rem);
-			lst=strtok_r(NULL,sep,&rem);
-			ls_type=atoi(lst);
-
-			if ( nlsr->debugging )
-				printf("Orig Router: %s ls Type: %d",orig_router,ls_type);
-			if ( nlsr->detailed_logging )
-				writeLogg(__FILE__,__FUNCTION__,__LINE__,"Orig Router: %s ls Type: %d",orig_router,ls_type);
-		
-
-			if(ls_type == LS_TYPE_NAME)
-			{
-				lsid=strtok_r(NULL,sep,&rem);
-				ls_id=atoi(lsid);
-				orig_time=strtok_r(NULL,sep,&rem);
-
-				if ( nlsr->debugging )
-					printf(" LS Id: %ld  Orig Time: %s\n",ls_id ,orig_time);
-				if ( nlsr->detailed_logging )
-					writeLogg(__FILE__,__FUNCTION__,__LINE__," LS Id: %ld  Orig Time: %s\n",ls_id ,orig_time);
-
-				
-				int is_new_name_lsa=check_is_new_name_lsa(orig_router,lst,lsid,orig_time);
-				if ( is_new_name_lsa == 1 )
-				{
-					if ( nlsr->debugging )
-						printf("New NAME LSA.....\n");
-					if ( nlsr->detailed_logging )
-						writeLogg(__FILE__,__FUNCTION__,__LINE__,"New NAME LSA.....\n");
-					
-					send_interest_for_name_lsa(nbr,orig_router,lst,lsid);	
-				}
-				else 
-				{
-					if ( nlsr->debugging )
-						printf("Name LSA already exists in LSDB\n");
-					if ( nlsr->detailed_logging )
-						writeLogg(__FILE__,__FUNCTION__,__LINE__,"Name LSA already exists in LSDB\n");
-					
-				}
-			}
-			else
-			{
-				orig_time=strtok_r(NULL,sep,&rem);
-
-				if ( nlsr->debugging )
-					printf(" Orig Time: %s\n",orig_time);
-				if ( nlsr->detailed_logging )
-					writeLogg(__FILE__,__FUNCTION__,__LINE__," Orig Time: %s\n",orig_time);
-				
-
-				int is_new_adj_lsa=check_is_new_adj_lsa(orig_router,lst,orig_time);
-				if ( is_new_adj_lsa == 1 )
-				{
-					if ( nlsr->debugging )
-						printf("New Adj LSA.....\n");
-					if ( nlsr->detailed_logging )
-						writeLogg(__FILE__,__FUNCTION__,__LINE__,"New Adj LSA.....\n");
-					send_interest_for_adj_lsa(nbr,orig_router,lst);
-				}
-				else
-				{
-					if ( nlsr->debugging )
-						printf("Adj LSA already exists in LSDB\n");
-					if ( nlsr->detailed_logging )
-						writeLogg(__FILE__,__FUNCTION__,__LINE__,"Adj LSA already exists in LSDB\n");
-				}
-			}
-
-		}
-
-		char *lsdb_version=(char *)malloc(20);
-		memset(lsdb_version,0,20);
-		get_lsdb_version(lsdb_version,selfp,info);
-
-		if ( nlsr->debugging )
-			printf("Old LSDB Version of Neighbor: %s is :%s\n",nbr->name,get_nbr_lsdb_version(nbr->name));
-		if ( nlsr->detailed_logging )
-			writeLogg(__FILE__,__FUNCTION__,__LINE__,"Old LSDB Version of Neighbor: %s is :%s\n",nbr->name,get_nbr_lsdb_version(nbr->name));
-
-		update_adjacent_lsdb_version_to_adl(nbr,lsdb_version);
-		
-		if ( nlsr->debugging )
-			printf("New LSDB Version of Neighbor: %s is :%s\n",nbr->name,get_nbr_lsdb_version(nbr->name));
-		if ( nlsr->detailed_logging )
-			writeLogg(__FILE__,__FUNCTION__,__LINE__,"New LSDB Version of Neighbor: %s is :%s\n",nbr->name,get_nbr_lsdb_version(nbr->name));
-
-		update_lsdb_interest_timed_out_zero_to_adl(nbr);
-
-		free(lsdb_version);
-		free(nbr);	
-	}
-	else if (strcmp("WAIT",(char *)ptr) == 0)
-	{
-		struct name_prefix *nbr=(struct name_prefix *)malloc(sizeof(struct name_prefix ));
-		get_nbr(nbr,selfp,info);
-		long int interval=get_lsdb_synch_interval(nbr->name);
-		adjust_adjacent_last_lsdb_requested_to_adl(nbr->name,(long int)interval/2);
-
-		update_lsdb_interest_timed_out_zero_to_adl(nbr);
-		free(nbr);
-	}
-	else 
-	{
-		
-		if ( nlsr->debugging )
-			printf("NACK Content Received\n");
-		if ( nlsr->detailed_logging )
-			writeLogg(__FILE__,__FUNCTION__,__LINE__,"NACK Content Received\n");
-		struct name_prefix *nbr=(struct name_prefix *)malloc(sizeof(struct name_prefix ));
-		get_nbr(nbr,selfp,info);
-		update_lsdb_interest_timed_out_zero_to_adl(nbr);
-		free(nbr);
-	}
-}
-
-
-void 
-process_incoming_content_lsa(struct ccn_closure *selfp, struct ccn_upcall_info* info)
-{
-	
-
-	if ( nlsr->debugging )
-		printf("process_incoming_content_lsa called \n");
-	if ( nlsr->detailed_logging )
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"process_incoming_content_lsa called \n");	
-
-	char *sep="|";
-	char *rem;
-	char *orig_router;
-	char *orl;
-	int orig_router_length;
-	char *lst;
-	int ls_type;
-	char *lsid;
-	long int ls_id;
-	char *isvld;
-	int isValid;
-	char *num_link;
-	int no_link;
-	char *np;
-	char *np_length;
-	int name_length;
-	char *data;
-	char *orig_time;
-
-	const unsigned char *ptr;
-	size_t length;
-	ccn_content_get_value(info->content_ccnb, info->pco->offset[CCN_PCO_E_Content]-info->pco->offset[CCN_PCO_B_Content], info->pco, &ptr, &length);
-	//printf("Content data Received: %s\n",ptr);
-
-	
-
-	
-	if ( nlsr->debugging )
-		printf("LSA Data \n");
-	if ( nlsr->detailed_logging )
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"LSA Data\n");	
-
-	if( strlen((char *) ptr ) > 0 )
-	{
-
-		orig_router=strtok_r((char *)ptr,sep,&rem);
-		orl=strtok_r(NULL,sep,&rem);
-		orig_router_length=atoi(orl);
-
-		if ( nlsr->debugging )
-		{
-			printf("	Orig Router Name  : %s\n",orig_router);
-			printf("	Orig Router Length: %d\n",orig_router_length);
-		}
-
-		lst=strtok_r(NULL,sep,&rem);		
-		ls_type=atoi(lst);
-
-		if ( nlsr->debugging )
-			printf("	LS Type  : %d\n",ls_type);
-
-		if ( ls_type == LS_TYPE_NAME )
-		{
-			lsid=strtok_r(NULL,sep,&rem);
-			ls_id=atoi(lsid);
-			orig_time=strtok_r(NULL,sep,&rem);
-			isvld=strtok_r(NULL,sep,&rem);
-			isValid=atoi(isvld);
-			np=strtok_r(NULL,sep,&rem);
-			np_length=strtok_r(NULL,sep,&rem);
-			name_length=atoi(np_length);
-			if ( nlsr->debugging )
-			{
-				printf("	LS ID  : %ld\n",ls_id);
-				printf("	isValid  : %d\n",isValid);
-				printf("	Name Prefix : %s\n",np);
-				printf("	Orig Time   : %s\n",orig_time);
-				printf("	Name Prefix length: %d\n",name_length);
-			}
-
-			build_and_install_others_name_lsa(orig_router,ls_type,ls_id,orig_time,isValid,np);
-
-		}
-		else if ( ls_type == LS_TYPE_ADJ )
-		{
-			orig_time=strtok_r(NULL,sep,&rem);
-			num_link=strtok_r(NULL,sep,&rem);
-			no_link=atoi(num_link);
-			data=rem;
-
-			if ( nlsr->debugging )
-			{
-				printf("	No Link  : %d\n",no_link);
-				printf("	Data  : %s\n",data);
-			}
-			build_and_install_others_adj_lsa(orig_router,ls_type,orig_time,no_link,data);
-		}
-	}
-}
 
 
 void
@@ -1082,14 +553,6 @@
 	{
 		process_incoming_timed_out_interest_info(selfp,info);
 	}
-	if(ccn_name_comp_strcmp(info->interest_ccnb,info->interest_comps,nlsr_position+1,"lsdb") == 0)
-	{
-		process_incoming_timed_out_interest_lsdb(selfp,info);
-	}
-	if(ccn_name_comp_strcmp(info->interest_ccnb,info->interest_comps,nlsr_position+1,"lsa") == 0)
-	{
-		process_incoming_timed_out_interest_lsa(selfp,info);
-	}
 }
 
 void
@@ -1140,56 +603,6 @@
 
 }
 
-void
-process_incoming_timed_out_interest_lsdb(struct ccn_closure* selfp, struct ccn_upcall_info* info)
-{
-	if ( nlsr->debugging )
-		printf("process_incoming_timed_out_interest_lsdb called \n");
-	if ( nlsr->detailed_logging )
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"process_incoming_timed_out_interest_lsdb called \n");
-
-	struct name_prefix *nbr=(struct name_prefix *)malloc(sizeof(struct name_prefix ));
-	get_nbr(nbr,selfp,info);
-
-	if ( nlsr->debugging )
-		printf("LSDB Interest Timed Out for for Neighbor: %s Length:%d\n",nbr->name,nbr->length);
-	if ( nlsr->detailed_logging )
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"LSDB Interest Timed Out for for Neighbor: %s Length:%d\n",nbr->name,nbr->length);
-	
-
-	update_lsdb_interest_timed_out_to_adl(nbr,1);
-
-	int interst_timed_out_num=get_lsdb_interest_timed_out_number(nbr);
-
-	if ( nlsr->debugging )
-		printf("Interest Timed out number : %d Interest Retry: %d \n",interst_timed_out_num,nlsr->interest_retry);
-	if ( nlsr->detailed_logging )
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"Interest Timed out number : %d Interest Retry: %d \n",interst_timed_out_num,nlsr->interest_retry);
-
-	
-
-	if( interst_timed_out_num >= nlsr->interest_retry )
-	{
-		update_adjacent_status_to_adl(nbr,NBR_DOWN);
-		if(!nlsr->is_build_adj_lsa_sheduled)
-		{
-			nlsr->event_build_adj_lsa = ccn_schedule_event(nlsr->sched, 1000, &build_and_install_adj_lsa, NULL, 0);
-			nlsr->is_build_adj_lsa_sheduled=1;		
-		}
-	}
-	free(nbr->name);
-	free(nbr);
-}
-
-void
-process_incoming_timed_out_interest_lsa(struct ccn_closure* selfp, struct ccn_upcall_info* info)
-{
-	if ( nlsr->debugging )
-		printf("process_incoming_timed_out_interest_lsa called \n");
-	if ( nlsr->detailed_logging )
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"process_incoming_timed_out_interest_lsa called \n");
-	
-}
 
 int
 send_info_interest(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags)
@@ -1308,306 +721,3 @@
 	free(int_name);
 
 }
-
-
-int 
-send_lsdb_interest(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags)
-{
-	if ( nlsr->debugging )
-		printf("send_lsdb_interest called \n");
-	if ( nlsr->detailed_logging )
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"send_lsdb_interest called \n");	
-
-	if(flags == CCN_SCHEDULE_CANCEL)
-	{
- 	 	return -1;
-	}
-
-	 nlsr_lock();
-
-	int i, adl_element;
-	struct ndn_neighbor *nbr;
-
-	struct hashtb_enumerator ee;
-    	struct hashtb_enumerator *e = &ee;
-    	
-    	hashtb_start(nlsr->adl, e);
-	adl_element=hashtb_n(nlsr->adl);
-
-	for(i=0;i<adl_element;i++)
-	{
-		nbr=e->data;
-
-		if(nbr->status == NBR_ACTIVE)
-		{	
-			if(nbr->is_lsdb_send_interest_scheduled == 0)
-			{
-				long int time_diff=get_nbr_time_diff_lsdb_req(nbr->neighbor->name);
-				if ( nlsr->debugging )
-					printf("Time since last time LSDB requested : %ld Seconds for Neighbor: %s \n",time_diff,nbr->neighbor->name);
-				if ( nlsr->detailed_logging )
-					writeLogg(__FILE__,__FUNCTION__,__LINE__,"Time since last time LSDB requested : %ld Seconds for Neighbor: %s \n",time_diff,nbr->neighbor->name);	
-						
-
-				if( time_diff >= ( get_lsdb_synch_interval(nbr->neighbor->name) + get_nbr_random_time_component(nbr->neighbor->name) ) )
-				{
-					nbr->is_lsdb_send_interest_scheduled=1;
-					send_lsdb_interest_to_nbr(nbr->neighbor);
-				}
-			}
-		}
-		hashtb_next(e);		
-	}
-
-	hashtb_end(e);
-	nlsr->event_send_lsdb_interest= ccn_schedule_event(nlsr->sched, 30000000, &send_lsdb_interest, NULL, 0);
-
-	 nlsr_unlock();
-
-	return 0;
-}
-
-void 
-send_lsdb_interest_to_nbr(struct name_prefix *nbr)
-{
-	if ( nlsr->debugging )
-		printf("send_lsdb_interest_to_nbr called \n");
-	if ( nlsr->detailed_logging )
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"send_lsdb_interest_to_nbr called \n");
-
-	char *last_lsdb_version=get_nbr_lsdb_version(nbr->name);
-
-	if(last_lsdb_version !=NULL)
-	{
-		
-
-		if ( nlsr->debugging )
-			printf("Last LSDB Version: %s \n",last_lsdb_version);
-		if ( nlsr->detailed_logging )
-			writeLogg(__FILE__,__FUNCTION__,__LINE__,"Last LSDB Version: %s \n",last_lsdb_version);
-
-		struct ccn_charbuf *name;
-		int res;
-		char lsdb_str[5];
-		char nlsr_str[5];
-
-		memset(&nlsr_str,0,5);
-		sprintf(nlsr_str,"nlsr");
-		memset(&lsdb_str,0,5);
-		sprintf(lsdb_str,"lsdb");		
-		//make and send interest with exclusion filter as last_lsdb_version
-		if ( nlsr->debugging )
-			printf("Sending interest for name prefix:%s/%s/%s\n",nbr->name,nlsr_str,lsdb_str);
-		if ( nlsr->detailed_logging )
-			writeLogg(__FILE__,__FUNCTION__,__LINE__,"Sending interest for name prefix:%s/%s/%s\n",nbr->name,nlsr_str,lsdb_str);
-			
-		name=ccn_charbuf_create();
-		res=ccn_name_from_uri(name,nbr->name);
-
-		if( res >= 0)
-		{
-			ccn_name_append_str(name,nlsr_str);
-			ccn_name_append_str(name,lsdb_str);
-			/* adding Exclusion filter */
-
-			struct ccn_charbuf *templ;
-			templ = ccn_charbuf_create();
-
-			struct ccn_charbuf *c;
-			c = ccn_charbuf_create();
-
-
-			ccn_charbuf_append_tt(templ, CCN_DTAG_Interest, CCN_DTAG);
-			ccn_charbuf_append_tt(templ, CCN_DTAG_Name, CCN_DTAG);
-			ccn_charbuf_append_closer(templ); /* </Name> */
-			ccn_charbuf_append_tt(templ, CCN_DTAG_Exclude, CCN_DTAG);
-			ccnb_tagged_putf(templ, CCN_DTAG_Any, "");
-			ccn_charbuf_reset(c);
-			ccn_charbuf_putf(c, "%s", last_lsdb_version);
-			
-			ccnb_append_tagged_blob(templ, CCN_DTAG_Component, c->buf, c->length);
-			ccn_charbuf_append_closer(templ); /* </Exclude> */
-			ccn_charbuf_append_tt(templ, CCN_DTAG_Scope, CCN_DTAG);
-			ccn_charbuf_append_tt(templ, 1, CCN_UDATA);
-			ccn_charbuf_append(templ, "2", 1);
-			ccn_charbuf_append_closer(templ); /* </Scope> */
-
-			appendLifetime(templ,nlsr->interest_resend_time);
-
-			ccn_charbuf_append_closer(templ); /* </Interest> */
-
-
-			/* Adding Exclusion filter done */
-
-			res=ccn_express_interest(nlsr->ccn,name,&(nlsr->in_content),templ);
-
-			if ( res >= 0 )
-			{
-				if ( nlsr->debugging )
-					printf("Interest sending Successfull .... \n");
-				if ( nlsr->detailed_logging )
-					writeLogg(__FILE__,__FUNCTION__,__LINE__,"Interest sending Successfull .... \n");	
-				update_adjacent_last_lsdb_requested_to_adl(nbr->name,get_current_time_sec());
-
-			}
-			ccn_charbuf_destroy(&c);
-			ccn_charbuf_destroy(&templ);
-		}
-		ccn_charbuf_destroy(&name);
-	}	
-	set_is_lsdb_send_interest_scheduled_to_zero(nbr->name);
-}
-
-void 
-send_interest_for_name_lsa(struct name_prefix *nbr, char *orig_router, char *ls_type, char *ls_id)
-{
-	if ( nlsr->debugging )
-		printf("send_interest_for_name_lsa called\n");
-	if ( nlsr->detailed_logging )
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"send_interest_for_name_lsa called\n");
-
-	int res;
-	char lsa_str[5];
-	char nlsr_str[5];
-
-	memset(&nlsr_str,0,5);
-	sprintf(nlsr_str,"nlsr");
-	memset(&lsa_str,0,5);
-	sprintf(lsa_str,"lsa");
-
-	char *int_name=(char *)malloc(nbr->length + strlen(ls_type)+strlen(orig_router)+strlen(nlsr_str)+strlen(lsa_str)+3);
-	memset(int_name,0,nbr->length +strlen(ls_type)+ strlen(orig_router)+strlen(nlsr_str)+strlen(lsa_str)+3);
-
-	memcpy(int_name+strlen(int_name),nbr->name,nbr->length);
-	memcpy(int_name+strlen(int_name),"/",1);
-	memcpy(int_name+strlen(int_name),nlsr_str,strlen(nlsr_str));
-	memcpy(int_name+strlen(int_name),"/",1);
-	memcpy(int_name+strlen(int_name),lsa_str,strlen(lsa_str));
-	memcpy(int_name+strlen(int_name),"/",1);
-	memcpy(int_name+strlen(int_name),ls_type,strlen(ls_type));
-	memcpy(int_name+strlen(int_name),orig_router,strlen(orig_router));
-
-
-	struct ccn_charbuf *name;	
-	name=ccn_charbuf_create();
-
-
-	res=ccn_name_from_uri(name,int_name);
-	ccn_name_append_str(name,ls_type);
-	ccn_name_append_str(name,ls_id);
-
-
-	/* adding InterestLifeTime and InterestScope filter */
-
-	struct ccn_charbuf *templ;
-	templ = ccn_charbuf_create();
-
-	ccn_charbuf_append_tt(templ, CCN_DTAG_Interest, CCN_DTAG);
-	ccn_charbuf_append_tt(templ, CCN_DTAG_Name, CCN_DTAG);
-	ccn_charbuf_append_closer(templ); /* </Name> */
-	//ccnb_tagged_putf(templ, CCN_DTAG_Scope, "%d", scope);
-	ccn_charbuf_append_tt(templ, CCN_DTAG_Scope, CCN_DTAG);
-	ccn_charbuf_append_tt(templ, 1, CCN_UDATA);
-	ccn_charbuf_append(templ, "2", 1); //scope of interest: 2 (not further than next host)
-	ccn_charbuf_append_closer(templ); /* </Scope> */
-
-	appendLifetime(templ,nlsr->interest_resend_time);
-	ccn_charbuf_append_closer(templ); /* </Interest> */
-	/* Adding InterestLifeTime and InterestScope filter done */
-
-	if ( nlsr->debugging )
-		printf("Sending NAME LSA interest on name prefix : %s/%s/%s\n",int_name,ls_type,ls_id);
-	if ( nlsr->detailed_logging )
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"Sending NAME LSA interest on name prefix : %s/%s/%s\n",int_name,ls_type,ls_id);
-
-
-	res=ccn_express_interest(nlsr->ccn,name,&(nlsr->in_content),templ);
-
-	if ( res >= 0 )
-	{
-		if ( nlsr->debugging )
-			printf("NAME LSA interest sending Successfull .... \n");
-		if ( nlsr->detailed_logging )
-			writeLogg(__FILE__,__FUNCTION__,__LINE__,"NAME LSA interest sending Successfull .... \n");
-	
-	}	
-	ccn_charbuf_destroy(&templ);
-	ccn_charbuf_destroy(&name);
-	free(int_name);
-
-
-}
-
-void 
-send_interest_for_adj_lsa(struct name_prefix *nbr, char *orig_router, char *ls_type)
-{
-	if ( nlsr->debugging )
-		printf("send_interest_for_name_lsa called\n");
-	if ( nlsr->detailed_logging )
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"send_interest_for_name_lsa called\n");
-
-	int res;
-	char lsa_str[5];
-	char nlsr_str[5];
-
-	memset(&nlsr_str,0,5);
-	sprintf(nlsr_str,"nlsr");
-	memset(&lsa_str,0,5);
-	sprintf(lsa_str,"lsa");
-
-	char *int_name=(char *)malloc(nbr->length + strlen(ls_type)+strlen(orig_router)+strlen(nlsr_str)+strlen(lsa_str)+3+strlen(ls_type)+1);
-	memset(int_name,0,nbr->length +strlen(ls_type)+ strlen(orig_router)+strlen(nlsr_str)+strlen(lsa_str)+3+strlen(ls_type)+1);
-
-	memcpy(int_name+strlen(int_name),nbr->name,nbr->length);
-	memcpy(int_name+strlen(int_name),"/",1);
-	memcpy(int_name+strlen(int_name),nlsr_str,strlen(nlsr_str));
-	memcpy(int_name+strlen(int_name),"/",1);
-	memcpy(int_name+strlen(int_name),lsa_str,strlen(lsa_str));
-	memcpy(int_name+strlen(int_name),"/",1);
-	memcpy(int_name+strlen(int_name),ls_type,strlen(ls_type));
-	memcpy(int_name+strlen(int_name),orig_router,strlen(orig_router));
-	memcpy(int_name+strlen(int_name),"/",1);
-	memcpy(int_name+strlen(int_name),ls_type,strlen(ls_type));
-
-	struct ccn_charbuf *name;	
-	name=ccn_charbuf_create();
-
-
-	ccn_name_from_uri(name,int_name);
-	
-	/* adding InterestLifeTime and InterestScope filter */
-
-	struct ccn_charbuf *templ;
-	templ = ccn_charbuf_create();
-
-	ccn_charbuf_append_tt(templ, CCN_DTAG_Interest, CCN_DTAG);
-	ccn_charbuf_append_tt(templ, CCN_DTAG_Name, CCN_DTAG);
-	ccn_charbuf_append_closer(templ); /* </Name> */
-	ccn_charbuf_append_tt(templ, CCN_DTAG_Scope, CCN_DTAG);
-	ccn_charbuf_append_tt(templ, 1, CCN_UDATA);
-	ccn_charbuf_append(templ, "2", 1); //scope of interest: 2 (not further than next host)
-	ccn_charbuf_append_closer(templ); /* </Scope> */
-
-	appendLifetime(templ,nlsr->interest_resend_time);
-	ccn_charbuf_append_closer(templ); /* </Interest> */
-	/* Adding InterestLifeTime and InterestScope filter done */
-
-	if ( nlsr->debugging )
-		printf("Sending ADJ LSA interest on name prefix : %s\n",int_name);
-	if ( nlsr->detailed_logging )
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"Sending ADJ LSA interest on name prefix : %s\n",int_name);
-
-	res=ccn_express_interest(nlsr->ccn,name,&(nlsr->in_content),templ);
-
-	if ( res >= 0 )
-	{
-		if ( nlsr->debugging )
-			printf("ADJ LSA interest sending Successfull .... \n");	
-		if ( nlsr->detailed_logging )
-			writeLogg(__FILE__,__FUNCTION__,__LINE__,"ADJ LSA interest sending Successfull .... \n");	
-	}
-	
-	ccn_charbuf_destroy(&templ);
-	ccn_charbuf_destroy(&name);
-	free(int_name);
-}
diff --git a/nlsr-sync-0.0/nlsr_ndn.h b/nlsr-sync-0.0/nlsr_ndn.h
index 1feab1e..1e34284 100755
--- a/nlsr-sync-0.0/nlsr_ndn.h
+++ b/nlsr-sync-0.0/nlsr_ndn.h
@@ -7,31 +7,19 @@
 void get_lsdb_version(char *lsdb_version,struct ccn_closure *selfp, struct ccn_upcall_info *info );
 int get_ls_type(struct ccn_closure *selfp, struct ccn_upcall_info *info);
 
-enum ccn_upcall_res incoming_interest(struct ccn_closure *selfp, enum ccn_upcall_kind kind, struct ccn_upcall_info *info);
- 
+enum ccn_upcall_res incoming_interest(struct ccn_closure *selfp, enum ccn_upcall_kind kind, struct ccn_upcall_info *info); 
 void process_incoming_interest(struct ccn_closure *selfp, struct ccn_upcall_info *info);
 void process_incoming_interest_info(struct ccn_closure *selfp, struct ccn_upcall_info *info);
-void process_incoming_interest_lsdb(struct ccn_closure *selfp, struct ccn_upcall_info *info);
-void process_incoming_interest_lsa(struct ccn_closure *selfp, struct ccn_upcall_info *info);
-
 
 enum ccn_upcall_res incoming_content(struct ccn_closure* selfp, enum ccn_upcall_kind kind, struct ccn_upcall_info* info);
 void process_incoming_content(struct ccn_closure *selfp, struct ccn_upcall_info* info);
 void process_incoming_content_info(struct ccn_closure *selfp, struct ccn_upcall_info* info);
-void process_incoming_content_lsdb(struct ccn_closure *selfp, struct ccn_upcall_info* info);
-void process_incoming_content_lsa(struct ccn_closure *selfp, struct ccn_upcall_info* info);
 
 void process_incoming_timed_out_interest(struct ccn_closure* selfp, struct ccn_upcall_info* info);
 void process_incoming_timed_out_interest_info(struct ccn_closure* selfp, struct ccn_upcall_info* info);
-void process_incoming_timed_out_interest_lsdb(struct ccn_closure* selfp, struct ccn_upcall_info* info);
-void process_incoming_timed_out_interest_lsa(struct ccn_closure* selfp, struct ccn_upcall_info* info);
 
 int send_info_interest(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags);
 void send_info_interest_to_neighbor(struct name_prefix *nbr);
 
-int send_lsdb_interest(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags);
-void send_lsdb_interest_to_nbr(struct name_prefix *nbr);
-void send_interest_for_name_lsa(struct name_prefix *nbr, char *orig_router, char *ls_type, char *ls_id);
-void send_interest_for_adj_lsa(struct name_prefix *nbr, char *orig_router, char *ls_type);
 
 #endif
