diff --git a/nsync/sync-full-state.h b/nsync/sync-full-state.h
index 028c41e..4532d1d 100644
--- a/nsync/sync-full-state.h
+++ b/nsync/sync-full-state.h
@@ -23,7 +23,7 @@
 #ifndef SYNC_FULL_STATE_H
 #define SYNC_FULL_STATE_H
 
-#include <ndn-cpp-dev/util/time.hpp>
+#include <ndn-cxx/util/time.hpp>
 #include "sync-state.h"
 
 namespace Sync {
diff --git a/nsync/sync-interest-container.h b/nsync/sync-interest-container.h
index f674d05..1045355 100644
--- a/nsync/sync-interest-container.h
+++ b/nsync/sync-interest-container.h
@@ -23,7 +23,7 @@
 #ifndef SYNC_INTEREST_CONTAINER_H
 #define SYNC_INTEREST_CONTAINER_H
 
-#include <ndn-cpp-dev/util/time.hpp>
+#include <ndn-cxx/util/time.hpp>
 
 #include "sync-digest.h"
 
diff --git a/nsync/sync-interest-table.h b/nsync/sync-interest-table.h
index 4810c41..7064e4f 100644
--- a/nsync/sync-interest-table.h
+++ b/nsync/sync-interest-table.h
@@ -23,7 +23,7 @@
 #ifndef SYNC_INTEREST_TABLE_H
 #define SYNC_INTEREST_TABLE_H
 
-#include <ndn-cpp-dev/util/scheduler.hpp>
+#include <ndn-cxx/util/scheduler.hpp>
 
 #include <string>
 #include <vector>
diff --git a/nsync/sync-logic.h b/nsync/sync-logic.h
index 9ff3fc8..afb732a 100644
--- a/nsync/sync-logic.h
+++ b/nsync/sync-logic.h
@@ -28,10 +28,10 @@
 #include <memory>
 #include <map>
 
-#include <ndn-cpp-dev/face.hpp>
-#include <ndn-cpp-dev/security/validator.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/validator.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
+#include <ndn-cxx/util/scheduler.hpp>
 
 #include "sync-interest-table.h"
 #include "sync-diff-state.h"
diff --git a/nsync/sync-socket.h b/nsync/sync-socket.h
index e4eec37..541673c 100644
--- a/nsync/sync-socket.h
+++ b/nsync/sync-socket.h
@@ -21,9 +21,9 @@
 #ifndef _SYNC_SOCKET_H
 #define _SYNC_SOCKET_H
 
-#include <ndn-cpp-dev/face.hpp>
-#include <ndn-cpp-dev/security/validator.hpp>
-#include <ndn-cpp-dev/security/key-chain.hpp>
+#include <ndn-cxx/face.hpp>
+#include <ndn-cxx/security/validator.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
 
 #include "sync-logic.h"
 #include "sync-seq-no.h"
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 {
 
diff --git a/wscript b/wscript
index f3061db..43159f4 100644
--- a/wscript
+++ b/wscript
@@ -43,7 +43,7 @@
 
     conf.load('default-compiler-flags')
 
-    conf.check_cfg(package='libndn-cpp-dev', args=['--cflags', '--libs'],
+    conf.check_cfg(package='libndn-cxx', args=['--cflags', '--libs'],
                    uselib_store='NDN_CPP', mandatory=True)
 
     boost_libs = 'system chrono program_options log iostreams thread'
@@ -54,7 +54,7 @@
 
     conf.check_boost(lib=boost_libs)
 
-    if conf.env.BOOST_VERSION_NUMBER < 105400:
+    if conf.env.BOOST_VERSION_NUMBER < 104800:
         Logs.error("Minimum required boost version is 1.54.0")
         Logs.error("Please upgrade your distribution or install custom boost libraries")
         return
