diff --git a/nlsr_lsdb.c b/nlsr_lsdb.c
index d08cb69..36f2dbd 100644
--- a/nlsr_lsdb.c
+++ b/nlsr_lsdb.c
@@ -34,13 +34,8 @@
 void
 set_new_lsdb_version(void)
 {
-	
-	//char *time_stamp=get_current_timestamp_micro_v2();
 	free(nlsr->lsdb->lsdb_version);
 	nlsr->lsdb->lsdb_version=get_current_timestamp_micro_v2();
-	//nlsr->lsdb->lsdb_version=(char *)calloc(strlen(time_stamp)+1,sizeof(char));
-	//memcpy(nlsr->lsdb->lsdb_version,time_stamp,strlen(time_stamp)+1);
-	//free(time_stamp);
 }
 
 /**
@@ -116,10 +111,7 @@
 		printf("Cor LSA prefix for repo content:%s\n",key);	
 }
 
-/**
-* Build name lsa for all name prefixes in Name Prefix List (NPL). Intsall Name
-* LSA in Name LSDB for router itself.
-*/
+
 
 void
 destroy_name_lsa_component(struct nlsa * name_lsa)
@@ -194,6 +186,10 @@
 		free(cor_lsa);
 }
 
+/**
+* Build name lsa for all name prefixes in Name Prefix List (NPL). Intsall Name
+* LSA in Name LSDB for router itself.
+*/
 
 
 void 
@@ -255,6 +251,11 @@
 
 }
 
+/**
+* Build Name LSA for own router from name_prefix np and fill up the name_lsa
+*/
+
+
 void 
 build_name_lsa(struct nlsa *name_lsa, struct name_prefix *np)
 {
@@ -286,6 +287,10 @@
 
 }
 
+/**
+* install name lsa into lsdb
+*/
+
 void 
 install_name_lsa(struct nlsa *name_lsa)
 {
@@ -628,6 +633,10 @@
 		free(key);
 }
 
+/**
+* Write log for name LSA
+*/
+
 void 
 write_log_for_name_lsa(struct nlsa *name_lsa)
 {
@@ -697,9 +706,14 @@
 		writeLogg(__FILE__,__FUNCTION__,__LINE__,"\n");
 }
 
+/**
+* Build and install name LSA by the parameter provided
+*/
+
 
 void
-build_and_install_others_name_lsa(char *orig_router,int ls_type,long int ls_id,char *orig_time, int isValid,char *np)
+build_and_install_others_name_lsa(char *orig_router,int ls_type,long int ls_id,
+										char *orig_time, int isValid,char *np)
 {
 	if ( nlsr->debugging )
 		printf("build_and_install_others_name_lsa called \n");
@@ -717,8 +731,13 @@
 	
 }
 
+/**
+* Build name LSA by the parameter provided
+*/
+
 void
-build_others_name_lsa(struct nlsa *name_lsa, char *orig_router,int ls_type,long int ls_id,char *orig_time, int isValid,char *np)
+build_others_name_lsa(struct nlsa *name_lsa, char *orig_router,int ls_type,long 
+								int ls_id,char *orig_time, int isValid,char *np)
 {
 	if ( nlsr->debugging )
 		printf("build_others_name_lsa called\n");
@@ -1055,7 +1074,6 @@
 {
 	int i=0;
 	char *lsa_data=(char *)calloc(strlen(body)+1,sizeof(char));
-	//memset(	lsa_data,0,strlen(body)+1);
 	memcpy(lsa_data,body,strlen(body)+1);
 	char *sep="|";
 	char *rem;
@@ -2161,15 +2179,15 @@
 	if ( nlsr->debugging )
 		printf("Adj LSA Data: %s \n",ccn_charbuf_as_string(lsa_data));
 
-	char *data;//=calloc(strlen(ccn_charbuf_as_string(lsa_data))+1,sizeof(char));
-	data=ccn_charbuf_as_string(lsa_data);
-	data[strlen(data)]='\0';
+	//char *data;
+	//data=ccn_charbuf_as_string(lsa_data);
+	//data[strlen(data)]='\0';
 
-	write_data_to_repo(data, repo_content_prefix);
+	//write_data_to_repo(data, repo_content_prefix);
 
+	write_data_to_repo(ccn_charbuf_as_string(lsa_data), repo_content_prefix);
 
-	//ccn_charbuf_destroy(&lsa_data);
-	//free(data);
+	ccn_charbuf_destroy(&lsa_data);
 }
 
 void
@@ -2186,14 +2204,15 @@
 	if ( nlsr->debugging )
 		printf("Name LSA Data: %s \n",ccn_charbuf_as_string(lsa_data));	
 
-	char *data;//=calloc(strlen(ccn_charbuf_as_string(lsa_data))+1,sizeof(char));
-	data=ccn_charbuf_as_string(lsa_data);
-	data[strlen(data)]='\0';
+	//char *data;
+	//data=ccn_charbuf_as_string(lsa_data);
+	//data[strlen(data)]='\0';
 
-	write_data_to_repo(data, repo_content_prefix);
+	//write_data_to_repo(data, repo_content_prefix);
 
-	//ccn_charbuf_destroy(&lsa_data);
-	//free(data);
+	write_data_to_repo(ccn_charbuf_as_string(lsa_data), repo_content_prefix);
+
+	ccn_charbuf_destroy(&lsa_data);
 }
 
 
@@ -2540,11 +2559,13 @@
 	if ( nlsr->debugging )
 		printf("Cor LSA Repo Key: %s \n",repo_key);	
 
-	char *data;//=calloc(strlen(ccn_charbuf_as_string(lsa_data))+1,sizeof(char));
-	data=ccn_charbuf_as_string(lsa_data);
-	data[strlen(data)]='\0';
+	//char *data;
+	//data=ccn_charbuf_as_string(lsa_data);
+	//data[strlen(data)]='\0';
 
-	write_data_to_repo(data, repo_key);
+	//write_data_to_repo(data, repo_content_prefix);
+
+	write_data_to_repo(ccn_charbuf_as_string(lsa_data), repo_key);
 
 
 	
@@ -2552,8 +2573,7 @@
 	free(lst);
 	free(key);
 	free(repo_key);
-	//free(data);
-	//ccn_charbuf_destroy(&lsa_data);
+	ccn_charbuf_destroy(&lsa_data);
 }
 
 void 
diff --git a/nlsr_sync.c b/nlsr_sync.c
index 53effdd..70e0b0d 100644
--- a/nlsr_sync.c
+++ b/nlsr_sync.c
@@ -47,6 +47,12 @@
 	return(r);
 }
 
+/**
+* call back function from sync. Receive notification of updates in sync.
+* This function calls process_content_from_sync to handle incoming content
+* from sync.
+*/
+
 int
 sync_cb(struct ccns_name_closure *nc,
 		struct ccn_charbuf *lhash,
@@ -119,6 +125,9 @@
 }
 
 
+/**
+* this function retrieve part of name from interest name and put it in name_part
+*/
 
 void
 get_name_part(struct name_prefix *name_part,struct ccn_charbuf * interest_ccnb, 
@@ -159,7 +168,9 @@
 }
 
 
-
+/**
+* Get content value by content name and put the content value in content_data
+*/
 
 
 int 
@@ -267,6 +278,10 @@
 	return ret;   
 }
 
+/**
+* Handle incoming lsa content, Calls functions to install lsa into lsdb
+*/
+
 void 
 process_incoming_sync_content_lsa( unsigned char *content_data)
 {
@@ -381,6 +396,11 @@
 	}
 }
 
+/**
+* Check LSA whether its new. If new retrieve the LSA content and call 
+* process_incoming_sync_content_lsa with content_data
+*/
+
 void
 process_content_from_sync (struct ccn_charbuf *content_name, 
 								struct ccn_indexbuf *components)
@@ -619,6 +639,9 @@
 		}
 	}
 
+	if(content_data)
+		free(content_data);
+
 	if (orig_router->name)
 		free(orig_router->name);
 	if (orig_router)
@@ -628,7 +651,12 @@
 	free(time_stamp);
 }
 
-	int
+/**
+* This function performs same functionality as ccnsyncwatch
+*/
+
+
+int
 sync_monitor(char *topo_prefix, char *slice_prefix)
 {
 
@@ -669,7 +697,12 @@
 	return(templ);
 }
 
-	int
+/**
+* Write signed data to repo
+*/
+
+
+int
 write_data_to_repo(char *data, char *name_prefix)
 {
 
@@ -743,22 +776,18 @@
 										nlsr->router_name);	
 
 
-	//blockread = 0;
-	//blockread=strlen(data)+1;
 	blockread=resultbuf->length;
 
 	if (blockread > 0) {
-		//res = ccn_seqw_write(w, data, blockread);
 		res = ccn_seqw_write(w, resultbuf->buf, resultbuf->length);	
 		while (res == -1) {
-			ccn_run(temp_ccn,100);
-			//res = ccn_seqw_write(w, data, blockread);
+			ccn_run(temp_ccn,1);
 			res = ccn_seqw_write(w, resultbuf->buf, resultbuf->length);	
 		}
 	}
 
 	ccn_seqw_close(w);
-	ccn_run(temp_ccn, 100);
+	ccn_run(temp_ccn, 1);
 	ccn_charbuf_destroy(&name);
 	ccn_destroy(&temp_ccn);
 	ccn_charbuf_destroy(&resultbuf);
@@ -766,8 +795,14 @@
 	nlsr_unlock();
 	return 0;
 }
-	int
-	create_sync_slice(char *topo_prefix, char *slice_prefix)
+
+/**
+*	Create slice for sync/repo
+*/
+
+
+int
+create_sync_slice(char *topo_prefix, char *slice_prefix)
 {
 	int res;
 	struct ccn *handle; 
