diff --git a/src/adl.cpp b/src/adjacency-list.cpp
similarity index 78%
rename from src/adl.cpp
rename to src/adjacency-list.cpp
index 605cbd6..7f21a80 100644
--- a/src/adl.cpp
+++ b/src/adjacency-list.cpp
@@ -1,18 +1,18 @@
 #include <iostream>
 #include <algorithm>
 
-#include "adl.hpp"
+#include "adjacency-list.hpp"
 #include "adjacent.hpp"
 #include "nlsr.hpp"
 
 
 namespace nlsr {
 
-Adl::Adl()
+AdjacencyList::AdjacencyList()
 {
 }
 
-Adl::~Adl()
+AdjacencyList::~AdjacencyList()
 {
 }
 
@@ -23,7 +23,7 @@
 }
 
 int
-Adl::insert(Adjacent& adj)
+AdjacencyList::insert(Adjacent& adj)
 {
   std::list<Adjacent>::iterator it = find(adj.getName());
   if (it != m_adjList.end())
@@ -35,7 +35,7 @@
 }
 
 void
-Adl::addAdjacentsFromAdl(Adl& adl)
+AdjacencyList::addAdjacentsFromAdl(AdjacencyList& adl)
 {
   for (std::list<Adjacent>::iterator it = adl.getAdjList().begin();
        it != adl.getAdjList().end(); ++it)
@@ -45,7 +45,7 @@
 }
 
 int
-Adl::updateAdjacentStatus(const string& adjName, int s)
+AdjacencyList::updateAdjacentStatus(const string& adjName, int s)
 {
   std::list<Adjacent>::iterator it = find(adjName);
   if (it == m_adjList.end())
@@ -57,7 +57,7 @@
 }
 
 Adjacent
-Adl::getAdjacent(const string& adjName)
+AdjacencyList::getAdjacent(const string& adjName)
 {
   Adjacent adj(adjName);
   std::list<Adjacent>::iterator it = find(adjName);
@@ -70,7 +70,7 @@
 
 
 bool
-Adl::isEqual(Adl& adl)
+AdjacencyList::isEqual(AdjacencyList& adl)
 {
   if (getSize() != adl.getSize())
   {
@@ -96,7 +96,7 @@
 
 
 int
-Adl::updateAdjacentLinkCost(const string& adjName, double lc)
+AdjacencyList::updateAdjacentLinkCost(const string& adjName, double lc)
 {
   std::list<Adjacent>::iterator it = find(adjName);
   if (it == m_adjList.end())
@@ -108,7 +108,7 @@
 }
 
 bool
-Adl::isNeighbor(const string& adjName)
+AdjacencyList::isNeighbor(const string& adjName)
 {
   std::list<Adjacent>::iterator it = find(adjName);
   if (it == m_adjList.end())
@@ -119,7 +119,7 @@
 }
 
 void
-Adl::incrementTimedOutInterestCount(const string& neighbor)
+AdjacencyList::incrementTimedOutInterestCount(const string& neighbor)
 {
   std::list<Adjacent>::iterator it = find(neighbor);
   if (it == m_adjList.end())
@@ -130,7 +130,7 @@
 }
 
 void
-Adl::setTimedOutInterestCount(const string& neighbor, int count)
+AdjacencyList::setTimedOutInterestCount(const string& neighbor, int count)
 {
   std::list<Adjacent>::iterator it = find(neighbor);
   if (it != m_adjList.end())
@@ -140,7 +140,7 @@
 }
 
 int
-Adl::getTimedOutInterestCount(const string& neighbor)
+AdjacencyList::getTimedOutInterestCount(const string& neighbor)
 {
   std::list<Adjacent>::iterator it = find(neighbor);
   if (it == m_adjList.end())
@@ -151,7 +151,7 @@
 }
 
 int
-Adl::getStatusOfNeighbor(const string& neighbor)
+AdjacencyList::getStatusOfNeighbor(const string& neighbor)
 {
   std::list<Adjacent>::iterator it = find(neighbor);
   if (it == m_adjList.end())
@@ -162,7 +162,7 @@
 }
 
 void
-Adl::setStatusOfNeighbor(const string& neighbor, int status)
+AdjacencyList::setStatusOfNeighbor(const string& neighbor, int status)
 {
   std::list<Adjacent>::iterator it = find(neighbor);
   if (it != m_adjList.end())
@@ -172,13 +172,13 @@
 }
 
 std::list<Adjacent>&
-Adl::getAdjList()
+AdjacencyList::getAdjList()
 {
   return m_adjList;
 }
 
 bool
-Adl::isAdjLsaBuildable(Nlsr& pnlsr)
+AdjacencyList::isAdjLsaBuildable(Nlsr& pnlsr)
 {
   uint32_t nbrCount = 0;
   for (std::list<Adjacent>::iterator it = m_adjList.begin();
@@ -205,7 +205,7 @@
 }
 
 int
-Adl::getNumOfActiveNeighbor()
+AdjacencyList::getNumOfActiveNeighbor()
 {
   int actNbrCount = 0;
   for (std::list<Adjacent>::iterator it = m_adjList.begin();
@@ -220,7 +220,7 @@
 }
 
 std::list<Adjacent>::iterator
-Adl::find(std::string adjName)
+AdjacencyList::find(std::string adjName)
 {
   Adjacent adj(adjName);
   std::list<Adjacent>::iterator it = std::find_if(m_adjList.begin(),
@@ -231,7 +231,7 @@
 
 // used for debugging purpose
 void
-Adl::printAdl()
+AdjacencyList::print()
 {
   for (std::list<Adjacent>::iterator it = m_adjList.begin();
        it != m_adjList.end(); it++)
diff --git a/src/adl.hpp b/src/adjacency-list.hpp
similarity index 86%
rename from src/adl.hpp
rename to src/adjacency-list.hpp
index 76f9280..45123df 100644
--- a/src/adl.hpp
+++ b/src/adjacency-list.hpp
@@ -1,19 +1,20 @@
 #ifndef NLSR_ADL_HPP
 #define NLSR_ADL_HPP
 
-#include <ndn-cpp-dev/face.hpp>
-#include "adjacent.hpp"
+#include <ndn-cxx/common.hpp>
 #include <list>
 
+#include "adjacent.hpp"
+
 namespace nlsr {
 class Nlsr;
 
-class Adl
+class AdjacencyList
 {
 
 public:
-  Adl();
-  ~Adl();
+  AdjacencyList();
+  ~AdjacencyList();
 
   int
   insert(Adjacent& adj);
@@ -46,7 +47,7 @@
   setTimedOutInterestCount(const std::string& neighbor, int count);
 
   void
-  addAdjacentsFromAdl(Adl& adl);
+  addAdjacentsFromAdl(AdjacencyList& adl);
 
   bool
   isAdjLsaBuildable(Nlsr& pnlsr);
@@ -58,7 +59,7 @@
   getAdjacent(const std::string& adjName);
 
   bool
-  isEqual(Adl& adl);
+  isEqual(AdjacencyList& adl);
 
   int
   getSize()
@@ -76,7 +77,7 @@
   }
 
   void
-  printAdl();
+  print();
 
 private:
   std::list<Adjacent>::iterator
diff --git a/src/adjacent.cpp b/src/adjacent.cpp
index 807eb0b..3212c1e 100644
--- a/src/adjacent.cpp
+++ b/src/adjacent.cpp
@@ -2,6 +2,7 @@
 #include <string>
 #include <cmath>
 #include <limits>
+
 #include "adjacent.hpp"
 
 namespace nlsr {
diff --git a/src/communication/data-manager.cpp b/src/communication/data-manager.cpp
index f56dd79..8525ce7 100644
--- a/src/communication/data-manager.cpp
+++ b/src/communication/data-manager.cpp
@@ -1,9 +1,9 @@
 #include <iostream>
 #include <cstdlib>
 
-#include <ndn-cpp-dev/security/signature-sha256-with-rsa.hpp>
-#include <ndn-cpp-dev/security/identity-certificate.hpp>
-#include <ndn-cpp-dev/util/io.hpp>
+#include <ndn-cxx/security/signature-sha256-with-rsa.hpp>
+#include <ndn-cxx/security/identity-certificate.hpp>
+#include <ndn-cxx/util/io.hpp>
 
 #include "nlsr.hpp"
 #include "data-manager.hpp"
@@ -60,18 +60,20 @@
   Tokenizer nt(dataName, "/");
   string chkString("info");
   string neighbor = nt.getTokenString(0, nt.getTokenPosition(chkString) - 1);
-  int oldStatus = m_nlsr.getAdl().getStatusOfNeighbor(neighbor);
-  int infoIntTimedOutCount = m_nlsr.getAdl().getTimedOutInterestCount(neighbor);
+  int oldStatus = m_nlsr.getAdjacencyList().getStatusOfNeighbor(neighbor);
+  int infoIntTimedOutCount = m_nlsr.getAdjacencyList().getTimedOutInterestCount(
+                               neighbor);
   //debugging purpose start
   std::cout << "Before Updates: " << std::endl;
   std::cout << "Neighbor : " << neighbor << std::endl;
   std::cout << "Status: " << oldStatus << std::endl;
   std::cout << "Info Interest Timed out: " << infoIntTimedOutCount << std::endl;
   //debugging purpose end
-  m_nlsr.getAdl().setStatusOfNeighbor(neighbor, 1);
-  m_nlsr.getAdl().setTimedOutInterestCount(neighbor, 0);
-  int newStatus = m_nlsr.getAdl().getStatusOfNeighbor(neighbor);
-  infoIntTimedOutCount = m_nlsr.getAdl().getTimedOutInterestCount(neighbor);
+  m_nlsr.getAdjacencyList().setStatusOfNeighbor(neighbor, 1);
+  m_nlsr.getAdjacencyList().setTimedOutInterestCount(neighbor, 0);
+  int newStatus = m_nlsr.getAdjacencyList().getStatusOfNeighbor(neighbor);
+  infoIntTimedOutCount = m_nlsr.getAdjacencyList().getTimedOutInterestCount(
+                           neighbor);
   //debugging purpose
   std::cout << "After Updates: " << std::endl;
   std::cout << "Neighbor : " << neighbor << std::endl;
diff --git a/src/communication/data-manager.hpp b/src/communication/data-manager.hpp
index ece3fca..86c2e42 100644
--- a/src/communication/data-manager.hpp
+++ b/src/communication/data-manager.hpp
@@ -1,9 +1,9 @@
 #ifndef NLSR_DM_HPP
 #define NLSR_DM_HPP
 
-#include <ndn-cpp-dev/face.hpp>
-#include <ndn-cpp-dev/security/key-chain.hpp>
-#include <ndn-cpp-dev/util/scheduler.hpp>
+#include <ndn-cxx/face.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
+#include <ndn-cxx/util/scheduler.hpp>
 
 #include "interest-manager.hpp"
 
diff --git a/src/communication/interest-manager.cpp b/src/communication/interest-manager.cpp
index 070c92b..edcfec7 100644
--- a/src/communication/interest-manager.cpp
+++ b/src/communication/interest-manager.cpp
@@ -2,8 +2,8 @@
 #include <cstdlib>
 
 
-#include <ndn-cpp-dev/security/identity-certificate.hpp>
-#include <ndn-cpp-dev/util/io.hpp>
+#include <ndn-cxx/security/identity-certificate.hpp>
+#include <ndn-cxx/util/io.hpp>
 
 #include "nlsr.hpp"
 #include "interest-manager.hpp"
@@ -47,7 +47,7 @@
 InterestManager::processInterestInfo(const string& neighbor,
                                      const ndn::Interest& interest)
 {
-  if (m_nlsr.getAdl().isNeighbor(neighbor))
+  if (m_nlsr.getAdjacencyList().isNeighbor(neighbor))
   {
     Data data(ndn::Name(interest.getName()).appendVersion());
     data.setFreshnessPeriod(time::seconds(10)); // 10 sec
@@ -56,7 +56,7 @@
     m_keyChain.sign(data);
     cout << ">> D: " << data << endl;
     m_nlsr.getNlsrFace()->put(data);
-    int status = m_nlsr.getAdl().getStatusOfNeighbor(neighbor);
+    int status = m_nlsr.getAdjacencyList().getStatusOfNeighbor(neighbor);
     if (status == 0)
     {
       string intName = neighbor + "/" + "info" +
@@ -256,9 +256,10 @@
 InterestManager::processInterestTimedOutInfo(const string& neighbor,
                                              const ndn::Interest& interest)
 {
-  m_nlsr.getAdl().incrementTimedOutInterestCount(neighbor);
-  int status = m_nlsr.getAdl().getStatusOfNeighbor(neighbor);
-  int infoIntTimedOutCount = m_nlsr.getAdl().getTimedOutInterestCount(neighbor);
+  m_nlsr.getAdjacencyList().incrementTimedOutInterestCount(neighbor);
+  int status = m_nlsr.getAdjacencyList().getStatusOfNeighbor(neighbor);
+  int infoIntTimedOutCount = m_nlsr.getAdjacencyList().getTimedOutInterestCount(
+                               neighbor);
   std::cout << "Neighbor: " << neighbor << std::endl;
   std::cout << "Status: " << status << std::endl;
   std::cout << "Info Interest Timed out: " << infoIntTimedOutCount << std::endl;
@@ -272,7 +273,7 @@
   else if ((status == 1) &&
            (infoIntTimedOutCount == m_nlsr.getConfParameter().getInterestRetryNumber()))
   {
-    m_nlsr.getAdl().setStatusOfNeighbor(neighbor, 0);
+    m_nlsr.getAdjacencyList().setStatusOfNeighbor(neighbor, 0);
     m_nlsr.incrementAdjBuildCount();
     if (m_nlsr.getIsBuildAdjLsaSheduled() == 0)
     {
@@ -301,7 +302,7 @@
   i.setMustBeFresh(true);
   m_nlsr.getNlsrFace()->expressInterest(i,
                                         ndn::bind(&DataManager::processContent,
-                                                  &m_nlsr.getDm(),
+                                                  &m_nlsr.getDataManager(),
                                                   _1, _2, boost::ref(*this)),
                                         ndn::bind(&InterestManager::processInterestTimedOut,
                                                   this, _1));
@@ -311,7 +312,7 @@
 void
 InterestManager::sendScheduledInfoInterest(int seconds)
 {
-  std::list<Adjacent> adjList = m_nlsr.getAdl().getAdjList();
+  std::list<Adjacent> adjList = m_nlsr.getAdjacencyList().getAdjList();
   for (std::list<Adjacent>::iterator it = adjList.begin(); it != adjList.end();
        ++it)
   {
diff --git a/src/communication/interest-manager.hpp b/src/communication/interest-manager.hpp
index 725103d..7fe7655 100644
--- a/src/communication/interest-manager.hpp
+++ b/src/communication/interest-manager.hpp
@@ -1,9 +1,9 @@
 #ifndef NLSR_IM_HPP
 #define NLSR_IM_HPP
 
-#include <ndn-cpp-dev/face.hpp>
-#include <ndn-cpp-dev/security/key-chain.hpp>
-#include <ndn-cpp-dev/util/scheduler.hpp>
+#include <ndn-cxx/face.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
+#include <ndn-cxx/util/scheduler.hpp>
 
 namespace nlsr {
 
diff --git a/src/communication/sync-logic-handler.cpp b/src/communication/sync-logic-handler.cpp
index 16b92bc..51ec319 100644
--- a/src/communication/sync-logic-handler.cpp
+++ b/src/communication/sync-logic-handler.cpp
@@ -81,8 +81,8 @@
         pnlsr.getConfParameter().getChronosyncLsaPrefix() +
         routerName + "/1/" +
         boost::lexical_cast<std::string>(sm.getNameLsaSeq());
-      pnlsr.getIm().expressInterest(lsaPrefix, 3,
-                                    pnlsr.getConfParameter().getInterestResendTime());
+      pnlsr.getInterestManager().expressInterest(lsaPrefix, 3,
+                                                 pnlsr.getConfParameter().getInterestResendTime());
     }
     if (pnlsr.getLsdb().isAdjLsaNew(routerName + "/2", sm.getAdjLsaSeq()))
     {
@@ -91,8 +91,8 @@
         pnlsr.getConfParameter().getChronosyncLsaPrefix() +
         routerName + "/2/" +
         boost::lexical_cast<std::string>(sm.getAdjLsaSeq());
-      pnlsr.getIm().expressInterest(lsaPrefix, 3,
-                                    pnlsr.getConfParameter().getInterestResendTime());
+      pnlsr.getInterestManager().expressInterest(lsaPrefix, 3,
+                                                 pnlsr.getConfParameter().getInterestResendTime());
     }
     if (pnlsr.getLsdb().isCoordinateLsaNew(routerName + "/3", sm.getCorLsaSeq()))
     {
@@ -101,8 +101,8 @@
         pnlsr.getConfParameter().getChronosyncLsaPrefix() +
         routerName + "/3/" +
         boost::lexical_cast<std::string>(sm.getCorLsaSeq());
-      pnlsr.getIm().expressInterest(lsaPrefix, 3,
-                                    pnlsr.getConfParameter().getInterestResendTime());
+      pnlsr.getInterestManager().expressInterest(lsaPrefix, 3,
+                                                 pnlsr.getConfParameter().getInterestResendTime());
     }
   }
 }
diff --git a/src/communication/sync-logic-handler.hpp b/src/communication/sync-logic-handler.hpp
index 05123ff..1896484 100644
--- a/src/communication/sync-logic-handler.hpp
+++ b/src/communication/sync-logic-handler.hpp
@@ -3,10 +3,10 @@
 
 #include <iostream>
 
-#include <ndn-cpp-dev/face.hpp>
+#include <ndn-cxx/face.hpp>
 #include <nsync/sync-socket.h>
-#include <ndn-cpp-dev/security/validator-null.hpp>
-#include <ndn-cpp-dev/util/scheduler.hpp>
+#include <ndn-cxx/security/validator-null.hpp>
+#include <ndn-cxx/util/scheduler.hpp>
 
 #include "sequencing-manager.hpp"
 
diff --git a/src/conf-file-processor.cpp b/src/conf-file-processor.cpp
index eac9db6..fcb8d33 100644
--- a/src/conf-file-processor.cpp
+++ b/src/conf-file-processor.cpp
@@ -504,7 +504,7 @@
       int faceId;
       sst >> faceId;
       Adjacent adj(nt.getFirstToken(), faceId, 0.0, 0, 0);
-      m_nlsr.getAdl().insert(adj);
+      m_nlsr.getAdjacencyList().insert(adj);
     }
   }
   return 0;
@@ -519,7 +519,7 @@
   }
   else
   {
-    m_nlsr.getNpl().insert(command);
+    m_nlsr.getNamePrefixList().insert(command);
   }
   return 0;
 }
@@ -542,7 +542,7 @@
     stringstream sst(nt.getRestOfLine().c_str());
     double cost;
     sst >> cost;
-    m_nlsr.getAdl().updateAdjacentLinkCost(nt.getFirstToken(), cost);
+    m_nlsr.getAdjacencyList().updateAdjacentLinkCost(nt.getFirstToken(), cost);
   }
   return 0;
 }
diff --git a/src/lsa.cpp b/src/lsa.cpp
index e2b6dcf..dac54a2 100644
--- a/src/lsa.cpp
+++ b/src/lsa.cpp
@@ -7,7 +7,7 @@
 
 #include "nlsr.hpp"
 #include "lsa.hpp"
-#include "npl.hpp"
+#include "name-prefix-list.hpp"
 #include "adjacent.hpp"
 #include "utility/tokenizer.hpp"
 
@@ -25,7 +25,8 @@
   return key;
 }
 
-NameLsa::NameLsa(string origR, uint8_t lst, uint32_t lsn, uint32_t lt, Npl npl)
+NameLsa::NameLsa(string origR, uint8_t lst, uint32_t lsn, uint32_t lt,
+                 NamePrefixList npl)
 {
   m_origRouter = origR;
   m_lsType = lst;
@@ -191,14 +192,14 @@
 
 
 AdjLsa::AdjLsa(string origR, uint8_t lst, uint32_t lsn, uint32_t lt,
-               uint32_t nl , Adl padl)
+               uint32_t nl , AdjacencyList adl)
 {
   m_origRouter = origR;
   m_lsType = lst;
   m_lsSeqNo = lsn;
   m_lifeTime = lt;
   m_noLink = nl;
-  std::list<Adjacent> al = padl.getAdjList();
+  std::list<Adjacent> al = adl.getAdjList();
   for (std::list<Adjacent>::iterator it = al.begin(); it != al.end(); it++)
   {
     if ((*it).getStatus() == 1)
@@ -290,7 +291,8 @@
 {
   if (getOrigRouter() != pnlsr.getConfParameter().getRouterPrefix())
   {
-    pnlsr.getNpt().addNpteByDestName(getOrigRouter(), getOrigRouter(), pnlsr);
+    pnlsr.getNamePrefixTable().addNpteByDestName(getOrigRouter(), getOrigRouter(),
+                                                 pnlsr);
   }
 }
 
@@ -300,7 +302,7 @@
 {
   if (getOrigRouter() != pnlsr.getConfParameter().getRouterPrefix())
   {
-    pnlsr.getNpt().removeNpte(getOrigRouter(), getOrigRouter(), pnlsr);
+    pnlsr.getNamePrefixTable().removeNpte(getOrigRouter(), getOrigRouter(), pnlsr);
   }
 }
 
diff --git a/src/lsa.hpp b/src/lsa.hpp
index c795159..1db70d7 100644
--- a/src/lsa.hpp
+++ b/src/lsa.hpp
@@ -1,10 +1,10 @@
 #ifndef NLSR_LSA_HPP
 #define NLSR_LSA_HPP
 
-#include <ndn-cpp-dev/util/scheduler.hpp>
+#include <ndn-cxx/util/scheduler.hpp>
 #include "adjacent.hpp"
-#include "npl.hpp"
-#include "adl.hpp"
+#include "name-prefix-list.hpp"
+#include "adjacency-list.hpp"
 
 namespace nlsr {
 class Lsa
@@ -97,9 +97,10 @@
     setLsType(1);
   }
 
-  NameLsa(std::string origR, uint8_t lst, uint32_t lsn, uint32_t lt, Npl npl);
+  NameLsa(std::string origR, uint8_t lst, uint32_t lsn, uint32_t lt,
+          NamePrefixList npl);
 
-  Npl&
+  NamePrefixList&
   getNpl()
   {
     return m_npl;
@@ -130,7 +131,7 @@
   writeLog();
 
 private:
-  Npl m_npl;
+  NamePrefixList m_npl;
 
 };
 
@@ -148,9 +149,9 @@
   }
 
   AdjLsa(std::string origR, uint8_t lst, uint32_t lsn, uint32_t lt,
-         uint32_t nl , Adl padl);
+         uint32_t nl , AdjacencyList adl);
 
-  Adl&
+  AdjacencyList&
   getAdl()
   {
     return m_adl;
@@ -188,7 +189,7 @@
 
 private:
   uint32_t m_noLink;
-  Adl m_adl;
+  AdjacencyList m_adl;
 };
 
 std::ostream&
diff --git a/src/lsdb.cpp b/src/lsdb.cpp
index e4bbb4f..a96cecb 100644
--- a/src/lsdb.cpp
+++ b/src/lsdb.cpp
@@ -25,10 +25,11 @@
 {
   NameLsa nameLsa(pnlsr.getConfParameter().getRouterPrefix()
                   , 1
-                  , pnlsr.getSm().getNameLsaSeq() + 1
+                  , pnlsr.getSequencingManager().getNameLsaSeq() + 1
                   , pnlsr.getConfParameter().getRouterDeadInterval()
-                  , pnlsr.getNpl());
-  pnlsr.getSm().setNameLsaSeq(pnlsr.getSm().getNameLsaSeq() + 1);
+                  , pnlsr.getNamePrefixList());
+  pnlsr.getSequencingManager().setNameLsaSeq(
+    pnlsr.getSequencingManager().getNameLsaSeq() + 1);
   return installNameLsa(pnlsr, nameLsa);
 }
 
@@ -83,15 +84,17 @@
     printNameLsdb();
     if (nlsa.getOrigRouter() != pnlsr.getConfParameter().getRouterPrefix())
     {
-      pnlsr.getNpt().addNpteByDestName(nlsa.getOrigRouter(), nlsa.getOrigRouter(),
-                                       pnlsr);
+      pnlsr.getNamePrefixTable().addNpteByDestName(nlsa.getOrigRouter(),
+                                                   nlsa.getOrigRouter(),
+                                                   pnlsr);
       std::list<string> nameList = nlsa.getNpl().getNameList();
       for (std::list<string>::iterator it = nameList.begin(); it != nameList.end();
            it++)
       {
         if ((*it) != pnlsr.getConfParameter().getRouterPrefix())
         {
-          pnlsr.getNpt().addNpteByDestName((*it), nlsa.getOrigRouter(), pnlsr);
+          pnlsr.getNamePrefixTable().addNpteByDestName((*it), nlsa.getOrigRouter(),
+                                                       pnlsr);
         }
       }
     }
@@ -127,7 +130,8 @@
         {
           if ((*it) != pnlsr.getConfParameter().getRouterPrefix())
           {
-            pnlsr.getNpt().addNpteByDestName((*it), nlsa.getOrigRouter(), pnlsr);
+            pnlsr.getNamePrefixTable().addNpteByDestName((*it), nlsa.getOrigRouter(),
+                                                         pnlsr);
           }
         }
       }
@@ -145,7 +149,7 @@
         {
           if ((*it) != pnlsr.getConfParameter().getRouterPrefix())
           {
-            pnlsr.getNpt().removeNpte((*it), nlsa.getOrigRouter(), pnlsr);
+            pnlsr.getNamePrefixTable().removeNpte((*it), nlsa.getOrigRouter(), pnlsr);
           }
         }
       }
@@ -191,13 +195,14 @@
     (*it).writeLog();
     if ((*it).getOrigRouter() != pnlsr.getConfParameter().getRouterPrefix())
     {
-      pnlsr.getNpt().removeNpte((*it).getOrigRouter(), (*it).getOrigRouter(), pnlsr);
+      pnlsr.getNamePrefixTable().removeNpte((*it).getOrigRouter(),
+                                            (*it).getOrigRouter(), pnlsr);
       for (std::list<string>::iterator nit = (*it).getNpl().getNameList().begin();
            nit != (*it).getNpl().getNameList().end(); ++nit)
       {
         if ((*nit) != pnlsr.getConfParameter().getRouterPrefix())
         {
-          pnlsr.getNpt().removeNpte((*nit), (*it).getOrigRouter(), pnlsr);
+          pnlsr.getNamePrefixTable().removeNpte((*nit), (*it).getOrigRouter(), pnlsr);
         }
       }
     }
@@ -245,11 +250,12 @@
 {
   CoordinateLsa corLsa(pnlsr.getConfParameter().getRouterPrefix()
                        , 3
-                       , pnlsr.getSm().getCorLsaSeq() + 1
+                       , pnlsr.getSequencingManager().getCorLsaSeq() + 1
                        , pnlsr.getConfParameter().getRouterDeadInterval()
                        , pnlsr.getConfParameter().getCorR()
                        , pnlsr.getConfParameter().getCorTheta());
-  pnlsr.getSm().setCorLsaSeq(pnlsr.getSm().getCorLsaSeq() + 1);
+  pnlsr.getSequencingManager().setCorLsaSeq(
+    pnlsr.getSequencingManager().getCorLsaSeq() + 1);
   installCoordinateLsa(pnlsr, corLsa);
   return true;
 }
@@ -306,8 +312,9 @@
     printCorLsdb(); //debugging purpose
     if (clsa.getOrigRouter() != pnlsr.getConfParameter().getRouterPrefix())
     {
-      pnlsr.getNpt().addNpteByDestName(clsa.getOrigRouter(), clsa.getOrigRouter(),
-                                       pnlsr);
+      pnlsr.getNamePrefixTable().addNpteByDestName(clsa.getOrigRouter(),
+                                                   clsa.getOrigRouter(),
+                                                   pnlsr);
     }
     if (pnlsr.getConfParameter().getIsHyperbolicCalc() >= 1)
     {
@@ -375,7 +382,8 @@
   {
     if ((*it).getOrigRouter() != pnlsr.getConfParameter().getRouterPrefix())
     {
-      pnlsr.getNpt().removeNpte((*it).getOrigRouter(), (*it).getOrigRouter(), pnlsr);
+      pnlsr.getNamePrefixTable().removeNpte((*it).getOrigRouter(),
+                                            (*it).getOrigRouter(), pnlsr);
     }
     m_corLsdb.erase(it);
     return true;
@@ -422,12 +430,12 @@
 {
   cout << "scheduledAdjLsaBuild Called" << endl;
   pnlsr.setIsBuildAdjLsaSheduled(0);
-  if (pnlsr.getAdl().isAdjLsaBuildable(pnlsr))
+  if (pnlsr.getAdjacencyList().isAdjLsaBuildable(pnlsr))
   {
     int adjBuildCount = pnlsr.getAdjBuildCount();
     if (adjBuildCount > 0)
     {
-      if (pnlsr.getAdl().getNumOfActiveNeighbor() > 0)
+      if (pnlsr.getAdjacencyList().getNumOfActiveNeighbor() > 0)
       {
         buildAndInstallOwnAdjLsa(pnlsr);
       }
@@ -557,14 +565,16 @@
 {
   AdjLsa adjLsa(pnlsr.getConfParameter().getRouterPrefix()
                 , 2
-                , pnlsr.getSm().getAdjLsaSeq() + 1
+                , pnlsr.getSequencingManager().getAdjLsaSeq() + 1
                 , pnlsr.getConfParameter().getRouterDeadInterval()
-                , pnlsr.getAdl().getNumOfActiveNeighbor()
-                , pnlsr.getAdl());
-  pnlsr.getSm().setAdjLsaSeq(pnlsr.getSm().getAdjLsaSeq() + 1);
+                , pnlsr.getAdjacencyList().getNumOfActiveNeighbor()
+                , pnlsr.getAdjacencyList());
+  pnlsr.getSequencingManager().setAdjLsaSeq(
+    pnlsr.getSequencingManager().getAdjLsaSeq() + 1);
   string lsaPrefix = pnlsr.getConfParameter().getChronosyncLsaPrefix()
                      + pnlsr.getConfParameter().getRouterPrefix();
-  pnlsr.getSlh().publishRoutingUpdate(pnlsr.getSm(), lsaPrefix);
+  pnlsr.getSyncLogicHandler().publishRoutingUpdate(pnlsr.getSequencingManager(),
+                                                   lsaPrefix);
   return pnlsr.getLsdb().installAdjLsa(pnlsr, adjLsa);
 }
 
@@ -630,12 +640,13 @@
         chkNameLsa->writeLog();
         cout << "Own Name LSA, so refreshing name LSA" << endl;
         chkNameLsa->setLsSeqNo(chkNameLsa->getLsSeqNo() + 1);
-        pnlsr.getSm().setNameLsaSeq(chkNameLsa->getLsSeqNo());
+        pnlsr.getSequencingManager().setNameLsaSeq(chkNameLsa->getLsSeqNo());
         chkNameLsa->writeLog();
         // publish routing update
         string lsaPrefix = pnlsr.getConfParameter().getChronosyncLsaPrefix()
                            + pnlsr.getConfParameter().getRouterPrefix();
-        pnlsr.getSlh().publishRoutingUpdate(pnlsr.getSm(), lsaPrefix);
+        pnlsr.getSyncLogicHandler().publishRoutingUpdate(pnlsr.getSequencingManager(),
+                                                         lsaPrefix);
       }
       else
       {
@@ -661,11 +672,12 @@
       {
         cout << "Own Adj LSA, so refreshing Adj LSA" << endl;
         chkAdjLsa->setLsSeqNo(chkAdjLsa->getLsSeqNo() + 1);
-        pnlsr.getSm().setAdjLsaSeq(chkAdjLsa->getLsSeqNo());
+        pnlsr.getSequencingManager().setAdjLsaSeq(chkAdjLsa->getLsSeqNo());
         // publish routing update
         string lsaPrefix = pnlsr.getConfParameter().getChronosyncLsaPrefix()
                            + pnlsr.getConfParameter().getRouterPrefix();
-        pnlsr.getSlh().publishRoutingUpdate(pnlsr.getSm(), lsaPrefix);
+        pnlsr.getSyncLogicHandler().publishRoutingUpdate(pnlsr.getSequencingManager(),
+                                                         lsaPrefix);
       }
       else
       {
@@ -694,11 +706,12 @@
       {
         cout << "Own Cor LSA, so refreshing Cor LSA" << endl;
         chkCorLsa->setLsSeqNo(chkCorLsa->getLsSeqNo() + 1);
-        pnlsr.getSm().setCorLsaSeq(chkCorLsa->getLsSeqNo());
+        pnlsr.getSequencingManager().setCorLsaSeq(chkCorLsa->getLsSeqNo());
         // publish routing update
         string lsaPrefix = pnlsr.getConfParameter().getChronosyncLsaPrefix()
                            + pnlsr.getConfParameter().getRouterPrefix();
-        pnlsr.getSlh().publishRoutingUpdate(pnlsr.getSm(), lsaPrefix);
+        pnlsr.getSyncLogicHandler().publishRoutingUpdate(pnlsr.getSequencingManager(),
+                                                         lsaPrefix);
       }
       else
       {
diff --git a/src/main.cpp b/src/main.cpp
index b074385..b6c4b5c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -33,7 +33,7 @@
   while ((opt = getopt(argc, argv, "df:p:h")) != -1)
   {
     switch (opt)
-     {
+    {
       case 'f':
         nlsr.setConfFileName(optarg);
         break;
@@ -52,7 +52,7 @@
       default:
         nlsr.usage(programName);
         return EXIT_FAILURE;
-     }
+    }
   }
   ConfFileProcessor cfp(nlsr, nlsr.getConfFileName());
   int res = cfp.processConfFile();
diff --git a/src/npl.cpp b/src/name-prefix-list.cpp
similarity index 63%
rename from src/npl.cpp
rename to src/name-prefix-list.cpp
index 557640f..763fc0d 100644
--- a/src/npl.cpp
+++ b/src/name-prefix-list.cpp
@@ -1,32 +1,34 @@
 #include <iostream>
 #include <algorithm>
 
-#include "npl.hpp"
+#include <ndn-cxx/common.hpp>
+
+#include "name-prefix-list.hpp"
 
 namespace nlsr {
 
 using namespace std;
 
-Npl::Npl()
+NamePrefixList::NamePrefixList()
 {
 }
 
-Npl::~Npl()
+NamePrefixList::~NamePrefixList()
 {
 }
 
 static bool
-nameCompare(string& s1, string& s2)
+nameCompare(const string& s1, const string& s2)
 {
   return s1 == s2;
 }
 
 int
-Npl::insert(string& name)
+NamePrefixList::insert(string& name)
 {
   std::list<string>::iterator it = std::find_if(m_nameList.begin(),
                                                 m_nameList.end(),
-                                                bind(&nameCompare, _1 , name));
+                                                ndn::bind(&nameCompare, _1 , name));
   if (it != m_nameList.end())
   {
     return -1;
@@ -36,11 +38,11 @@
 }
 
 int
-Npl::remove(string& name)
+NamePrefixList::remove(string& name)
 {
   std::list<string>::iterator it = std::find_if(m_nameList.begin(),
                                                 m_nameList.end(),
-                                                bind(&nameCompare, _1 , name));
+                                                ndn::bind(&nameCompare, _1 , name));
   if (it != m_nameList.end())
   {
     m_nameList.erase(it);
@@ -49,13 +51,13 @@
 }
 
 void
-Npl::sort()
+NamePrefixList::sort()
 {
   m_nameList.sort();
 }
 
 void
-Npl::print()
+NamePrefixList::print()
 {
   int i = 1;
   for (std::list<string>::iterator it = m_nameList.begin();
diff --git a/src/npl.hpp b/src/name-prefix-list.hpp
similarity index 86%
rename from src/npl.hpp
rename to src/name-prefix-list.hpp
index 91de260..9d32dde 100644
--- a/src/npl.hpp
+++ b/src/name-prefix-list.hpp
@@ -3,16 +3,16 @@
 
 #include <list>
 #include <string>
-#include <ndn-cpp-dev/face.hpp>
+
 
 namespace nlsr {
-class Npl
+class NamePrefixList
 {
 
 public:
-  Npl();
+  NamePrefixList();
 
-  ~Npl();
+  ~NamePrefixList();
 
   int
   insert(std::string& name);
diff --git a/src/nlsr.cpp b/src/nlsr.cpp
index 53a9556..f4616ce 100644
--- a/src/nlsr.cpp
+++ b/src/nlsr.cpp
@@ -2,11 +2,6 @@
 #include <string>
 #include <sstream>
 #include <cstdio>
-#include <ndn-cpp-dev/face.hpp>
-#include <ndn-cpp-dev/security/key-chain.hpp>
-#include <ndn-cpp-dev/security/identity-certificate.hpp>
-#include <ndn-cpp-dev/util/scheduler.hpp>
-
 
 #include "nlsr.hpp"
 
@@ -28,7 +23,7 @@
 Nlsr::setInterestFilterNlsr(const string& name)
 {
   getNlsrFace()->setInterestFilter(name,
-                                   ndn::bind(&InterestManager::processInterest, &m_im,_1, _2),
+                                   ndn::bind(&InterestManager::processInterest, &m_interestManager, _1, _2),
                                    ndn::bind(&Nlsr::registrationFailed, this, _1));
 }
 
@@ -43,12 +38,12 @@
   // {
   //   std::cerr << "Can not initiate/load certificate" << endl;
   // }
-  m_sm.setSeqFileName(m_confParam.getSeqFileDir());
-  m_sm.initiateSeqNoFromFile();
+  m_sequencingManager.setSeqFileName(m_confParam.getSeqFileDir());
+  m_sequencingManager.initiateSeqNoFromFile();
   /* debugging purpose start */
   cout << m_confParam;
-  m_adl.printAdl();
-  m_npl.print();
+  m_adjacencyList.print();
+  m_namePrefixList.print();
   /* debugging purpose end */
   m_nlsrLsdb.buildAndInstallOwnNameLsa(boost::ref(*this));
   m_nlsrLsdb.buildAndInstallOwnCoordinateLsa(boost::ref(*this));
@@ -56,10 +51,10 @@
   setInterestFilterNlsr(m_confParam.getChronosyncLsaPrefix() +
                         m_confParam.getRouterPrefix());
   setInterestFilterNlsr(m_confParam.getRootKeyPrefix());
-  m_slh.setSyncPrefix(m_confParam.getChronosyncSyncPrefix());
-  m_slh.createSyncSocket(boost::ref(*this));
+  m_syncLogicHandler.setSyncPrefix(m_confParam.getChronosyncSyncPrefix());
+  m_syncLogicHandler.createSyncSocket(boost::ref(*this));
   // m_slh.publishKeyUpdate(m_km);
-  m_im.scheduleInfoInterest(10);
+  m_interestManager.scheduleInfoInterest(10);
 }
 
 void
diff --git a/src/nlsr.hpp b/src/nlsr.hpp
index ffa4b05..f6e3ba0 100644
--- a/src/nlsr.hpp
+++ b/src/nlsr.hpp
@@ -1,19 +1,19 @@
 #ifndef NLSR_HPP
 #define NLSR_HPP
 
-#include <ndn-cpp-dev/face.hpp>
-#include <ndn-cpp-dev/security/key-chain.hpp>
-#include <ndn-cpp-dev/util/scheduler.hpp>
+#include <ndn-cxx/face.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
+#include <ndn-cxx/util/scheduler.hpp>
 
 #include "conf-parameter.hpp"
-#include "adl.hpp"
-#include "npl.hpp"
+#include "adjacency-list.hpp"
+#include "name-prefix-list.hpp"
 #include "communication/interest-manager.hpp"
 #include "communication/data-manager.hpp"
 #include "lsdb.hpp"
 #include "sequencing-manager.hpp"
 #include "route/routing-table.hpp"
-#include "route/npt.hpp"
+#include "route/name-prefix-table.hpp"
 #include "route/fib.hpp"
 // #include "security/key-manager.hpp"
 #include "communication/sync-logic-handler.hpp"
@@ -36,11 +36,11 @@
                                                                    &NullDeleter)))
     , m_scheduler(*m_io)
     , m_confParam()
-    , m_adl()
-    , m_npl()
-    , m_im(*this)
-    , m_dm(*this)
-    , m_sm()
+    , m_adjacencyList()
+    , m_namePrefixList()
+    , m_interestManager(*this)
+    , m_dataManager(*this)
+    , m_sequencingManager()
     // , m_km()
     , m_isDaemonProcess(false)
     , m_configFileName("nlsr.conf")
@@ -50,9 +50,9 @@
     , m_isRouteCalculationScheduled(false)
     , m_isRoutingTableCalculating(false)
     , m_routingTable()
-    , m_npt()
+    , m_namePrefixTable()
     , m_fib()
-    , m_slh(m_io)
+    , m_syncLogicHandler(m_io)
   {}
 
   void
@@ -97,16 +97,16 @@
     return m_confParam;
   }
 
-  Adl&
-  getAdl()
+  AdjacencyList&
+  getAdjacencyList()
   {
-    return m_adl;
+    return m_adjacencyList;
   }
 
-  Npl&
-  getNpl()
+  NamePrefixList&
+  getNamePrefixList()
   {
-    return m_npl;
+    return m_namePrefixList;
   }
 
   ndn::shared_ptr<boost::asio::io_service>&
@@ -135,21 +135,21 @@
 
 
   InterestManager&
-  getIm()
+  getInterestManager()
   {
-    return m_im;
+    return m_interestManager;
   }
 
   DataManager&
-  getDm()
+  getDataManager()
   {
-    return m_dm;
+    return m_dataManager;
   }
 
   SequencingManager&
-  getSm()
+  getSequencingManager()
   {
-    return m_sm;
+    return m_sequencingManager;
   }
 
   Lsdb&
@@ -164,10 +164,10 @@
     return m_routingTable;
   }
 
-  Npt&
-  getNpt()
+  NamePrefixTable&
+  getNamePrefixTable()
   {
-    return m_npt;
+    return m_namePrefixTable;
   }
 
   Fib&
@@ -244,9 +244,9 @@
   }
 
   SyncLogicHandler&
-  getSlh()
+  getSyncLogicHandler()
   {
-    return m_slh;
+    return m_syncLogicHandler;
   }
 
   void
@@ -257,11 +257,11 @@
   ndn::shared_ptr<ndn::Face> m_nlsrFace;
   ndn::Scheduler m_scheduler;
   ConfParameter m_confParam;
-  Adl m_adl;
-  Npl m_npl;
-  InterestManager m_im;
-  DataManager m_dm;
-  SequencingManager m_sm;
+  AdjacencyList m_adjacencyList;
+  NamePrefixList m_namePrefixList;
+  InterestManager m_interestManager;
+  DataManager m_dataManager;
+  SequencingManager m_sequencingManager;
   // KeyManager m_km;
   bool m_isDaemonProcess;
   string m_configFileName;
@@ -276,9 +276,9 @@
   bool m_isRoutingTableCalculating;
 
   RoutingTable m_routingTable;
-  Npt m_npt;
+  NamePrefixTable m_namePrefixTable;
   Fib m_fib;
-  SyncLogicHandler m_slh;
+  SyncLogicHandler m_syncLogicHandler;
 
   int m_apiPort;
 
diff --git a/src/route/fib-entry.cpp b/src/route/fib-entry.cpp
index ddb5dbd..05bee41 100644
--- a/src/route/fib-entry.cpp
+++ b/src/route/fib-entry.cpp
@@ -7,7 +7,7 @@
 using namespace std;
 
 bool
-FibEntry::isEqualNextHops(Nhl& nhlOther)
+FibEntry::isEqualNextHops(NexthopList& nhlOther)
 {
   if (m_nhl.getSize() != nhlOther.getSize())
   {
diff --git a/src/route/fib-entry.hpp b/src/route/fib-entry.hpp
index 66e2e8b..d320c9a 100644
--- a/src/route/fib-entry.hpp
+++ b/src/route/fib-entry.hpp
@@ -3,10 +3,10 @@
 
 #include <list>
 #include <iostream>
-#include <ndn-cpp-dev/util/scheduler.hpp>
+#include <ndn-cxx/util/scheduler.hpp>
 
 #include "nexthop.hpp"
-#include "nhl.hpp"
+#include "nexthop-list.hpp"
 
 namespace nlsr {
 
@@ -37,7 +37,7 @@
     return m_name;
   }
 
-  Nhl&
+  NexthopList&
   getNhl()
   {
     return m_nhl;
@@ -80,14 +80,14 @@
   }
 
   bool
-  isEqualNextHops(Nhl& nhlOther);
+  isEqualNextHops(NexthopList& nhlOther);
 
 private:
   std::string m_name;
   int m_timeToRefresh;
   ndn::EventId m_expiringEventId;
   int m_seqNo;
-  Nhl m_nhl;
+  NexthopList m_nhl;
 };
 
 std::ostream&
diff --git a/src/route/fib.cpp b/src/route/fib.cpp
index 5304d0e..1d7582b 100644
--- a/src/route/fib.cpp
+++ b/src/route/fib.cpp
@@ -1,8 +1,10 @@
 #include <list>
+
+#include "nlsr.hpp"
 #include "fib-entry.hpp"
 #include "fib.hpp"
-#include "nhl.hpp"
-#include "nlsr.hpp"
+#include "nexthop-list.hpp"
+
 
 
 namespace nlsr {
@@ -40,7 +42,8 @@
 Fib::remove(Nlsr& pnlsr, string name)
 {
   std::list<FibEntry>::iterator it = std::find_if(m_table.begin(),
-                                                  m_table.end(), bind(&fibEntryNameCompare, _1, name));
+                                                  m_table.end(), 
+                                                  bind(&fibEntryNameCompare, _1, name));
   if (it != m_table.end())
   {
     for (std::list<NextHop>::iterator nhit =
@@ -56,7 +59,7 @@
 
 
 void
-Fib::update(Nlsr& pnlsr, string name, Nhl& nextHopList)
+Fib::update(Nlsr& pnlsr, string name, NexthopList& nextHopList)
 {
   std::cout << "Fib::updateFib Called" << std::endl;
   int startFace = 0;
@@ -145,7 +148,7 @@
 }
 
 int
-Fib::getNumberOfFacesForName(Nhl& nextHopList, int maxFacesPerPrefix)
+Fib::getNumberOfFacesForName(NexthopList& nextHopList, int maxFacesPerPrefix)
 {
   int endFace = 0;
   if ((maxFacesPerPrefix == 0) || (nextHopList.getSize() <= maxFacesPerPrefix))
@@ -160,7 +163,7 @@
 }
 
 void
-Fib::removeHop(Nlsr& pnlsr, Nhl& nl, int doNotRemoveHopFaceId)
+Fib::removeHop(Nlsr& pnlsr, NexthopList& nl, int doNotRemoveHopFaceId)
 {
   for (std::list<NextHop>::iterator it = nl.getNextHopList().begin();
        it != nl.getNextHopList().end();   ++it)
diff --git a/src/route/fib.hpp b/src/route/fib.hpp
index f042362..4a80c48 100644
--- a/src/route/fib.hpp
+++ b/src/route/fib.hpp
@@ -24,7 +24,7 @@
   remove(Nlsr& pnlsr, string name);
 
   void
-  update(Nlsr& pnlsr, string name, Nhl& nextHopList);
+  update(Nlsr& pnlsr, string name, NexthopList& nextHopList);
 
   void
   clean(Nlsr& pnlsr);
@@ -40,10 +40,10 @@
 
 private:
   void
-  removeHop(Nlsr& pnlsr, Nhl& nl, int doNotRemoveHopFaceId);
+  removeHop(Nlsr& pnlsr, NexthopList& nl, int doNotRemoveHopFaceId);
 
   int
-  getNumberOfFacesForName(Nhl& nextHopList, int maxFacesPerPrefix);
+  getNumberOfFacesForName(NexthopList& nextHopList, int maxFacesPerPrefix);
 
   ndn::EventId
   scheduleEntryRefreshing(Nlsr& pnlsr, string name, int feSeqNum,
diff --git a/src/route/map.hpp b/src/route/map.hpp
index 9c9e6e8..bdacd4d 100644
--- a/src/route/map.hpp
+++ b/src/route/map.hpp
@@ -4,7 +4,7 @@
 #include <iostream>
 #include <list>
 
-#include <ndn-cpp-dev/face.hpp>
+#include <ndn-cxx/face.hpp>
 
 namespace nlsr {
 
diff --git a/src/route/npte.cpp b/src/route/name-prefix-table-entry.cpp
similarity index 86%
rename from src/route/npte.cpp
rename to src/route/name-prefix-table-entry.cpp
index 3194635..4389373 100644
--- a/src/route/npte.cpp
+++ b/src/route/name-prefix-table-entry.cpp
@@ -1,6 +1,6 @@
 #include <list>
 #include <utility>
-#include "npte.hpp"
+#include "name-prefix-table-entry.hpp"
 #include "routing-table-entry.hpp"
 #include "nexthop.hpp"
 
@@ -9,7 +9,7 @@
 using namespace std;
 
 void
-Npte::generateNhlfromRteList()
+NamePrefixTableEntry::generateNhlfromRteList()
 {
   m_nhl.reset();
   for (std::list<RoutingTableEntry>::iterator it = m_rteList.begin();
@@ -33,7 +33,7 @@
 }
 
 void
-Npte::removeRoutingTableEntry(RoutingTableEntry& rte)
+NamePrefixTableEntry::removeRoutingTableEntry(RoutingTableEntry& rte)
 {
   std::list<RoutingTableEntry>::iterator it = std::find_if(m_rteList.begin(),
                                                            m_rteList.end(),
@@ -45,7 +45,7 @@
 }
 
 void
-Npte::addRoutingTableEntry(RoutingTableEntry& rte)
+NamePrefixTableEntry::addRoutingTableEntry(RoutingTableEntry& rte)
 {
   std::list<RoutingTableEntry>::iterator it = std::find_if(m_rteList.begin(),
                                                            m_rteList.end(),
@@ -67,7 +67,7 @@
 
 //debugging purpose
 ostream&
-operator<<(ostream& os, Npte& npte)
+operator<<(ostream& os, NamePrefixTableEntry& npte)
 {
   os << "Name: " << npte.getNamePrefix() << endl;
   std::list<RoutingTableEntry> rteList = npte.getRteList();
diff --git a/src/route/npte.hpp b/src/route/name-prefix-table-entry.hpp
similarity index 84%
rename from src/route/npte.hpp
rename to src/route/name-prefix-table-entry.hpp
index 57fdfec..7f4f83a 100644
--- a/src/route/npte.hpp
+++ b/src/route/name-prefix-table-entry.hpp
@@ -9,16 +9,16 @@
 
 using namespace std;
 
-class Npte
+class NamePrefixTableEntry
 {
 public:
-  Npte()
+  NamePrefixTableEntry()
     : m_namePrefix()
     , m_nhl()
   {
   }
 
-  Npte(string np)
+  NamePrefixTableEntry(string np)
     : m_nhl()
   {
     m_namePrefix = np;
@@ -55,7 +55,7 @@
     return m_rteList.size();
   }
 
-  Nhl&
+  NexthopList&
   getNhl()
   {
     return m_nhl;
@@ -73,11 +73,11 @@
 private:
   std::string m_namePrefix;
   std::list<RoutingTableEntry> m_rteList;
-  Nhl m_nhl;
+  NexthopList m_nhl;
 };
 
 std::ostream&
-operator<<(std::ostream& os, Npte& npte);
+operator<<(std::ostream& os, NamePrefixTableEntry& npte);
 
 }//namespace nlsr
 
diff --git a/src/route/npt.cpp b/src/route/name-prefix-table.cpp
similarity index 69%
rename from src/route/npt.cpp
rename to src/route/name-prefix-table.cpp
index e094fe3..e37751b 100644
--- a/src/route/npt.cpp
+++ b/src/route/name-prefix-table.cpp
@@ -2,9 +2,10 @@
 #include <utility>
 #include <algorithm>
 
-#include "npt.hpp"
-#include "npte.hpp"
 #include "nlsr.hpp"
+#include "name-prefix-table.hpp"
+#include "name-prefix-table-entry.hpp"
+
 
 
 namespace nlsr {
@@ -12,7 +13,7 @@
 using namespace std;
 
 static bool
-npteCompare(Npte& npte, string& name)
+npteCompare(NamePrefixTableEntry& npte, string& name)
 {
   return npte.getNamePrefix() == name;
 }
@@ -20,13 +21,13 @@
 
 
 void
-Npt::addNpte(string name, RoutingTableEntry& rte, Nlsr& pnlsr)
+NamePrefixTable::addNpte(string name, RoutingTableEntry& rte, Nlsr& pnlsr)
 {
-  std::list<Npte>::iterator it = std::find_if(m_npteList.begin(),
-                                              m_npteList.end(), bind(&npteCompare, _1, name));
+  std::list<NamePrefixTableEntry>::iterator it = std::find_if(m_npteList.begin(),
+                                                              m_npteList.end(), bind(&npteCompare, _1, name));
   if (it == m_npteList.end())
   {
-    Npte newEntry(name);
+    NamePrefixTableEntry newEntry(name);
     newEntry.addRoutingTableEntry(rte);
     newEntry.generateNhlfromRteList();
     newEntry.getNhl().sort();
@@ -55,10 +56,10 @@
 }
 
 void
-Npt::removeNpte(string name, RoutingTableEntry& rte, Nlsr& pnlsr)
+NamePrefixTable::removeNpte(string name, RoutingTableEntry& rte, Nlsr& pnlsr)
 {
-  std::list<Npte>::iterator it = std::find_if(m_npteList.begin(),
-                                              m_npteList.end(), bind(&npteCompare, _1, name));
+  std::list<NamePrefixTableEntry>::iterator it = std::find_if(m_npteList.begin(),
+                                                              m_npteList.end(), bind(&npteCompare, _1, name));
   if (it != m_npteList.end())
   {
     string destRouter = rte.getDestination();
@@ -81,7 +82,7 @@
 
 
 void
-Npt::addNpteByDestName(string name, string destRouter, Nlsr& pnlsr)
+NamePrefixTable::addNpteByDestName(string name, string destRouter, Nlsr& pnlsr)
 {
   RoutingTableEntry* rteCheck =
     pnlsr.getRoutingTable().findRoutingTableEntry(destRouter);
@@ -97,7 +98,7 @@
 }
 
 void
-Npt::removeNpte(string name, string destRouter, Nlsr& pnlsr)
+NamePrefixTable::removeNpte(string name, string destRouter, Nlsr& pnlsr)
 {
   RoutingTableEntry* rteCheck =
     pnlsr.getRoutingTable().findRoutingTableEntry(destRouter);
@@ -113,9 +114,10 @@
 }
 
 void
-Npt::updateWithNewRoute(Nlsr& pnlsr)
+NamePrefixTable::updateWithNewRoute(Nlsr& pnlsr)
 {
-  for (std::list<Npte>::iterator it = m_npteList.begin(); it != m_npteList.end();
+  for (std::list<NamePrefixTableEntry>::iterator it = m_npteList.begin();
+       it != m_npteList.end();
        ++it)
   {
     std::list<RoutingTableEntry> rteList = (*it).getRteList();
@@ -138,10 +140,11 @@
 }
 
 void
-Npt::print()
+NamePrefixTable::print()
 {
   std::cout << "----------------NPT----------------------" << std::endl;
-  for (std::list<Npte>::iterator it = m_npteList.begin(); it != m_npteList.end();
+  for (std::list<NamePrefixTableEntry>::iterator it = m_npteList.begin();
+       it != m_npteList.end();
        ++it)
   {
     cout << (*it) << endl;
diff --git a/src/route/npt.hpp b/src/route/name-prefix-table.hpp
similarity index 81%
rename from src/route/npt.hpp
rename to src/route/name-prefix-table.hpp
index 8e6cd0a..1a59af2 100644
--- a/src/route/npt.hpp
+++ b/src/route/name-prefix-table.hpp
@@ -2,16 +2,16 @@
 #define NLSR_NPT_HPP
 
 #include <list>
-#include "npte.hpp"
+#include "name-prefix-table-entry.hpp"
 #include "routing-table-entry.hpp"
 
 namespace nlsr {
 class Nlsr;
 
-class Npt
+class NamePrefixTable
 {
 public:
-  Npt()
+  NamePrefixTable()
   {
   }
   void
@@ -34,7 +34,7 @@
   removeNpte(std::string name, RoutingTableEntry& rte, Nlsr& pnlsr);
 
 private:
-  std::list<Npte> m_npteList;
+  std::list<NamePrefixTableEntry> m_npteList;
 };
 
 }//namespace nlsr
diff --git a/src/route/nhl.cpp b/src/route/nexthop-list.cpp
similarity index 91%
rename from src/route/nhl.cpp
rename to src/route/nexthop-list.cpp
index 50d6303..7edb96e 100644
--- a/src/route/nhl.cpp
+++ b/src/route/nexthop-list.cpp
@@ -1,5 +1,5 @@
 #include <iostream>
-#include "nhl.hpp"
+#include "nexthop-list.hpp"
 #include "nexthop.hpp"
 
 namespace nlsr {
@@ -34,7 +34,7 @@
 */
 
 void
-Nhl::addNextHop(NextHop& nh)
+NexthopList::addNextHop(NextHop& nh)
 {
   std::list<NextHop>::iterator it = std::find_if(m_nexthopList.begin(),
                                                  m_nexthopList.end(),
@@ -55,7 +55,7 @@
 */
 
 void
-Nhl::removeNextHop(NextHop& nh)
+NexthopList::removeNextHop(NextHop& nh)
 {
   std::list<NextHop>::iterator it = std::find_if(m_nexthopList.begin(),
                                                  m_nexthopList.end(),
@@ -67,13 +67,13 @@
 }
 
 void
-Nhl::sort()
+NexthopList::sort()
 {
   m_nexthopList.sort(nextHopSortingComparator);
 }
 
 ostream&
-operator<<(ostream& os, Nhl& nhl)
+operator<<(ostream& os, NexthopList& nhl)
 {
   std::list<NextHop> nexthopList = nhl.getNextHopList();
   int i = 1;
diff --git a/src/route/nhl.hpp b/src/route/nexthop-list.hpp
similarity index 82%
rename from src/route/nhl.hpp
rename to src/route/nexthop-list.hpp
index ef43373..a8ebe7b 100644
--- a/src/route/nhl.hpp
+++ b/src/route/nexthop-list.hpp
@@ -1,7 +1,7 @@
 #ifndef NLSR_NHL_HPP
 #define NLSR_NHL_HPP
 
-#include <ndn-cpp-dev/face.hpp>
+#include <ndn-cxx/face.hpp>
 #include <list>
 #include <iostream>
 
@@ -10,15 +10,15 @@
 
 namespace nlsr {
 
-class Nhl
+class NexthopList
 {
 public:
-  Nhl()
+  NexthopList()
     : m_nexthopList()
   {
   }
 
-  ~Nhl()
+  ~NexthopList()
   {
   }
   void
@@ -56,7 +56,7 @@
 };
 
 std::ostream&
-operator<<(std::ostream& os, Nhl& nhl);
+operator<<(std::ostream& os, NexthopList& nhl);
 
 }//namespace nlsr
 
diff --git a/src/route/routing-table-calculator.cpp b/src/route/routing-table-calculator.cpp
index d63904e..7ec8a23 100644
--- a/src/route/routing-table-calculator.cpp
+++ b/src/route/routing-table-calculator.cpp
@@ -262,7 +262,7 @@
         string nextHopRouterName =
           pMap.getRouterNameByMappingNo(nextHopRouter);
         int nxtHopFace =
-          pnlsr.getAdl().getAdjacent(nextHopRouterName).getConnectingFace();
+          pnlsr.getAdjacencyList().getAdjacent(nextHopRouterName).getConnectingFace();
         std::cout << "Dest Router: " << pMap.getRouterNameByMappingNo(i) << std::endl;
         std::cout << "Next hop Router: " << nextHopRouterName << std::endl;
         std::cout << "Next hop Face: " << nxtHopFace << std::endl;
@@ -401,7 +401,7 @@
       {
         string nextHopRouterName = pMap.getRouterNameByMappingNo(links[j]);
         int nextHopFace =
-          pnlsr.getAdl().getAdjacent(nextHopRouterName).getConnectingFace();
+          pnlsr.getAdjacencyList().getAdjacent(nextHopRouterName).getConnectingFace();
         double distToNbr = getHyperbolicDistance(pnlsr, pMap,
                                                  sourceRouter, links[j]);
         double distToDestFromNbr = getHyperbolicDistance(pnlsr,
diff --git a/src/route/routing-table-entry.hpp b/src/route/routing-table-entry.hpp
index f185e61..8877275 100644
--- a/src/route/routing-table-entry.hpp
+++ b/src/route/routing-table-entry.hpp
@@ -3,7 +3,7 @@
 
 #include <iostream>
 
-#include "nhl.hpp"
+#include "nexthop-list.hpp"
 
 namespace nlsr {
 
@@ -32,7 +32,7 @@
     return m_destination;
   }
 
-  Nhl&
+  NexthopList&
   getNhl()
   {
     return m_nhl;
@@ -40,7 +40,7 @@
 
 private:
   std::string m_destination;
-  Nhl m_nhl;
+  NexthopList m_nhl;
 };
 
 std::ostream&
diff --git a/src/route/routing-table.cpp b/src/route/routing-table.cpp
index 097e95a..2bc827c 100644
--- a/src/route/routing-table.cpp
+++ b/src/route/routing-table.cpp
@@ -7,7 +7,7 @@
 #include "map.hpp"
 #include "routing-table-calculator.hpp"
 #include "routing-table-entry.hpp"
-#include "npt.hpp"
+#include "name-prefix-table.hpp"
 
 namespace nlsr {
 
@@ -18,7 +18,7 @@
 {
   //debugging purpose
   std::cout << pnlsr.getConfParameter() << std::endl;
-  pnlsr.getNpt().print();
+  pnlsr.getNamePrefixTable().print();
   pnlsr.getLsdb().printAdjLsdb();
   pnlsr.getLsdb().printCorLsdb();
   pnlsr.getLsdb().printNameLsdb();
@@ -50,10 +50,10 @@
           calculateHypDryRoutingTable(pnlsr);
         }
         //need to update NPT here
-        pnlsr.getNpt().updateWithNewRoute(pnlsr);
+        pnlsr.getNamePrefixTable().updateWithNewRoute(pnlsr);
         //debugging purpose
         printRoutingTable();
-        pnlsr.getNpt().print();
+        pnlsr.getNamePrefixTable().print();
         pnlsr.getFib().print();
         //debugging purpose end
       }
@@ -71,10 +71,10 @@
       clearDryRoutingTable(); // for dry run options
       // need to update NPT here
       std::cout << "Calling Update NPT With new Route" << std::endl;
-      pnlsr.getNpt().updateWithNewRoute(pnlsr);
+      pnlsr.getNamePrefixTable().updateWithNewRoute(pnlsr);
       //debugging purpose
       printRoutingTable();
-      pnlsr.getNpt().print();
+      pnlsr.getNamePrefixTable().print();
       pnlsr.getFib().print();
       //debugging purpose end
     }
diff --git a/src/sequencing-manager.hpp b/src/sequencing-manager.hpp
index 32863a3..e933567 100644
--- a/src/sequencing-manager.hpp
+++ b/src/sequencing-manager.hpp
@@ -3,7 +3,7 @@
 
 #include <list>
 #include <string>
-#include <ndn-cpp-dev/face.hpp>
+#include <ndn-cxx/face.hpp>
 
 namespace nlsr {
 class SequencingManager
diff --git a/src/utility/tokenizer.cpp b/src/utility/tokenizer.cpp
index e326c2a..52473b2 100644
--- a/src/utility/tokenizer.cpp
+++ b/src/utility/tokenizer.cpp
@@ -4,6 +4,8 @@
 #include <string>
 #include <algorithm>
 
+#include <ndn-cxx/face.hpp>
+
 #include "tokenizer.hpp"
 
 namespace nlsr {
@@ -98,7 +100,7 @@
 {
   std::list<string>::iterator it = std::find_if(m_tokenList.begin(),
                                                 m_tokenList.end(),
-                                                bind(&tokenCompare, _1 , token));
+                                                ndn::bind(&tokenCompare, _1 , token));
   if (it != m_tokenList.end())
   {
     return true;
diff --git a/src/utility/tokenizer.hpp b/src/utility/tokenizer.hpp
index dd6254d..8ae6f88 100644
--- a/src/utility/tokenizer.hpp
+++ b/src/utility/tokenizer.hpp
@@ -7,7 +7,6 @@
 #include <string>
 #include <list>
 #include <vector>
-#include <ndn-cpp-dev/face.hpp>
 
 namespace nlsr {
 
