diff --git a/src/adjacency-list.cpp b/src/adjacency-list.cpp
index b83a982..302d9b9 100644
--- a/src/adjacency-list.cpp
+++ b/src/adjacency-list.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2020,  The University of Memphis,
+/*
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -20,9 +20,6 @@
  **/
 
 #include "adjacency-list.hpp"
-
-#include "adjacent.hpp"
-#include "common.hpp"
 #include "logger.hpp"
 
 #include <algorithm>
@@ -32,9 +29,9 @@
 INIT_LOGGER(AdjacencyList);
 
 bool
-AdjacencyList::insert(Adjacent& adjacent)
+AdjacencyList::insert(const Adjacent& adjacent)
 {
-  std::list<Adjacent>::iterator it = find(adjacent.getName());
+  auto it = find(adjacent.getName());
   if (it != m_adjList.end()) {
     return false;
   }
diff --git a/src/adjacency-list.hpp b/src/adjacency-list.hpp
index 955e668..2f2b164 100644
--- a/src/adjacency-list.hpp
+++ b/src/adjacency-list.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2020,  The University of Memphis,
+/*
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -26,7 +26,6 @@
 #include "common.hpp"
 
 #include <list>
-#include <boost/cstdint.hpp>
 
 namespace nlsr {
 
@@ -37,7 +36,7 @@
   typedef std::list<Adjacent>::iterator iterator;
 
   bool
-  insert(Adjacent& adjacent);
+  insert(const Adjacent& adjacent);
 
   std::list<Adjacent>&
   getAdjList();
diff --git a/src/adjacent.cpp b/src/adjacent.cpp
index fae92d5..637ea90 100644
--- a/src/adjacent.cpp
+++ b/src/adjacent.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -30,12 +30,12 @@
 const double Adjacent::NON_ADJACENT_COST = -12345;
 
 Adjacent::Adjacent()
-    : m_name()
-    , m_faceUri()
-    , m_linkCost(DEFAULT_LINK_COST)
-    , m_status(STATUS_INACTIVE)
-    , m_interestTimedOutNo(0)
-    , m_faceId(0)
+  : m_name()
+  , m_faceUri()
+  , m_linkCost(DEFAULT_LINK_COST)
+  , m_status(STATUS_INACTIVE)
+  , m_interestTimedOutNo(0)
+  , m_faceId(0)
 {
 }
 
@@ -45,35 +45,34 @@
 }
 
 Adjacent::Adjacent(const ndn::Name& an)
-    : m_name(an)
-    , m_faceUri()
-    , m_linkCost(DEFAULT_LINK_COST)
-    , m_status(STATUS_INACTIVE)
-    , m_interestTimedOutNo(0)
-    , m_faceId(0)
-  {
-  }
+  : m_name(an)
+  , m_faceUri()
+  , m_linkCost(DEFAULT_LINK_COST)
+  , m_status(STATUS_INACTIVE)
+  , m_interestTimedOutNo(0)
+  , m_faceId(0)
+{
+}
 
 Adjacent::Adjacent(const ndn::Name& an, const ndn::FaceUri& faceUri, double lc,
                    Status s, uint32_t iton, uint64_t faceId)
-    : m_name(an)
-    , m_faceUri(faceUri)
-    , m_status(s)
-    , m_interestTimedOutNo(iton)
-    , m_faceId(faceId)
-  {
-    this->setLinkCost(lc);
-  }
+  : m_name(an)
+  , m_faceUri(faceUri)
+  , m_status(s)
+  , m_interestTimedOutNo(iton)
+  , m_faceId(faceId)
+{
+  this->setLinkCost(lc);
+}
 
 void
 Adjacent::setLinkCost(double lc)
 {
   // NON_ADJACENT_COST is a negative value and is used for nodes that aren't direct neighbors.
   // But for direct/active neighbors, the cost cannot be negative.
-  if (lc < 0 && lc != NON_ADJACENT_COST)
-  {
+  if (lc < 0 && lc != NON_ADJACENT_COST) {
     NLSR_LOG_ERROR(" Neighbor's link-cost cannot be negative");
-    BOOST_THROW_EXCEPTION(ndn::tlv::Error("Neighbor's link-cost cannot be negative"));
+    NDN_THROW(ndn::tlv::Error("Neighbor's link-cost cannot be negative"));
   }
 
   m_linkCost = lc;
@@ -127,20 +126,19 @@
   m_wire = wire;
 
   if (m_wire.type() != ndn::tlv::nlsr::Adjacency) {
-    BOOST_THROW_EXCEPTION(Error("Expected Adjacency Block, but Block is of a different type: #" +
-                                ndn::to_string(m_wire.type())));
+    NDN_THROW(Error("Adjacency", m_wire.type()));
   }
 
   m_wire.parse();
 
-  ndn::Block::element_const_iterator val = m_wire.elements_begin();
+  auto val = m_wire.elements_begin();
 
   if (val != m_wire.elements_end() && val->type() == ndn::tlv::Name) {
     m_name.wireDecode(*val);
     ++val;
   }
   else {
-    BOOST_THROW_EXCEPTION(Error("Missing required Name field"));
+    NDN_THROW(Error("Missing required Name field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == ndn::tlv::nlsr::Uri) {
@@ -148,7 +146,7 @@
     ++val;
   }
   else {
-    BOOST_THROW_EXCEPTION(Error("Missing required Uri field"));
+    NDN_THROW(Error("Missing required Uri field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == ndn::tlv::nlsr::Cost) {
@@ -156,7 +154,7 @@
     ++val;
   }
   else {
-    BOOST_THROW_EXCEPTION(Error("Missing required Cost field"));
+    NDN_THROW(Error("Missing required Cost field"));
   }
 }
 
diff --git a/src/adjacent.hpp b/src/adjacent.hpp
index a540a5c..135c6fc 100644
--- a/src/adjacent.hpp
+++ b/src/adjacent.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2020,  The University of Memphis,
+/*
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -19,15 +19,15 @@
  * NLSR, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  **/
 
+#ifndef NLSR_ADJACENT_HPP
+#define NLSR_ADJACENT_HPP
+
 #include <string>
 #include <cmath>
 
 #include <ndn-cxx/face.hpp>
 #include <ndn-cxx/net/face-uri.hpp>
 
-#ifndef NLSR_ADJACENT_HPP
-#define NLSR_ADJACENT_HPP
-
 namespace nlsr {
 
 /*! \brief A neighbor reachable over a Face.
@@ -49,11 +49,7 @@
   class Error : public ndn::tlv::Error
   {
   public:
-    explicit
-    Error(const std::string& what)
-      : ndn::tlv::Error(what)
-    {
-    }
+    using ndn::tlv::Error::Error;
   };
 
   enum Status
diff --git a/src/common.hpp b/src/common.hpp
index cd6dc18..dd826ac 100644
--- a/src/common.hpp
+++ b/src/common.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2018,  The University of Memphis,
+/*
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -16,33 +16,32 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NLSR, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- *
- **/
-
-/*! \file
- * Shared include file to provide a single point-of-entry, and
- * hopefully improve compile times.
  */
 
 #ifndef NLSR_COMMON_HPP
 #define NLSR_COMMON_HPP
 
-#include <ndn-cxx/util/time.hpp>
+#include <cstddef>
+#include <cstdint>
+#include <functional>
+#include <iterator>
+#include <memory>
+#include <utility>
+
 #include <ndn-cxx/name.hpp>
+#include <ndn-cxx/util/exception.hpp>
+#include <ndn-cxx/util/time.hpp>
 
 namespace nlsr {
 
-using std::bind;
-using std::make_shared;
-using std::shared_ptr;
-using std::function;
+using namespace ndn::time_literals;
 
-const ndn::time::seconds TIME_ALLOWED_FOR_CANONIZATION = ndn::time::seconds(4);
+const ndn::time::seconds TIME_ALLOWED_FOR_CANONIZATION = 4_s;
 
 template<typename T, typename = void>
 struct is_iterator
 {
-   static constexpr bool value = false;
+  static constexpr bool value = false;
 };
 
 /*! Use C++11 iterator_traits to check if some type is an iterator
@@ -52,7 +51,7 @@
   typename std::iterator_traits<T>::value_type,
   void>::value>::type>
 {
-   static constexpr bool value = true;
+  static constexpr bool value = true;
 };
 
 } // namespace nlsr
diff --git a/src/communication/sync-logic-handler.hpp b/src/communication/sync-logic-handler.hpp
index 7deb06a..fa3545f 100644
--- a/src/communication/sync-logic-handler.hpp
+++ b/src/communication/sync-logic-handler.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -30,9 +30,6 @@
 
 #include <ndn-cxx/face.hpp>
 #include <ndn-cxx/util/signal.hpp>
-#include <boost/throw_exception.hpp>
-
-class InterestManager;
 
 namespace nlsr {
 
@@ -49,19 +46,15 @@
 class SyncLogicHandler
 {
 public:
-  using IsLsaNew =
-    std::function<bool(const ndn::Name&, const Lsa::Type& lsaType, const uint64_t&)>;
-
   class Error : public std::runtime_error
   {
   public:
-    explicit
-    Error(const std::string& what)
-      : std::runtime_error(what)
-    {
-    }
+    using std::runtime_error::runtime_error;
   };
 
+  using IsLsaNew =
+    std::function<bool(const ndn::Name&, const Lsa::Type& lsaType, const uint64_t&)>;
+
   SyncLogicHandler(ndn::Face& face, const IsLsaNew& isLsaNew, const ConfParameter& conf);
 
   /*! \brief Instruct ChronoSync to publish an update.
diff --git a/src/conf-file-processor.cpp b/src/conf-file-processor.cpp
index 5a7e803..d3e1625 100644
--- a/src/conf-file-processor.cpp
+++ b/src/conf-file-processor.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -451,9 +451,9 @@
 
   // Set the interval between FaceStatus dataset fetch attempts.
   ConfigurationVariable<uint32_t> faceDatasetFetchInterval("face-dataset-fetch-interval",
-                                                           bind(&ConfParameter::setFaceDatasetFetchInterval,
-                                                                &m_confParam,
-                                                                _1));
+                                                           std::bind(&ConfParameter::setFaceDatasetFetchInterval,
+                                                                     &m_confParam,
+                                                                     _1));
 
   faceDatasetFetchInterval.setMinAndMaxValue(FACE_DATASET_FETCH_INTERVAL_MIN,
                                              FACE_DATASET_FETCH_INTERVAL_MAX);
diff --git a/src/conf-parameter.cpp b/src/conf-parameter.cpp
index 9858998..47a33e8 100644
--- a/src/conf-parameter.cpp
+++ b/src/conf-parameter.cpp
@@ -25,8 +25,6 @@
 
 INIT_LOGGER(ConfParameter);
 
-using namespace ndn::time_literals;
-
 // To be changed when breaking changes are made to sync
 const uint64_t ConfParameter::SYNC_VERSION = 9;
 
@@ -120,7 +118,7 @@
   m_prefixUpdateValidator.loadAnchor("Authoritative-Certificate", ndn::security::Certificate(cert));
 }
 
-shared_ptr<ndn::security::Certificate>
+std::shared_ptr<ndn::security::Certificate>
 ConfParameter::initializeKey()
 {
   NLSR_LOG_DEBUG("Initializing Key ...");
diff --git a/src/conf-parameter.hpp b/src/conf-parameter.hpp
index 89d01c4..c000c4b 100644
--- a/src/conf-parameter.hpp
+++ b/src/conf-parameter.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -28,11 +28,9 @@
 #include "adjacency-list.hpp"
 #include "name-prefix-list.hpp"
 
-#include <boost/cstdint.hpp>
 #include <ndn-cxx/face.hpp>
 #include <ndn-cxx/security/validator-config.hpp>
 #include <ndn-cxx/security/certificate-fetcher-direct-fetch.hpp>
-#include <ndn-cxx/util/time.hpp>
 
 namespace nlsr {
 
@@ -128,9 +126,8 @@
  */
 class ConfParameter
 {
-
 public:
-  ConfParameter(ndn::Face& face,  ndn::KeyChain& keyChain,
+  ConfParameter(ndn::Face& face, ndn::KeyChain& keyChain,
                 const std::string& confFileName = "nlsr.conf");
 
   const std::string&
@@ -478,7 +475,7 @@
     return m_keyChain;
   }
 
-  shared_ptr<ndn::security::Certificate>
+  std::shared_ptr<ndn::security::Certificate>
   initializeKey();
 
   void
@@ -492,6 +489,7 @@
 PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   std::string m_confFileName;
   std::string m_confFileNameDynamic;
+
 private:
   ndn::Name m_routerName;
   ndn::Name m_siteName;
diff --git a/src/lsa/adj-lsa.cpp b/src/lsa/adj-lsa.cpp
index f3b04da..781422c 100644
--- a/src/lsa/adj-lsa.cpp
+++ b/src/lsa/adj-lsa.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -93,8 +93,7 @@
   m_wire = wire;
 
   if (m_wire.type() != ndn::tlv::nlsr::AdjacencyLsa) {
-    BOOST_THROW_EXCEPTION(Error("Expected AdjacencyLsa Block, but Block is of a different type: #" +
-                                ndn::to_string(m_wire.type())));
+    NDN_THROW(Error("AdjacencyLsa", m_wire.type()));
   }
 
   m_wire.parse();
@@ -106,18 +105,16 @@
     ++val;
   }
   else {
-    BOOST_THROW_EXCEPTION(Error("Missing required Lsa field"));
+    NDN_THROW(Error("Missing required Lsa field"));
   }
 
   AdjacencyList adl;
   for (; val != m_wire.elements_end(); ++val) {
     if (val->type() == ndn::tlv::nlsr::Adjacency) {
-      Adjacent adj = Adjacent(*val);
-      adl.insert(adj);
+      adl.insert(Adjacent(*val));
     }
     else {
-      BOOST_THROW_EXCEPTION(Error("Expected Adjacency Block, but Block is of a different type: #" +
-                                  ndn::to_string(m_wire.type())));
+      NDN_THROW(Error("Adjacency", val->type()));
     }
   }
   m_adl = adl;
diff --git a/src/lsa/coordinate-lsa.cpp b/src/lsa/coordinate-lsa.cpp
index 4109c64..32172e6 100644
--- a/src/lsa/coordinate-lsa.cpp
+++ b/src/lsa/coordinate-lsa.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -105,10 +105,7 @@
   m_wire = wire;
 
   if (m_wire.type() != ndn::tlv::nlsr::CoordinateLsa) {
-    std::stringstream error;
-    error << "Expected CoordinateLsa Block, but Block is of a different type: #"
-          << m_wire.type();
-    BOOST_THROW_EXCEPTION(Error(error.str()));
+    NDN_THROW(Error("CoordinateLsa", m_wire.type()));
   }
 
   m_wire.parse();
@@ -120,7 +117,7 @@
     ++val;
   }
   else {
-    BOOST_THROW_EXCEPTION(Error("Missing required Lsa field"));
+    NDN_THROW(Error("Missing required Lsa field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == ndn::tlv::nlsr::HyperbolicRadius) {
@@ -128,7 +125,7 @@
     ++val;
   }
   else {
-    BOOST_THROW_EXCEPTION(Error("Missing required HyperbolicRadius field"));
+    NDN_THROW(Error("Missing required HyperbolicRadius field"));
   }
 
   std::vector<double> angles;
@@ -137,7 +134,7 @@
       angles.push_back(ndn::encoding::readDouble(*val));
     }
     else {
-      BOOST_THROW_EXCEPTION(Error("Missing required HyperbolicAngle field"));
+      NDN_THROW(Error("Missing required HyperbolicAngle field"));
     }
   }
   m_hyperbolicAngles = angles;
diff --git a/src/lsa/lsa.cpp b/src/lsa/lsa.cpp
index dd8267e..25841d2 100644
--- a/src/lsa/lsa.cpp
+++ b/src/lsa/lsa.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -73,7 +73,7 @@
     m_originRouter.wireDecode(*val);
   }
   else {
-    BOOST_THROW_EXCEPTION(Error("OriginRouter: Missing required Name field"));
+    NDN_THROW(Error("OriginRouter: Missing required Name field"));
   }
 
   ++val;
@@ -83,14 +83,14 @@
     ++val;
   }
   else {
-    BOOST_THROW_EXCEPTION(Error("Missing required SequenceNumber field"));
+    NDN_THROW(Error("Missing required SequenceNumber field"));
   }
 
   if (val != baseWire.elements_end() && val->type() == ndn::tlv::nlsr::ExpirationTime) {
     m_expirationTimePoint = ndn::time::fromString(readString(*val));
   }
   else {
-    BOOST_THROW_EXCEPTION(Error("Missing required ExpirationTimePoint field"));
+    NDN_THROW(Error("Missing required ExpirationTime field"));
   }
 }
 
diff --git a/src/lsa/lsa.hpp b/src/lsa/lsa.hpp
index a44a594..7fb1058 100644
--- a/src/lsa/lsa.hpp
+++ b/src/lsa/lsa.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -28,7 +28,6 @@
 #include "test-access-control.hpp"
 
 #include <ndn-cxx/util/scheduler.hpp>
-#include <ndn-cxx/util/time.hpp>
 
 namespace nlsr {
 
@@ -45,11 +44,7 @@
   class Error : public ndn::tlv::Error
   {
   public:
-    explicit
-    Error(const std::string& what)
-      : ndn::tlv::Error(what)
-    {
-    }
+    using ndn::tlv::Error::Error;
   };
 
   enum class Type {
diff --git a/src/lsa/name-lsa.cpp b/src/lsa/name-lsa.cpp
index cfdfd77..173b9c7 100644
--- a/src/lsa/name-lsa.cpp
+++ b/src/lsa/name-lsa.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -85,8 +85,7 @@
   m_wire = wire;
 
   if (m_wire.type() != ndn::tlv::nlsr::NameLsa) {
-    BOOST_THROW_EXCEPTION(Error("Expected NameLsa Block, but Block is of a different type: #" +
-                                ndn::to_string(m_wire.type())));
+    NDN_THROW(Error("NameLsa", m_wire.type()));
   }
 
   m_wire.parse();
@@ -98,7 +97,7 @@
     ++val;
   }
   else {
-    BOOST_THROW_EXCEPTION(Error("Missing required Lsa field"));
+    NDN_THROW(Error("Missing required Lsa field"));
   }
 
   NamePrefixList npl;
@@ -107,11 +106,9 @@
       npl.insert(ndn::Name(*val));
     }
     else {
-      BOOST_THROW_EXCEPTION(Error("Expected Name Block, but Block is of a different type: #" +
-                                  ndn::to_string(m_wire.type())));
+      NDN_THROW(Error("Name", val->type()));
     }
   }
-
   m_npl = npl;
 }
 
diff --git a/src/lsdb.cpp b/src/lsdb.cpp
index fb4bcb7..a2f552d 100644
--- a/src/lsdb.cpp
+++ b/src/lsdb.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -213,7 +213,7 @@
 }
 
 void
-Lsdb::installLsa(shared_ptr<Lsa> lsa)
+Lsdb::installLsa(std::shared_ptr<Lsa> lsa)
 {
   auto timeToExpire = m_lsaRefreshTime;
 
diff --git a/src/lsdb.hpp b/src/lsdb.hpp
index a342284..9a5f147 100644
--- a/src/lsdb.hpp
+++ b/src/lsdb.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -45,13 +45,9 @@
 
 #include <PSync/segment-publisher.hpp>
 
-#include <utility>
-#include <boost/cstdint.hpp>
-
 namespace nlsr {
 
 namespace bmi = boost::multi_index;
-using namespace ndn::literals::time_literals;
 
 static constexpr ndn::time::seconds GRACE_PERIOD = 10_s;
 
@@ -232,7 +228,7 @@
   }
 
   void
-  installLsa(shared_ptr<Lsa> lsa);
+  installLsa(std::shared_ptr<Lsa> lsa);
 
   /*! \brief Remove a name LSA from the LSDB.
     \param router The name of the router that published the LSA to remove.
diff --git a/src/main.cpp b/src/main.cpp
index 16d9c2a..7fa5062 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -20,33 +20,12 @@
  **/
 
 #include "conf-file-processor.hpp"
-#include "security/certificate-store.hpp"
 #include "nlsr.hpp"
+#include "security/certificate-store.hpp"
 #include "version.hpp"
 
-#include <boost/exception/get_error_info.hpp>
-#include <sstream>
-
-template<typename E>
-static std::string
-getExtendedErrorMessage(const E& exception)
-{
-  std::ostringstream errorMessage;
-  errorMessage << exception.what();
-
-  const char* const* file = boost::get_error_info<boost::throw_file>(exception);
-  const int* line = boost::get_error_info<boost::throw_line>(exception);
-  const char* const* func = boost::get_error_info<boost::throw_function>(exception);
-  if (file && line) {
-    errorMessage << " [from " << *file << ":" << *line;
-    if (func) {
-      errorMessage << " in " << *func;
-    }
-    errorMessage << "]";
-  }
-
-  return errorMessage.str();
-}
+#include <boost/exception/diagnostic_information.hpp>
+#include <iostream>
 
 static void
 printUsage(std::ostream& os, const std::string& programName)
@@ -95,6 +74,7 @@
     std::cerr << "Error in configuration file processing" << std::endl;
     return 2;
   }
+
   // Since confParam is already populated, key is initialized here before
   // and independent of the NLSR class
   auto certificate = confParam.initializeKey();
@@ -102,7 +82,6 @@
   nlsr::Nlsr nlsr(face, keyChain, confParam);
 
   nlsr::security::CertificateStore certStore(face, confParam, nlsr.getLsdb());
-
   if (certificate) {
     certStore.insert(*certificate);
   }
@@ -112,7 +91,7 @@
   }
   catch (const std::exception& e) {
     nlsr.getFib().clean();
-    std::cerr << "FATAL: " << getExtendedErrorMessage(e) << std::endl;
+    std::cerr << "FATAL: " << boost::diagnostic_information(e) << std::endl;
     return 1;
   }
 
diff --git a/src/nlsr.cpp b/src/nlsr.cpp
index 590c8a4..b8cec28 100644
--- a/src/nlsr.cpp
+++ b/src/nlsr.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -24,11 +24,8 @@
 #include "logger.hpp"
 
 #include <cstdlib>
-#include <string>
-#include <sstream>
 #include <cstdio>
 #include <unistd.h>
-#include <vector>
 
 #include <ndn-cxx/net/face-uri.hpp>
 
@@ -426,8 +423,8 @@
   m_controller.start<ndn::nfd::FaceUpdateCommand>(
     ndn::nfd::ControlParameters()
       .setFlagBit(ndn::nfd::FaceFlagBit::BIT_LOCAL_FIELDS_ENABLED, true),
-    bind(&Nlsr::onFaceIdIndicationSuccess, this, _1),
-    bind(&Nlsr::onFaceIdIndicationFailure, this, _1));
+    std::bind(&Nlsr::onFaceIdIndicationSuccess, this, _1),
+    std::bind(&Nlsr::onFaceIdIndicationFailure, this, _1));
 }
 
 void
@@ -440,11 +437,8 @@
 void
 Nlsr::onFaceIdIndicationFailure(const ndn::nfd::ControlResponse& cr)
 {
-  std::ostringstream os;
-  os << "Failed to enable incoming face id indication feature: " <<
-        "(code: " << cr.getCode() << ", reason: " << cr.getText() << ")";
-
-  NLSR_LOG_DEBUG(os.str());
+  NLSR_LOG_DEBUG("Failed to enable incoming face id indication feature: " <<
+                 "(code: " << cr.getCode() << ", reason: " << cr.getText() << ")");
 }
 
 } // namespace nlsr
diff --git a/src/nlsr.hpp b/src/nlsr.hpp
index 841a15a..23d73c2 100644
--- a/src/nlsr.hpp
+++ b/src/nlsr.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -38,10 +38,6 @@
 #include "utility/name-helper.hpp"
 #include "stats-collector.hpp"
 
-#include <boost/cstdint.hpp>
-#include <stdexcept>
-#include <boost/throw_exception.hpp>
-
 #include <ndn-cxx/face.hpp>
 #include <ndn-cxx/security/key-chain.hpp>
 #include <ndn-cxx/security/certificate-fetcher-direct-fetch.hpp>
@@ -69,11 +65,7 @@
   class Error : public std::runtime_error
   {
   public:
-    explicit
-    Error(const std::string& what)
-      : std::runtime_error(what)
-    {
-    }
+    using std::runtime_error::runtime_error;
   };
 
   Nlsr(ndn::Face& face, ndn::KeyChain& keyChain, ConfParameter& confParam);
diff --git a/src/route/name-prefix-table.cpp b/src/route/name-prefix-table.cpp
index 55f0c54..91e6210 100644
--- a/src/route/name-prefix-table.cpp
+++ b/src/route/name-prefix-table.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -94,11 +94,12 @@
   // Either we have to make a new NPT entry or there already was one.
   if (nameItr == m_table.end()) {
     NLSR_LOG_DEBUG("Adding origin: " << rtpePtr->getDestination()
-               << " to a new name prefix: " << name);
-    npte = make_shared<NamePrefixTableEntry>(name);
+                   << " to a new name prefix: " << name);
+    npte = std::make_shared<NamePrefixTableEntry>(name);
     npte->addRoutingTableEntry(rtpePtr);
     npte->generateNhlfromRteList();
     m_table.push_back(npte);
+
     // If this entry has next hops, we need to inform the FIB
     if (npte->getNexthopList().size() > 0) {
       NLSR_LOG_TRACE("Updating FIB with next hops for " << npte->getNamePrefix());
@@ -131,6 +132,7 @@
       m_fib.remove(name);
     }
   }
+
   // Add the reference to this NPT to the RTPE.
   rtpePtr->namePrefixTableEntries.emplace(
     std::make_pair(npte->getNamePrefix(), std::weak_ptr<NamePrefixTableEntry>(npte)));
diff --git a/src/route/nexthop.cpp b/src/route/nexthop.cpp
index 11399aa..bdb0bde 100644
--- a/src/route/nexthop.cpp
+++ b/src/route/nexthop.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -69,25 +69,28 @@
   m_wire = wire;
 
   if (m_wire.type() != ndn::tlv::nlsr::NextHop) {
-    std::stringstream error;
-    error << "Expected NextHop Block, but Block is of a different type: #"
-          << m_wire.type();
-    BOOST_THROW_EXCEPTION(Error(error.str()));
+    NDN_THROW(Error("NextHop", m_wire.type()));
   }
 
   m_wire.parse();
 
-  ndn::Block::element_const_iterator val = m_wire.elements_begin();
+  auto val = m_wire.elements_begin();
 
   if (val != m_wire.elements_end() && val->type() == ndn::tlv::nlsr::Uri) {
-    m_connectingFaceUri.assign(reinterpret_cast<const char*>(val->value()), val->value_size());
+    m_connectingFaceUri = ndn::encoding::readString(*val);
     ++val;
   }
   else {
-    BOOST_THROW_EXCEPTION(Error("Missing required Uri field"));
+    NDN_THROW(Error("Missing required Uri field"));
   }
 
-  m_routeCost = ndn::encoding::readDouble(*val);
+  if (val != m_wire.elements_end() && val->type() == ndn::tlv::nlsr::CostDouble) {
+    m_routeCost = ndn::encoding::readDouble(*val);
+    ++val;
+  }
+  else {
+    NDN_THROW(Error("Missing required CostDouble field"));
+  }
 }
 
 bool
diff --git a/src/route/nexthop.hpp b/src/route/nexthop.hpp
index 7f91cfe..4443a9e 100644
--- a/src/route/nexthop.hpp
+++ b/src/route/nexthop.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -27,9 +27,8 @@
 #include <ndn-cxx/encoding/encoding-buffer.hpp>
 #include <ndn-cxx/encoding/tlv.hpp>
 
-#include <iostream>
 #include <cmath>
-#include <boost/cstdint.hpp>
+#include <ostream>
 
 namespace nlsr {
 
diff --git a/src/route/routing-table-calculator.hpp b/src/route/routing-table-calculator.hpp
index 9c0c6b5..b497c06 100644
--- a/src/route/routing-table-calculator.hpp
+++ b/src/route/routing-table-calculator.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -28,9 +28,6 @@
 #include "conf-parameter.hpp"
 
 #include <list>
-#include <boost/cstdint.hpp>
-
-#include <ndn-cxx/name.hpp>
 
 namespace nlsr {
 
diff --git a/src/route/routing-table-entry.cpp b/src/route/routing-table-entry.cpp
index 7320d91..950240e 100644
--- a/src/route/routing-table-entry.cpp
+++ b/src/route/routing-table-entry.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -70,14 +70,10 @@
   m_wire = wire;
 
   if (m_wire.type() != ndn::tlv::nlsr::RoutingTableEntry) {
-    std::stringstream error;
-    error << "Expected RoutingTable Block, but Block is of a different type: #"
-          << m_wire.type();
-    BOOST_THROW_EXCEPTION(Error(error.str()));
+    NDN_THROW(Error("RoutingTableEntry", m_wire.type()));
   }
 
   m_wire.parse();
-
   auto val = m_wire.elements_begin();
 
   if (val != m_wire.elements_end() && val->type() == ndn::tlv::Name) {
@@ -85,7 +81,7 @@
     ++val;
   }
   else {
-    BOOST_THROW_EXCEPTION(Error("Missing required destination field"));
+    NDN_THROW(Error("Missing required Name field"));
   }
 
   for (; val != m_wire.elements_end(); ++val) {
@@ -93,10 +89,7 @@
       m_nexthopList.addNextHop(NextHop(*val));
     }
     else {
-      std::stringstream error;
-      error << "Expected NextHop Block, but Block is of a different type: #"
-            << m_wire.type();
-      BOOST_THROW_EXCEPTION(Error(error.str()));
+      NDN_THROW(Error("NextHop", val->type()));
     }
   }
 }
@@ -104,10 +97,8 @@
 std::ostream&
 operator<<(std::ostream& os, const RoutingTableEntry& rte)
 {
-  os << "  Destination: " << rte.getDestination() << "\n"
-     << rte.getNexthopList() << "\n";
-
-  return os;
+  return os << "  Destination: " << rte.getDestination() << "\n"
+            << rte.getNexthopList() << "\n";
 }
 
 } // namespace nlsr
diff --git a/src/route/routing-table.cpp b/src/route/routing-table.cpp
index 74d3c11..b600882 100644
--- a/src/route/routing-table.cpp
+++ b/src/route/routing-table.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -273,14 +273,10 @@
   m_wire = wire;
 
   if (m_wire.type() != ndn::tlv::nlsr::RoutingTable) {
-    std::stringstream error;
-    error << "Expected RoutingTableStatus Block, but Block is of a different type: #"
-          << m_wire.type();
-    BOOST_THROW_EXCEPTION(Error(error.str()));
+    NDN_THROW(Error("RoutingTable", m_wire.type()));
   }
 
   m_wire.parse();
-
   auto val = m_wire.elements_begin();
 
   std::set<ndn::Name> destinations;
@@ -297,10 +293,7 @@
   }
 
   if (val != m_wire.elements_end()) {
-    std::stringstream error;
-    error << "Expected the end of elements, but Block is of a different type: #"
-          << val->type();
-    BOOST_THROW_EXCEPTION(Error(error.str()));
+    NDN_THROW(Error("Unrecognized TLV of type " + ndn::to_string(val->type()) + " in RoutingTable"));
   }
 }
 
diff --git a/src/security/certificate-store.cpp b/src/security/certificate-store.cpp
index 684969a..99067a7 100644
--- a/src/security/certificate-store.cpp
+++ b/src/security/certificate-store.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -129,14 +129,14 @@
 void
 CertificateStore::onKeyPrefixRegSuccess(const ndn::Name& name)
 {
-  NLSR_LOG_DEBUG("KEY prefix: " << name << " registration is successful.");
+  NLSR_LOG_DEBUG("KEY prefix: " << name << " registration is successful");
 }
 
 void
 CertificateStore::registrationFailed(const ndn::Name& name)
 {
-  NLSR_LOG_ERROR("ERROR: Failed to register prefix " << name);
-  BOOST_THROW_EXCEPTION(std::runtime_error("Prefix registration failed"));
+  NLSR_LOG_ERROR("Failed to register prefix " << name);
+  NDN_THROW(std::runtime_error("Prefix registration failed"));
 }
 
 void
diff --git a/src/sequencing-manager.hpp b/src/sequencing-manager.hpp
index 9cb349d..586abc2 100644
--- a/src/sequencing-manager.hpp
+++ b/src/sequencing-manager.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -30,7 +30,6 @@
 
 #include <list>
 #include <string>
-#include <boost/cstdint.hpp>
 
 namespace nlsr {
 
diff --git a/src/update/manager-base.hpp b/src/update/manager-base.hpp
index 4d279c7..f9fa17c 100644
--- a/src/update/manager-base.hpp
+++ b/src/update/manager-base.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2019,  The University of Memphis,
+/*
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -17,7 +17,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NLSR, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #ifndef NLSR_MANAGER_BASE_HPP
 #define NLSR_MANAGER_BASE_HPP
@@ -37,6 +37,7 @@
 #include <ndn-cxx/mgmt/nfd/control-response.hpp>
 
 #include <boost/noncopyable.hpp>
+#include <iostream>
 
 namespace nlsr {
 
@@ -52,16 +53,10 @@
   class Error : public std::runtime_error
   {
   public:
-    explicit
-    Error(const std::string& what)
-      : std::runtime_error(what)
-    {
-    }
+    using std::runtime_error::runtime_error;
   };
 
-public:
-  ManagerBase(ndn::mgmt::Dispatcher& m_dispatcher,
-              const std::string& module);
+  ManagerBase(ndn::mgmt::Dispatcher& m_dispatcher, const std::string& module);
 
 protected:
   /*! \brief generate the relative prefix for a handler by appending the verb name to the module name
@@ -76,16 +71,15 @@
   bool
   validateParameters(const ndn::mgmt::ControlParameters& parameters)
   {
-    const ndn::nfd::ControlParameters* castParams =
-    dynamic_cast<const ndn::nfd::ControlParameters*>(&parameters);
-
+    const auto* castParams = dynamic_cast<const ndn::nfd::ControlParameters*>(&parameters);
     BOOST_ASSERT(castParams != nullptr);
+
     T command;
     try {
       command.validateRequest(*castParams);
     }
-    catch (const ndn::nfd::ControlCommand::ArgumentError& ae) {
-      throw ae;
+    catch (const ndn::nfd::ControlCommand::ArgumentError&) {
+      throw;
     }
     catch (const std::exception& e) {
       std::cerr << e.what() << std::endl;
diff --git a/src/update/nfd-rib-command-processor.cpp b/src/update/nfd-rib-command-processor.cpp
index 331a3ca..2570797 100644
--- a/src/update/nfd-rib-command-processor.cpp
+++ b/src/update/nfd-rib-command-processor.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2018,  The University of Memphis,
+/*
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -17,7 +17,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NLSR, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "nfd-rib-command-processor.hpp"
 
@@ -32,12 +32,12 @@
   m_dispatcher.addControlCommand<ndn::nfd::ControlParameters>(makeRelPrefix("register"),
     ndn::mgmt::makeAcceptAllAuthorization(),
     std::bind(&NfdRibCommandProcessor::validateParameters<NfdRibRegisterCommand>, this, _1),
-    bind(&NfdRibCommandProcessor::advertiseAndInsertPrefix, this, _1, _2, _3, _4));
+    std::bind(&NfdRibCommandProcessor::advertiseAndInsertPrefix, this, _1, _2, _3, _4));
 
   m_dispatcher.addControlCommand<ndn::nfd::ControlParameters>(makeRelPrefix("unregister"),
     ndn::mgmt::makeAcceptAllAuthorization(),
     std::bind(&NfdRibCommandProcessor::validateParameters<NfdRibUnregisterCommand>, this, _1),
-    bind(&NfdRibCommandProcessor::withdrawAndRemovePrefix, this, _1, _2, _3, _4));
+    std::bind(&NfdRibCommandProcessor::withdrawAndRemovePrefix, this, _1, _2, _3, _4));
 }
 
 } // namespace update
diff --git a/src/update/prefix-update-processor.cpp b/src/update/prefix-update-processor.cpp
index 956fc7b..99cd76b 100644
--- a/src/update/prefix-update-processor.cpp
+++ b/src/update/prefix-update-processor.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -22,8 +22,10 @@
 #include "prefix-update-processor.hpp"
 #include "lsdb.hpp"
 #include "nlsr.hpp"
-#include <ndn-cxx/mgmt/nfd/control-response.hpp>
+
 #include <ndn-cxx/face.hpp>
+#include <ndn-cxx/mgmt/nfd/control-response.hpp>
+
 #include <boost/algorithm/string.hpp>
 #include <algorithm>
 
@@ -41,7 +43,7 @@
 static ndn::optional<std::string>
 getSignerFromTag(const ndn::Interest& interest)
 {
-  shared_ptr<SignerTag> signerTag = interest.getTag<SignerTag>();
+  auto signerTag = interest.getTag<SignerTag>();
   if (signerTag == nullptr) {
     return ndn::nullopt;
   }
diff --git a/src/utility/name-helper.hpp b/src/utility/name-helper.hpp
index 4bdd38b..5fec4fc 100644
--- a/src/utility/name-helper.hpp
+++ b/src/utility/name-helper.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017,  The University of Memphis,
+/*
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -18,17 +18,12 @@
  * NLSR, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  *
  * \author A K M Mahmudul Hoque <ahoque1@memphis.edu>
- *
- **/
+ */
+
 #ifndef NLSR_NAME_HELPER_HPP
 #define NLSR_NAME_HELPER_HPP
 
-#include <boost/algorithm/string.hpp>
-#include <boost/algorithm/string/regex_find_format.hpp>
-#include <boost/regex.hpp>
-#include <boost/cstdint.hpp>
-#include <ndn-cxx/name-component.hpp>
-#include <ndn-cxx/name.hpp>
+#include "common.hpp"
 
 namespace nlsr {
 namespace util {
@@ -40,7 +35,7 @@
    \return -1 if searchString not found else return the position
    starting from 0
  */
-inline static int32_t
+inline int32_t
 getNameComponentPosition(const ndn::Name& name, const std::string& searchString)
 {
   ndn::name::Component component(searchString);
@@ -54,7 +49,6 @@
 }
 
 } // namespace util
-
 } // namespace nlsr
 
-#endif //NLSR_NAME_HELPER_HPP
+#endif // NLSR_NAME_HELPER_HPP
diff --git a/tests/route/test-name-prefix-table.cpp b/tests/route/test-name-prefix-table.cpp
index d603d91..9585106 100644
--- a/tests/route/test-name-prefix-table.cpp
+++ b/tests/route/test-name-prefix-table.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -181,7 +181,7 @@
   RoutingTablePoolEntry rtpe1("/ndn/memphis/rtr1", 0);
 
   NamePrefixTableEntry npte1("/ndn/memphis/rtr2");
-  npt.m_table.push_back(make_shared<NamePrefixTableEntry>(npte1));
+  npt.m_table.push_back(std::make_shared<NamePrefixTableEntry>(npte1));
 
   npt.addEntry("/ndn/memphis/rtr2", "/ndn/memphis/rtr1");
   npt.addEntry("/ndn/memphis/rtr2", "/ndn/memphis/altrtr");
@@ -204,7 +204,7 @@
 BOOST_FIXTURE_TEST_CASE(AddNptEntryPtrToRoutingEntry, NamePrefixTableFixture)
 {
   NamePrefixTableEntry npte1("/ndn/memphis/rtr2");
-  npt.m_table.push_back(make_shared<NamePrefixTableEntry>(npte1));
+  npt.m_table.push_back(std::make_shared<NamePrefixTableEntry>(npte1));
 
   npt.addEntry("/ndn/memphis/rtr2", "/ndn/memphis/rtr1");
 
@@ -232,8 +232,8 @@
   NamePrefixTableEntry npte1("/ndn/memphis/rtr1");
   NamePrefixTableEntry npte2("/ndn/memphis/rtr2");
   RoutingTableEntry rte1("/ndn/memphis/destination1");
-  npt.m_table.push_back(make_shared<NamePrefixTableEntry>(npte1));
-  npt.m_table.push_back(make_shared<NamePrefixTableEntry>(npte2));
+  npt.m_table.push_back(std::make_shared<NamePrefixTableEntry>(npte1));
+  npt.m_table.push_back(std::make_shared<NamePrefixTableEntry>(npte2));
 
   npt.addEntry(npte1.getNamePrefix(), rte1.getDestination());
   // We have to add two entries, otherwise the routing pool entry will be deleted.
diff --git a/tests/test-common.hpp b/tests/test-common.hpp
index ea48ecc..495f0ba 100644
--- a/tests/test-common.hpp
+++ b/tests/test-common.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -40,8 +40,6 @@
 namespace nlsr {
 namespace test {
 
-using namespace ndn::time_literals;
-
 ndn::Data&
 signData(ndn::Data& data);
 
@@ -50,8 +48,8 @@
 
 /** \brief add a fake signature to Data
  */
-inline shared_ptr<ndn::Data>
-signData(shared_ptr<ndn::Data> data)
+inline std::shared_ptr<ndn::Data>
+signData(std::shared_ptr<ndn::Data> data)
 {
   signData(*data);
   return data;
@@ -158,7 +156,7 @@
                          " cannot be satisfied by this Data " << name);
     }
 
-    auto data = make_shared<ndn::Data>(name);
+    auto data = std::make_shared<ndn::Data>(name);
     data->setFreshnessPeriod(1_s);
     data->setFinalBlock(name[-1]);
     data->setContent(std::forward<ContentArgs>(contentArgs)...);
diff --git a/tests/test-lsdb.cpp b/tests/test-lsdb.cpp
index 13f96a6..317cc6b 100644
--- a/tests/test-lsdb.cpp
+++ b/tests/test-lsdb.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -34,8 +34,6 @@
 namespace nlsr {
 namespace test {
 
-using namespace ndn::time_literals;
-
 class LsdbFixture : public UnitTestTimeFixture
 {
 public:
diff --git a/tests/test-nlsr.cpp b/tests/test-nlsr.cpp
index 6c46205..dc91c73 100644
--- a/tests/test-nlsr.cpp
+++ b/tests/test-nlsr.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -29,8 +29,6 @@
 namespace nlsr {
 namespace test {
 
-using namespace ndn::time_literals;
-
 class NlsrFixture : public MockNfdMgmtFixture
 {
 public:
