diff --git a/nlsr_conf_processor.cpp b/nlsr_conf_processor.cpp
index 5f80b29..691a285 100644
--- a/nlsr_conf_processor.cpp
+++ b/nlsr_conf_processor.cpp
@@ -108,7 +108,7 @@
 		if(command[0] == '/' ){
 			command.erase(0,1);
 		}
-		pnlsr.confParam.setNetwork(command);
+		pnlsr.getConfParameter().setNetwork(command);
 	}
 	return 0;
 }
@@ -125,7 +125,7 @@
 		if(command[0] == '/' ){
 			command.erase(0,1);
 		}
-		pnlsr.confParam.setSiteName(command);
+		pnlsr.getConfParameter().setSiteName(command);
 	}
 	return 0;
 }
@@ -142,7 +142,7 @@
 		if(command[0] == '/' ){
 			command.erase(0,1);
 		}
-		pnlsr.confParam.setRouterName(command);
+		pnlsr.getConfParameter().setRouterName(command);
 	}
 	return 0;
 }
@@ -156,7 +156,7 @@
 		stringstream ss(command.c_str());
 		ss>>irn;
 		if ( irn >=1 && irn <=5){
-			pnlsr.confParam.setInterestRetryNumber(irn);
+			pnlsr.getConfParameter().setInterestRetryNumber(irn);
 		}
 	}
 	return 0;
@@ -171,7 +171,7 @@
 		stringstream ss(command.c_str());
 		ss>>irt;
 		if( irt>=1 && irt <=20){
-			pnlsr.confParam.setInterestResendTime(irt);
+			pnlsr.getConfParameter().setInterestResendTime(irt);
 		}
 	}
 	return 0;
@@ -186,7 +186,7 @@
 		stringstream ss(command.c_str());
 		ss>>lrt;
 		if ( lrt>= 240 && lrt<=7200){
-			pnlsr.confParam.setLsaRefreshTime(lrt);
+			pnlsr.getConfParameter().setLsaRefreshTime(lrt);
 		}
 	}
 	return 0;
@@ -201,7 +201,7 @@
 		stringstream ss(command.c_str());
 		ss>>mfpp;
 		if ( mfpp>=0 && mfpp<=60){
-			pnlsr.confParam.setMaxFacesPerPrefix(mfpp);
+			pnlsr.getConfParameter().setMaxFacesPerPrefix(mfpp);
 		}
 	}
 	return 0;
@@ -213,10 +213,10 @@
 		cerr <<" Wrong command format ! [tunnel-type tcp/udp]!"<<endl;
 	}else{
 		if(command == "tcp" || command == "TCP" ){
-			pnlsr.confParam.setTunnelType(1);
+			pnlsr.getConfParameter().setTunnelType(1);
 		}
 		else if(command == "udp" || command == "UDP"){
-			pnlsr.confParam.setTunnelType(0);
+			pnlsr.getConfParameter().setTunnelType(0);
 		}else{
 			cerr <<" Wrong command format ! [tunnel-type tcp/udp]!"<<endl;
 		}
@@ -230,7 +230,7 @@
 	if(command.empty() ){
 		cerr <<" Wrong command format ! [chronosync-sync-prefix name/prefix]!"<<endl;
 	}else{
-		pnlsr.confParam.setChronosyncSyncPrefix(command);
+		pnlsr.getConfParameter().setChronosyncSyncPrefix(command);
 	}
 	return 0;
 }
@@ -241,7 +241,7 @@
 	if(command.empty() ){
 		cerr <<" Wrong command format ! [log-dir /path/to/log/dir]!"<<endl;
 	}else{
-		pnlsr.confParam.setLogDir(command);
+		pnlsr.getConfParameter().setLogDir(command);
 	}
 	return 0;
 }
@@ -252,10 +252,10 @@
 		cerr <<" Wrong command format ! [debugging on/of]!"<<endl;
 	}else{
 		if(command == "on" || command == "ON" ){
-			pnlsr.confParam.setDebugging(1);
+			pnlsr.getConfParameter().setDebugging(1);
 		}
 		else if(command == "off" || command == "off"){
-			pnlsr.confParam.setDebugging(0);
+			pnlsr.getConfParameter().setDebugging(0);
 		}else{
 			cerr <<" Wrong command format ! [debugging on/off]!"<<endl;
 		}
@@ -269,10 +269,10 @@
 		cerr <<" Wrong command format ! [detailed-logging on/off]!"<<endl;
 	}else{
 		if(command == "on" || command == "ON" ){
-			pnlsr.confParam.setDetailedLogging(1);
+			pnlsr.getConfParameter().setDetailedLogging(1);
 		}
 		else if(command == "off" || command == "off"){
-			pnlsr.confParam.setDetailedLogging(0);
+			pnlsr.getConfParameter().setDetailedLogging(0);
 		}else{
 			cerr <<" Wrong command format ! [detailed-logging on/off]!"<<endl;
 		}
@@ -286,13 +286,13 @@
 		cerr <<" Wrong command format ! [hyperbolic-routing on/off/dry-run]!"<<endl;
 	}else{
 		if(command == "on" || command == "ON" ){
-			pnlsr.confParam.setIsHyperbolicCalc(1);
+			pnlsr.getConfParameter().setIsHyperbolicCalc(1);
 		}
 		else if(command == "dry-run" || command == "DRY-RUN"){
-			pnlsr.confParam.setIsHyperbolicCalc(2);
+			pnlsr.getConfParameter().setIsHyperbolicCalc(2);
 		}
 		else if(command == "off" || command == "off"){
-			pnlsr.confParam.setIsHyperbolicCalc(0);
+			pnlsr.getConfParameter().setIsHyperbolicCalc(0);
 		}else{
 			cerr <<" Wrong command format ! [hyperbolic-routing on/off/dry-run]!"<<endl;
 		}
@@ -304,7 +304,7 @@
 ConfFileProcessor::processConfCommandHyperbolicCordinate(nlsr& pnlsr, string command){
 	if(command.empty() ){
 		cerr <<" Wrong command format ! [hyperbolic-cordinate r 0]!"<<endl;
-		if (pnlsr.confParam.getIsHyperbolicCalc() > 0 ){
+		if (pnlsr.getConfParameter().getIsHyperbolicCalc() > 0 ){
 			return -1;
 		}
 	}else{
@@ -316,8 +316,8 @@
 		ssr>>r;
 		sst>>theta;
 		
-		pnlsr.confParam.setCorR(r);
-		pnlsr.confParam.setCorTheta(theta);
+		pnlsr.getConfParameter().setCorR(r);
+		pnlsr.getConfParameter().setCorTheta(theta);
 	}
 	return 0;
 }
@@ -330,7 +330,7 @@
 	}else{
 		nlsrTokenizer nt(command," ");
 		Adjacent adj(nt.getFirstToken(),0,0.0,0,0);
-		pnlsr.adl.insert(adj);
+		pnlsr.getAdl().insert(adj);
 	}
 	return 0;	
 }
@@ -340,7 +340,7 @@
 	if(command.empty() ){
 		cerr <<" Wrong command format ! [ndnname name/prefix]!"<<endl;
 	}else{
-		pnlsr.npl.insertIntoNpl(command);
+		pnlsr.getNpl().insertIntoNpl(command);
 	}
 	return 0;
 }
@@ -350,7 +350,7 @@
 ConfFileProcessor::processConfCommandLinkCost(nlsr& pnlsr, string command){
 	if(command.empty() ){
 		cerr <<" Wrong command format ! [link-cost nbr/name cost]!"<<endl;
-		if (pnlsr.confParam.getIsHyperbolicCalc() > 0 ){
+		if (pnlsr.getConfParameter().getIsHyperbolicCalc() > 0 ){
 			return -1;
 		}
 	}else{
@@ -360,7 +360,7 @@
 		double cost;
 		sst>>cost;
 		
-		pnlsr.adl.updateAdjacentLinkCost(nt.getFirstToken(),cost);
+		pnlsr.getAdl().updateAdjacentLinkCost(nt.getFirstToken(),cost);
 	}
 	return 0;
 }
