diff --git a/src/common.hpp b/src/common.hpp
index 4b36208..2fa27b9 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-2020, Regents of the University of California.
+ * Copyright (c) 2014-2022, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -25,22 +25,19 @@
 #include <ndn-cxx/data.hpp>
 #include <ndn-cxx/face.hpp>
 #include <ndn-cxx/interest.hpp>
-#include <ndn-cxx/key-locator.hpp>
 #include <ndn-cxx/name.hpp>
-#include <ndn-cxx/security/key-chain.hpp>
-#include <ndn-cxx/security/validator.hpp>
-#include <ndn-cxx/security/validator-config.hpp>
-#include <ndn-cxx/util/time.hpp>
 #include <ndn-cxx/util/scheduler.hpp>
+#include <ndn-cxx/util/time.hpp>
 
-#include <boost/utility.hpp>
+#include <boost/core/noncopyable.hpp>
 
 #include <algorithm>
 #include <functional>
-#include <iostream>
+#include <iosfwd>
 #include <list>
 #include <map>
 #include <memory>
+#include <stdexcept>
 #include <string>
 #include <vector>
 
@@ -52,24 +49,21 @@
 
 namespace repo {
 
-using ndn::Face;
-using ndn::Block;
-using ndn::operator ""_block;
-using ndn::Name;
-namespace name = ndn::name;
-using ndn::Interest;
-using ndn::Data;
-using ndn::KeyLocator;
-using ndn::Scheduler;
-using ndn::security::KeyChain;
-using ndn::security::Validator;
-using ndn::security::ValidationError;
-using ndn::security::ValidatorConfig;
-
 using boost::noncopyable;
 
-typedef uint64_t ProcessId;
-typedef uint64_t SegmentNo;
+using ndn::Face;
+using ndn::Block;
+using ndn::Name;
+using ndn::Interest;
+using ndn::Data;
+using ndn::Scheduler;
+
+using ndn::operator""_block;
+namespace time = ndn::time;
+using namespace ndn::time_literals;
+
+using ProcessId = uint64_t;
+using SegmentNo = uint64_t;
 
 } // namespace repo
 
diff --git a/src/handles/command-base-handle.cpp b/src/handles/command-base-handle.cpp
index a820e3b..ba126c0 100644
--- a/src/handles/command-base-handle.cpp
+++ b/src/handles/command-base-handle.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020, Regents of the University of California.
+ * Copyright (c) 2014-2022, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -19,7 +19,7 @@
 
 #include "command-base-handle.hpp"
 
-#include <ndn-cxx/util/random.hpp>
+#include <optional>
 
 namespace repo {
 
@@ -29,23 +29,23 @@
 
 /** \brief obtain signer from SignerTag attached to Interest, if available
  */
-static ndn::optional<std::string>
+static std::optional<std::string>
 getSignerFromTag(const ndn::Interest& interest)
 {
-  std::shared_ptr<SignerTag> signerTag = interest.getTag<SignerTag>();
+  auto signerTag = interest.getTag<SignerTag>();
   if (signerTag == nullptr) {
-    return ndn::nullopt;
+    return std::nullopt;
   }
   else {
     return signerTag->get().toUri();
   }
 }
 
-CommandBaseHandle::CommandBaseHandle(Face& face, RepoStorage& storageHandle,
-                  Scheduler& scheduler, Validator& validator)
+CommandBaseHandle::CommandBaseHandle(Face& face, RepoStorage& storage,
+                                     Scheduler& sched, ndn::security::Validator& validator)
   : face(face)
-  , storageHandle(storageHandle)
-  , scheduler(scheduler)
+  , storageHandle(storage)
+  , scheduler(sched)
   , m_validator(validator)
 {
 }
@@ -53,19 +53,16 @@
 ndn::mgmt::Authorization
 CommandBaseHandle::makeAuthorization()
 {
-  return [=] (const ndn::Name& prefix, const ndn::Interest& interest,
-            const ndn::mgmt::ControlParameters* params,
-            const ndn::mgmt::AcceptContinuation& accept,
-            const ndn::mgmt::RejectContinuation& reject) {
+  return [=] (const ndn::Name&, const auto& interest,
+              const ndn::mgmt::ControlParameters*,
+              const ndn::mgmt::AcceptContinuation& accept,
+              const ndn::mgmt::RejectContinuation& reject) {
   m_validator.validate(interest,
-    [accept] (const ndn::Interest& request) {
-
-      auto signer1 = getSignerFromTag(request);
-      std::string signer = signer1.value_or("*");
+    [accept] (const auto& request) {
+      auto signer = getSignerFromTag(request).value_or("*");
       accept(signer);
     },
-    [reject] (const ndn::Interest& request,
-              const ndn::security::ValidationError& error) {
+    [reject] (auto&&...) {
       reject(ndn::mgmt::RejectReply::STATUS403);
     });
   };
diff --git a/src/handles/command-base-handle.hpp b/src/handles/command-base-handle.hpp
index 205b884..520b7d0 100644
--- a/src/handles/command-base-handle.hpp
+++ b/src/handles/command-base-handle.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018, Regents of the University of California.
+ * Copyright (c) 2014-2022, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -28,6 +28,7 @@
 #include "repo-command.hpp"
 
 #include <ndn-cxx/mgmt/dispatcher.hpp>
+#include <ndn-cxx/security/validator.hpp>
 
 namespace repo {
 
@@ -37,16 +38,12 @@
   class Error : public std::runtime_error
   {
   public:
-    explicit
-    Error(const std::string& what)
-      : std::runtime_error(what)
-    {
-    }
+    using std::runtime_error::runtime_error;
   };
 
 public:
   CommandBaseHandle(Face& face, RepoStorage& storageHandle,
-                    Scheduler& scheduler, Validator& validator);
+                    Scheduler& scheduler, ndn::security::Validator& validator);
 
   virtual
   ~CommandBaseHandle() = default;
@@ -58,14 +55,14 @@
   bool
   validateParameters(const ndn::mgmt::ControlParameters& parameters)
   {
-    const RepoCommandParameter* castParams =
-      dynamic_cast<const RepoCommandParameter*>(&parameters);
+    const auto* castParams = dynamic_cast<const RepoCommandParameter*>(&parameters);
     BOOST_ASSERT(castParams != nullptr);
+
     T command;
     try {
       command.validateRequest(*castParams);
     }
-    catch (const RepoCommand::ArgumentError& ae) {
+    catch (const RepoCommand::ArgumentError&) {
       return false;
     }
     return true;
@@ -77,8 +74,9 @@
   Scheduler& scheduler;
 
 private:
-  Validator& m_validator;
+  ndn::security::Validator& m_validator;
 };
+
 } // namespace repo
 
-#endif // REPO_HANDLES_COMMAND_BASE_HANDLE_HPP
\ No newline at end of file
+#endif // REPO_HANDLES_COMMAND_BASE_HANDLE_HPP
diff --git a/src/handles/delete-handle.cpp b/src/handles/delete-handle.cpp
index c892583..d9efe76 100644
--- a/src/handles/delete-handle.cpp
+++ b/src/handles/delete-handle.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018, Regents of the University of California.
+ * Copyright (c) 2014-2022, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -27,7 +27,7 @@
 
 DeleteHandle::DeleteHandle(Face& face, RepoStorage& storageHandle,
                            ndn::mgmt::Dispatcher& dispatcher, Scheduler& scheduler,
-                           Validator& validator)
+                           ndn::security::Validator& validator)
   : CommandBaseHandle(face, storageHandle, scheduler, validator)
 {
   dispatcher.addControlCommand<RepoCommandParameter>(ndn::PartialName("delete"),
@@ -72,7 +72,8 @@
 }
 
 RepoCommandResponse
-DeleteHandle::negativeReply(const Interest& interest, uint64_t statusCode, std::string text) const
+DeleteHandle::negativeReply(const Interest& interest, uint64_t statusCode,
+                            const std::string& text) const
 {
   RepoCommandResponse response(statusCode, text);
   response.setBody(response.wireEncode());
@@ -108,9 +109,9 @@
       nDeletedData++;
     }
   }
+
   //All the data deleted, return 200
   done(positiveReply(interest, parameter, 200, nDeletedData));
-
 }
 
 } // namespace repo
diff --git a/src/handles/delete-handle.hpp b/src/handles/delete-handle.hpp
index ca32709..6bce2c1 100644
--- a/src/handles/delete-handle.hpp
+++ b/src/handles/delete-handle.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018, Regents of the University of California.
+ * Copyright (c) 2014-2022, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -22,27 +22,20 @@
 
 #include "command-base-handle.hpp"
 
-#include <ndn-cxx/mgmt/dispatcher.hpp>
-
 namespace repo {
 
 class DeleteHandle : public CommandBaseHandle
 {
-
 public:
   class Error : public CommandBaseHandle::Error
   {
   public:
-    explicit
-    Error(const std::string& what)
-      : CommandBaseHandle::Error(what)
-    {
-    }
+    using CommandBaseHandle::Error::Error;
   };
 
-public:
   DeleteHandle(Face& face, RepoStorage& storageHandle,
-               ndn::mgmt::Dispatcher& dispatcher, Scheduler& scheduler, Validator& validator);
+               ndn::mgmt::Dispatcher& dispatcher, Scheduler& scheduler,
+               ndn::security::Validator& validator);
 
 private:
   void
@@ -55,7 +48,7 @@
                 uint64_t statusCode, uint64_t nDeletedData) const;
 
   RepoCommandResponse
-  negativeReply(const Interest& interest, uint64_t statusCode, const std::string text) const;
+  negativeReply(const Interest& interest, uint64_t statusCode, const std::string& text) const;
 
   void
   processSingleDeleteCommand(const Interest& interest, const RepoCommandParameter& parameter,
diff --git a/src/handles/tcp-bulk-insert-handle.hpp b/src/handles/tcp-bulk-insert-handle.hpp
index 49ee8e0..2930985 100644
--- a/src/handles/tcp-bulk-insert-handle.hpp
+++ b/src/handles/tcp-bulk-insert-handle.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019, Regents of the University of California.
+ * Copyright (c) 2014-2022, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -33,11 +33,7 @@
   class Error : public std::runtime_error
   {
   public:
-    explicit
-    Error(const std::string& what)
-      : std::runtime_error(what)
-    {
-    }
+    using std::runtime_error::runtime_error;
   };
 
 public:
diff --git a/src/handles/write-handle.cpp b/src/handles/write-handle.cpp
index d971878..1e30b5e 100644
--- a/src/handles/write-handle.cpp
+++ b/src/handles/write-handle.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019, Regents of the University of California.
+ * Copyright (c) 2014-2022, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -26,22 +26,14 @@
 
 NDN_LOG_INIT(repo.WriteHandle);
 
-static const int DEFAULT_CREDIT = 12;
-static const bool DEFAULT_CANBE_PREFIX = false;
-static const milliseconds MAX_TIMEOUT(60_s);
-static const milliseconds NOEND_TIMEOUT(10000_ms);
-static const milliseconds PROCESS_DELETE_TIME(10000_ms);
-static const milliseconds DEFAULT_INTEREST_LIFETIME(4000_ms);
+const int DEFAULT_CREDIT = 12;
+const time::milliseconds NOEND_TIMEOUT = 10_s;
+const time::milliseconds PROCESS_DELETE_TIME = 10_s;
 
 WriteHandle::WriteHandle(Face& face, RepoStorage& storageHandle, ndn::mgmt::Dispatcher& dispatcher,
-                         Scheduler& scheduler, Validator& validator)
+                         Scheduler& scheduler, ndn::security::Validator& validator)
   : CommandBaseHandle(face, storageHandle, scheduler, validator)
   , m_validator(validator)
-  , m_credit(DEFAULT_CREDIT)
-  , m_canBePrefix(DEFAULT_CANBE_PREFIX)
-  , m_maxTimeout(MAX_TIMEOUT)
-  , m_noEndTimeout(NOEND_TIMEOUT)
-  , m_interestLifetime(DEFAULT_INTEREST_LIFETIME)
 {
   dispatcher.addControlCommand<RepoCommandParameter>(ndn::PartialName("insert"),
     makeAuthorization(),
@@ -62,20 +54,20 @@
 
 void
 WriteHandle::handleInsertCommand(const Name& prefix, const Interest& interest,
-                                 const ndn::mgmt::ControlParameters& parameter,
+                                 const ndn::mgmt::ControlParameters& params,
                                  const ndn::mgmt::CommandContinuation& done)
 {
-  RepoCommandParameter* repoParameter =
-    dynamic_cast<RepoCommandParameter*>(const_cast<ndn::mgmt::ControlParameters*>(&parameter));
+  auto& repoParam = dynamic_cast<RepoCommandParameter&>(const_cast<ndn::mgmt::ControlParameters&>(params));
 
-  if (repoParameter->hasStartBlockId() || repoParameter->hasEndBlockId()) {
-    processSegmentedInsertCommand(interest, *repoParameter, done);
+  if (repoParam.hasStartBlockId() || repoParam.hasEndBlockId()) {
+    processSegmentedInsertCommand(interest, repoParam, done);
   }
   else {
-    processSingleInsertCommand(interest, *repoParameter, done);
+    processSingleInsertCommand(interest, repoParam, done);
   }
-  if (repoParameter->hasInterestLifetime())
-    m_interestLifetime = repoParameter->getInterestLifetime();
+  if (repoParam.hasInterestLifetime()) {
+    m_interestLifetime = repoParam.getInterestLifetime();
+  }
 }
 
 void
@@ -83,7 +75,7 @@
 {
   m_validator.validate(data,
                        std::bind(&WriteHandle::onDataValidated, this, interest, _1, processId),
-                       [](const Data& data, const ValidationError& error){NDN_LOG_ERROR("Error: " << error);});
+                       [] (auto&&, const auto& error) { NDN_LOG_ERROR("Error: " << error); });
 }
 
 void
@@ -128,7 +120,6 @@
 
   response.setCode(300);
   Interest fetchInterest(parameter.getName());
-  fetchInterest.setCanBePrefix(m_canBePrefix);
   fetchInterest.setInterestLifetime(m_interestLifetime);
   face.expressInterest(fetchInterest,
                        std::bind(&WriteHandle::onData, this, _1, _2, processId),
@@ -144,34 +135,32 @@
   Name name = parameter.getName();
   SegmentNo startBlockId = parameter.getStartBlockId();
 
-  uint64_t initialCredit = m_credit;
-
+  int initialCredit = DEFAULT_CREDIT;
   if (parameter.hasEndBlockId()) {
-    initialCredit =
-      std::min(initialCredit, parameter.getEndBlockId() - parameter.getStartBlockId() + 1);
+    initialCredit = std::min<int>(initialCredit, parameter.getEndBlockId() - parameter.getStartBlockId() + 1);
   }
   else {
     // set noEndTimeout timer
-    process.noEndTime = ndn::time::steady_clock::now() +
-                        m_noEndTimeout;
+    process.noEndTime = time::steady_clock::now() + NOEND_TIMEOUT;
   }
 
   Name fetchName = name;
-  SegmentNo segment = startBlockId;
-  fetchName.appendSegment(segment);
+  fetchName.appendSegment(startBlockId);
   Interest interest(fetchName);
 
   ndn::util::SegmentFetcher::Options options;
   options.initCwnd = initialCredit;
   options.interestLifetime = m_interestLifetime;
-  options.maxTimeout = m_maxTimeout;
   auto fetcher = ndn::util::SegmentFetcher::start(face, interest, m_validator, options);
-  fetcher->onError.connect([] (uint32_t errorCode, const std::string& errorMsg)
-                           {NDN_LOG_ERROR("Error: " << errorMsg);});
-  fetcher->afterSegmentValidated.connect([this, &fetcher, &processId] (const Data& data)
-                                         {onSegmentData(*fetcher, data, processId);});
-  fetcher->afterSegmentTimedOut.connect([this, &fetcher, &processId] ()
-                                        {onSegmentTimeout(*fetcher, processId);});
+  fetcher->onError.connect([] (uint32_t, const auto& errorMsg) {
+    NDN_LOG_ERROR("Error: " << errorMsg);
+  });
+  fetcher->afterSegmentValidated.connect([this, &fetcher, &processId] (const Data& data) {
+    onSegmentData(*fetcher, data, processId);
+  });
+  fetcher->afterSegmentTimedOut.connect([this, &fetcher, &processId] {
+    onSegmentTimeout(*fetcher, processId);
+  });
 }
 
 void
@@ -193,9 +182,8 @@
   ProcessInfo& process = m_processes[processId];
   //read whether notime timeout
   if (!response.hasEndBlockId()) {
-
-    ndn::time::steady_clock::TimePoint& noEndTime = process.noEndTime;
-    ndn::time::steady_clock::TimePoint now = ndn::time::steady_clock::now();
+    auto noEndTime = process.noEndTime;
+    auto now = time::steady_clock::now();
 
     if (now > noEndTime) {
       NDN_LOG_DEBUG("noEndtimeout: " << processId);
@@ -281,10 +269,10 @@
 
 void
 WriteHandle::handleCheckCommand(const Name& prefix, const Interest& interest,
-                                const ndn::mgmt::ControlParameters& parameter,
+                                const ndn::mgmt::ControlParameters& params,
                                 const ndn::mgmt::CommandContinuation& done)
 {
-  const RepoCommandParameter& repoParameter = dynamic_cast<const RepoCommandParameter&>(parameter);
+  const auto& repoParameter = dynamic_cast<const RepoCommandParameter&>(params);
 
   //check whether this process exists
   ProcessId processId = repoParameter.getProcessId();
@@ -324,8 +312,8 @@
 void
 WriteHandle::extendNoEndTime(ProcessInfo& process)
 {
-  auto& noEndTime = process.noEndTime;
-  auto now = ndn::time::steady_clock::now();
+  auto noEndTime = process.noEndTime;
+  auto now = time::steady_clock::now();
   RepoCommandResponse& response = process.response;
   if (now > noEndTime) {
     response.setCode(405);
@@ -333,7 +321,7 @@
   }
 
   //extends noEndTime
-  process.noEndTime = ndn::time::steady_clock::now() + m_noEndTimeout;
+  process.noEndTime = time::steady_clock::now() + NOEND_TIMEOUT;
 }
 
 RepoCommandResponse
@@ -341,7 +329,6 @@
 {
   RepoCommandResponse response(statusCode, text);
   response.setBody(response.wireEncode());
-
   return response;
 }
 
diff --git a/src/handles/write-handle.hpp b/src/handles/write-handle.hpp
index 115801e..04ed3f5 100644
--- a/src/handles/write-handle.hpp
+++ b/src/handles/write-handle.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018, Regents of the University of California.
+ * Copyright (c) 2014-2022, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -22,7 +22,6 @@
 
 #include "command-base-handle.hpp"
 
-#include <ndn-cxx/mgmt/dispatcher.hpp>
 #include <ndn-cxx/util/segment-fetcher.hpp>
 
 #include <queue>
@@ -52,23 +51,16 @@
  */
 class WriteHandle : public CommandBaseHandle
 {
-
 public:
   class Error : public CommandBaseHandle::Error
   {
   public:
-    explicit
-    Error(const std::string& what)
-      : CommandBaseHandle::Error(what)
-    {
-    }
+    using CommandBaseHandle::Error::Error;
   };
 
-
-public:
   WriteHandle(Face& face, RepoStorage& storageHandle,
               ndn::mgmt::Dispatcher& dispatcher, Scheduler& scheduler,
-              Validator& validator);
+              ndn::security::Validator& validator);
 
 private:
   /**
@@ -92,7 +84,7 @@
      * It is initialized to now()+noEndTimeout when segmented fetch process begins,
      * and reset to now()+noEndTimeout each time an insert status check command is processed.
      */
-    ndn::time::steady_clock::TimePoint noEndTime;
+    time::steady_clock::time_point noEndTime;
   };
 
 private: // insert command
@@ -105,7 +97,7 @@
                       const ndn::mgmt::CommandContinuation& done);
 
   void
-  onValidationFailed(const Interest& interest, const ValidationError& error);
+  onValidationFailed(const Interest& interest, const ndn::security::ValidationError& error);
 
 private: // single data fetching
   /**
@@ -171,7 +163,7 @@
                      const ndn::mgmt::CommandContinuation& done);
 
   void
-  onCheckValidationFailed(const Interest& interest, const ValidationError& error);
+  onCheckValidationFailed(const Interest& interest, const ndn::security::ValidationError& error);
 
 private:
   void
@@ -187,15 +179,9 @@
   negativeReply(std::string text, int statusCode);
 
 private:
-  Validator& m_validator;
-
+  ndn::security::Validator& m_validator;
   std::map<ProcessId, ProcessInfo> m_processes;
-
-  int m_credit;
-  bool m_canBePrefix;
-  ndn::time::milliseconds m_maxTimeout;
-  ndn::time::milliseconds m_noEndTimeout;
-  ndn::time::milliseconds m_interestLifetime;
+  time::milliseconds m_interestLifetime = ndn::DEFAULT_INTEREST_LIFETIME;
 };
 
 } // namespace repo
diff --git a/src/main.cpp b/src/main.cpp
index 6229759..767dc8f 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) 2018-2019, Regents of the University of California.
+ * Copyright (c) 2018-2022, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -21,6 +21,7 @@
 #include "extended-error-message.hpp"
 #include "repo.hpp"
 
+#include <iostream>
 #include <string.h> // for strsignal()
 
 #include <boost/asio/io_service.hpp>
diff --git a/src/repo-command-parameter.cpp b/src/repo-command-parameter.cpp
index 2f4de5c..4494eca 100644
--- a/src/repo-command-parameter.cpp
+++ b/src/repo-command-parameter.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018, Regents of the University of California.
+ * Copyright (c) 2014-2022, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -19,10 +19,7 @@
 
 #include "repo-command-parameter.hpp"
 
-#include <ndn-cxx/encoding/encoding-buffer.hpp>
 #include <ndn-cxx/encoding/block-helpers.hpp>
-#include <ndn-cxx/mgmt/control-parameters.hpp>
-#include <ndn-cxx/name.hpp>
 
 namespace repo {
 
@@ -63,7 +60,7 @@
 }
 
 RepoCommandParameter&
-RepoCommandParameter::setInterestLifetime(milliseconds interestLifetime)
+RepoCommandParameter::setInterestLifetime(time::milliseconds interestLifetime)
 {
   m_interestLifetime = interestLifetime;
   m_hasFields[REPO_PARAMETER_INTEREST_LIFETIME] = true;
@@ -73,7 +70,7 @@
 
 template<ndn::encoding::Tag T>
 size_t
-RepoCommandParameter::wireEncode(EncodingImpl<T>& encoder) const
+RepoCommandParameter::wireEncode(ndn::EncodingImpl<T>& encoder) const
 {
   size_t totalLength = 0;
   size_t variableLength = 0;
@@ -123,10 +120,10 @@
   if (m_wire.hasWire())
     return m_wire;
 
-  EncodingEstimator estimator;
+  ndn::EncodingEstimator estimator;
   size_t estimatedSize = wireEncode(estimator);
 
-  EncodingBuffer buffer(estimatedSize, 0);
+  ndn::EncodingBuffer buffer(estimatedSize, 0);
   wireEncode(buffer);
 
   m_wire = buffer.block();
@@ -136,15 +133,15 @@
 void
 RepoCommandParameter::wireDecode(const Block& wire)
 {
-  m_wire = wire;
+  if (wire.type() != tlv::RepoCommandParameter) {
+    NDN_THROW(Error("RepoCommandParameter", wire.type()));
+  }
 
+  m_wire = wire;
   m_wire.parse();
 
-  if (m_wire.type() != tlv::RepoCommandParameter)
-    BOOST_THROW_EXCEPTION(Error("Requested decoding of RepoCommandParameter, but Block is of different type"));
-
   // Name
-  Block::element_const_iterator val = m_wire.find(tlv::Name);
+  auto val = m_wire.find(tlv::Name);
   if (val != m_wire.elements_end())
   {
     m_hasFields[REPO_PARAMETER_NAME] = true;
@@ -175,42 +172,13 @@
     m_processId = readNonNegativeInteger(*val);
   }
 
-  // InterestLifeTime
+  // InterestLifetime
   val = m_wire.find(tlv::InterestLifetime);
   if (val != m_wire.elements_end())
   {
     m_hasFields[REPO_PARAMETER_INTEREST_LIFETIME] = true;
-    m_interestLifetime = milliseconds(readNonNegativeInteger(*val));
+    m_interestLifetime = time::milliseconds(readNonNegativeInteger(*val));
   }
 }
 
-std::ostream&
-operator<<(std::ostream& os, const RepoCommandParameter& repoCommandParameter)
-{
-  os << "RepoCommandParameter(";
-
-  // Name
-  if (repoCommandParameter.hasName()) {
-    os << " Name: " << repoCommandParameter.getName();
-  }
-  if (repoCommandParameter.hasStartBlockId()) {
-  // StartBlockId
-    os << " StartBlockId: " << repoCommandParameter.getStartBlockId();
-  }
-  // EndBlockId
-  if (repoCommandParameter.hasEndBlockId()) {
-    os << " EndBlockId: " << repoCommandParameter.getEndBlockId();
-  }
-  // ProcessId
-  if (repoCommandParameter.hasProcessId()) {
-    os << " ProcessId: " << repoCommandParameter.getProcessId();
-  }
-  // InterestLifetime
-  if (repoCommandParameter.hasProcessId()) {
-    os << " InterestLifetime: " << repoCommandParameter.getInterestLifetime();
-  }
-  os << " )";
-  return os;
-}
-
-} // namespace repo
\ No newline at end of file
+} // namespace repo
diff --git a/src/repo-command-parameter.hpp b/src/repo-command-parameter.hpp
index 6ce45f0..2885e10 100644
--- a/src/repo-command-parameter.hpp
+++ b/src/repo-command-parameter.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018, Regents of the University of California.
+ * Copyright (c) 2014-2022, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -20,22 +20,14 @@
 #ifndef REPO_REPO_COMMAND_PARAMETER_HPP
 #define REPO_REPO_COMMAND_PARAMETER_HPP
 
+#include "common.hpp"
 #include "repo-tlv.hpp"
 
 #include <ndn-cxx/encoding/encoding-buffer.hpp>
-#include <ndn-cxx/encoding/block-helpers.hpp>
 #include <ndn-cxx/mgmt/control-parameters.hpp>
-#include <ndn-cxx/name.hpp>
 
 namespace repo {
 
-using ndn::Name;
-using ndn::Block;
-using ndn::EncodingImpl;
-using ndn::EncodingEstimator;
-using ndn::EncodingBuffer;
-using namespace ndn::time;
-
 enum RepoParameterField {
   REPO_PARAMETER_NAME,
   REPO_PARAMETER_START_BLOCK_ID,
@@ -54,21 +46,16 @@
 };
 
 /**
-* @brief Class defining abstraction of parameter of command for NDN Repo Protocol
-* @sa link https://redmine.named-data.net/projects/repo-ng/wiki/Repo_Protocol_Specification#RepoCommandParameter
-**/
-
+ * @brief Class defining abstraction of parameter of command for NDN Repo Protocol
+ * @sa link https://redmine.named-data.net/projects/repo-ng/wiki/Repo_Protocol_Specification#RepoCommandParameter
+ */
 class RepoCommandParameter : public ndn::mgmt::ControlParameters
 {
 public:
-  class Error : public ndn::tlv::Error
+  class Error : public tlv::Error
   {
   public:
-    explicit
-    Error(const std::string& what)
-      : ndn::tlv::Error(what)
-    {
-    }
+    using tlv::Error::Error;
   };
 
   RepoCommandParameter()
@@ -102,7 +89,7 @@
   uint64_t
   getStartBlockId() const
   {
-    assert(hasStartBlockId());
+    BOOST_ASSERT(hasStartBlockId());
     return m_startBlockId;
   }
 
@@ -118,7 +105,7 @@
   uint64_t
   getEndBlockId() const
   {
-    assert(hasEndBlockId());
+    BOOST_ASSERT(hasEndBlockId());
     return m_endBlockId;
   }
 
@@ -134,7 +121,7 @@
   uint64_t
   getProcessId() const
   {
-    assert(hasProcessId());
+    BOOST_ASSERT(hasProcessId());
     return m_processId;
   }
 
@@ -147,15 +134,15 @@
     return m_hasFields[REPO_PARAMETER_PROCESS_ID];
   }
 
-  milliseconds
+  time::milliseconds
   getInterestLifetime() const
   {
-    assert(hasInterestLifetime());
+    BOOST_ASSERT(hasInterestLifetime());
     return m_interestLifetime;
   }
 
   RepoCommandParameter&
-  setInterestLifetime(milliseconds interestLifetime);
+  setInterestLifetime(time::milliseconds interestLifetime);
 
   bool
   hasInterestLifetime() const
@@ -164,19 +151,20 @@
   }
 
   const std::vector<bool>&
-  getPresentFields() const {
+  getPresentFields() const
+  {
     return m_hasFields;
   }
 
   template<ndn::encoding::Tag T>
   size_t
-  wireEncode(EncodingImpl<T>& block) const;
+  wireEncode(ndn::EncodingImpl<T>& block) const;
 
   Block
-  wireEncode() const;
+  wireEncode() const override;
 
   void
-  wireDecode(const Block& wire);
+  wireDecode(const Block& wire) override;
 
 private:
   std::vector<bool> m_hasFields;
@@ -184,7 +172,7 @@
   uint64_t m_startBlockId;
   uint64_t m_endBlockId;
   uint64_t m_processId;
-  milliseconds m_interestLifetime;
+  time::milliseconds m_interestLifetime;
 
   mutable Block m_wire;
 };
diff --git a/src/repo-command-response.cpp b/src/repo-command-response.cpp
index d00a1d0..15398e1 100644
--- a/src/repo-command-response.cpp
+++ b/src/repo-command-response.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2018, Regents of the University of California.
+/*
+ * Copyright (c) 2014-2022, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -19,6 +19,8 @@
 
 #include "repo-command-response.hpp"
 
+#include <ndn-cxx/encoding/block-helpers.hpp>
+
 namespace repo {
 
 RepoCommandResponse&
@@ -70,9 +72,7 @@
 RepoCommandResponse::setCode(uint32_t statusCode)
 {
   m_hasStatusCode = true;
-
-  RepoCommandResponse* response =
-    static_cast<RepoCommandResponse *> (&ndn::mgmt::ControlResponse::setCode(statusCode));
+  auto* response = static_cast<RepoCommandResponse*>(&ndn::mgmt::ControlResponse::setCode(statusCode));
   return *response;
 }
 
@@ -118,20 +118,19 @@
   if (m_wire.hasWire())
     return m_wire;
 
-  EncodingEstimator estimator;
+  ndn::EncodingEstimator estimator;
   size_t estimatedSize = wireEncode(estimator);
 
-  EncodingBuffer buffer(estimatedSize, 0);
+  ndn::EncodingBuffer buffer(estimatedSize, 0);
   wireEncode(buffer);
 
   m_wire = buffer.block();
   return m_wire;
 }
 
-
 template<ndn::encoding::Tag T>
 size_t
-RepoCommandResponse::wireEncode(EncodingImpl<T>& encoder) const
+RepoCommandResponse::wireEncode(ndn::EncodingImpl<T>& encoder) const
 {
   size_t totalLength = 0;
   size_t variableLength = 0;
@@ -171,7 +170,7 @@
     totalLength += encoder.prependVarNumber(tlv::StatusCode);
   }
   else {
-    BOOST_THROW_EXCEPTION(Error("required field StatusCode is missing"));
+    NDN_THROW(Error("Required field StatusCode is missing"));
   }
 
   if (m_hasProcessId) {
@@ -189,6 +188,10 @@
 void
 RepoCommandResponse::wireDecode(const Block& wire)
 {
+  if (wire.type() != tlv::RepoCommandResponse) {
+    NDN_THROW(Error("RepoCommandResponse", wire.type()));
+  }
+
   m_hasStartBlockId = false;
   m_hasEndBlockId = false;
   m_hasProcessId = false;
@@ -197,16 +200,10 @@
   m_hasDeleteNum = false;
 
   m_wire = wire;
-
   m_wire.parse();
 
-  Block::element_const_iterator val;
-
-  if (m_wire.type() != tlv::RepoCommandResponse)
-    BOOST_THROW_EXCEPTION(Error("RepoCommandResponse malformed"));
-
   // StartBlockId
-  val = m_wire.find(tlv::StartBlockId);
+  auto val = m_wire.find(tlv::StartBlockId);
   if (val != m_wire.elements_end()) {
     m_hasStartBlockId = true;
     m_startBlockId = readNonNegativeInteger(*val);
@@ -226,13 +223,13 @@
     m_processId = readNonNegativeInteger(*val);
   }
 
-  //StatusCode
+  // StatusCode
   val = m_wire.find(tlv::StatusCode);
   if (val != m_wire.elements_end()) {
     setCode(readNonNegativeInteger(*val));
   }
   else {
-    BOOST_THROW_EXCEPTION(Error("required field StatusCode is missing"));
+    NDN_THROW(Error("Required field StatusCode is missing"));
   }
 
   // InsertNum
@@ -252,32 +249,4 @@
 
 NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(RepoCommandResponse);
 
-std::ostream&
-operator<<(std::ostream& os, const RepoCommandResponse& repoCommandResponse)
-{
-  os << "RepoCommandResponse(";
-
-  if (repoCommandResponse.hasProcessId()) {
-    os << " ProcessId: " << repoCommandResponse.getProcessId();
-  }
-  // if (repoCommandResponse.hasStatusCode()) {
-  //   os << " StatusCode: " << repoCommandResponse.getStatusCode();
-  // }
-  if (repoCommandResponse.hasStartBlockId()) {
-    os << " StartBlockId: " << repoCommandResponse.getStartBlockId();
-  }
-  if (repoCommandResponse.hasEndBlockId()) {
-    os << " EndBlockId: " << repoCommandResponse.getEndBlockId();
-  }
-  if (repoCommandResponse.hasInsertNum()) {
-    os << " InsertNum: " << repoCommandResponse.getInsertNum();
-  }
-  if (repoCommandResponse.hasDeleteNum()) {
-    os << " DeleteNum: " << repoCommandResponse.getDeleteNum();
-
-  }
-  os << " )";
-  return os;
-}
-
 } // namespace repo
diff --git a/src/repo-command-response.hpp b/src/repo-command-response.hpp
index 4f30ca5..cff12a6 100644
--- a/src/repo-command-response.hpp
+++ b/src/repo-command-response.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2018, Regents of the University of California.
+/*
+ * Copyright (c) 2014-2022, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -20,38 +20,29 @@
 #ifndef REPO_REPO_COMMAND_RESPONSE_HPP
 #define REPO_REPO_COMMAND_RESPONSE_HPP
 
+#include "common.hpp"
 #include "repo-tlv.hpp"
 
-#include <ndn-cxx/mgmt/control-response.hpp>
-#include <ndn-cxx/encoding/block.hpp>
-#include <ndn-cxx/encoding/block-helpers.hpp>
 #include <ndn-cxx/encoding/encoding-buffer.hpp>
-#include <ndn-cxx/encoding/tlv-nfd.hpp>
+#include <ndn-cxx/mgmt/control-response.hpp>
 
 namespace repo {
 
-using ndn::Block;
-using ndn::EncodingImpl;
-using ndn::EncodingEstimator;
-using ndn::EncodingBuffer;
-
 /**
-* @brief Class defining abstraction of Response for NDN Repo Protocol
-* @sa link https://redmine.named-data.net/projects/repo-ng/wiki/Repo_Protocol_Specification#Repo-Command-Response
-*/
+ * @brief Class defining abstraction of Response for NDN Repo Protocol
+ * @sa link https://redmine.named-data.net/projects/repo-ng/wiki/Repo_Protocol_Specification#Repo-Command-Response
+ */
 class RepoCommandResponse : public ndn::mgmt::ControlResponse
 {
 public:
-  class Error : public ndn::tlv::Error
+  class Error : public tlv::Error
   {
   public:
-    explicit
-    Error(const std::string& what)
-      : ndn::tlv::Error(what)
-    {
-    }
+    using tlv::Error::Error;
   };
 
+  RepoCommandResponse() = default;
+
   RepoCommandResponse(uint32_t code, const std::string& text)
     : ndn::mgmt::ControlResponse(code, text)
     , m_hasStartBlockId(false)
@@ -63,9 +54,6 @@
   {
   }
 
-  RepoCommandResponse(){
-  }
-
   explicit
   RepoCommandResponse(const Block& block)
   {
@@ -87,7 +75,7 @@
   uint64_t
   getEndBlockId() const
   {
-    assert(hasEndBlockId());
+    BOOST_ASSERT(hasEndBlockId());
     return m_endBlockId;
   }
 
@@ -141,7 +129,7 @@
 
   template<ndn::encoding::Tag T>
   size_t
-  wireEncode(EncodingImpl<T>& block) const;
+  wireEncode(ndn::EncodingImpl<T>& block) const;
 
   const Block&
   wireEncode() const;
diff --git a/src/repo-command.cpp b/src/repo-command.cpp
index 0c1cc21..69d3c9e 100644
--- a/src/repo-command.cpp
+++ b/src/repo-command.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2018, Regents of the University of California.
+/*
+ * Copyright (c) 2014-2022, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -22,7 +22,8 @@
 namespace repo {
 
 void
-RepoCommand::validateRequest(const RepoCommandParameter& parameters) {
+RepoCommand::validateRequest(const RepoCommandParameter& parameters)
+{
   m_requestValidator.validate(parameters);
   check(parameters);
 }
@@ -36,11 +37,11 @@
     bool isPresent = presentFields[i];
     if (m_required[i]) {
       if (!isPresent) {
-        BOOST_THROW_EXCEPTION(ArgumentError(REPO_PARAMETER_FIELD[i] + " is required but missing"));
+        NDN_THROW(ArgumentError(REPO_PARAMETER_FIELD[i] + " is required but missing"));
       }
     }
     else if (isPresent && !m_optional[i]) {
-      BOOST_THROW_EXCEPTION(ArgumentError(REPO_PARAMETER_FIELD[i] + " is forbidden but present"));
+      NDN_THROW(ArgumentError(REPO_PARAMETER_FIELD[i] + " is forbidden but present"));
     }
   }
 }
@@ -52,7 +53,7 @@
 }
 
 InsertCommand::InsertCommand()
-: RepoCommand()
+  : RepoCommand()
 {
   m_requestValidator
     .required(REPO_PARAMETER_NAME)
@@ -83,14 +84,14 @@
     if (parameters.hasEndBlockId()) {
       SegmentNo startBlockId = parameters.getStartBlockId();
       SegmentNo endBlockId = parameters.getEndBlockId();
-
       if (startBlockId > endBlockId) {
-        BOOST_THROW_EXCEPTION(ArgumentError("start block Id is bigger than end block Id"));
+        NDN_THROW(ArgumentError("Start block Id is bigger than end block Id"));
       }
     }
     else {
-      BOOST_THROW_EXCEPTION(ArgumentError("Segmented deletion without EndBlockId, not implemented"));
+      NDN_THROW(ArgumentError("Segmented deletion without EndBlockId, not implemented"));
     }
   }
 }
-} // namespace repo
\ No newline at end of file
+
+} // namespace repo
diff --git a/src/repo-command.hpp b/src/repo-command.hpp
index 28c2999..b985cbf 100644
--- a/src/repo-command.hpp
+++ b/src/repo-command.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2018, Regents of the University of California.
+/*
+ * Copyright (c) 2014-2022, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -16,29 +16,25 @@
  * You should have received a copy of the GNU General Public License along with
  * repo-ng, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
+
 #ifndef REPO_REPO_COMMAND_HPP
 #define REPO_REPO_COMMAND_HPP
 
 #include "common.hpp"
 #include "repo-command-parameter.hpp"
 
-#include <stdexcept>
-
 namespace repo {
 
 class RepoCommand : boost::noncopyable
 {
 public:
-  /** \brief represents an error in RepoCommandParameters
+  /**
+   * \brief Represents an error in RepoCommandParameters
    */
   class ArgumentError : public std::invalid_argument
   {
   public:
-    explicit
-    ArgumentError(const std::string& what)
-      : std::invalid_argument(what)
-    {
-    }
+    using std::invalid_argument::invalid_argument;
   };
 
   virtual
@@ -116,4 +112,4 @@
 
 } // namespace repo
 
-#endif // REPO_REPO_COMMAND_HPP
\ No newline at end of file
+#endif // REPO_REPO_COMMAND_HPP
diff --git a/src/repo-tlv.hpp b/src/repo-tlv.hpp
index b8b9f15..5ce38cf 100644
--- a/src/repo-tlv.hpp
+++ b/src/repo-tlv.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2018,  Regents of the University of California.
+/*
+ * Copyright (c) 2018-2022,  Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -22,8 +22,7 @@
 
 #include <ndn-cxx/encoding/tlv.hpp>
 
-namespace repo {
-namespace tlv {
+namespace repo::tlv {
 
 using namespace ndn::tlv;
 
@@ -38,7 +37,6 @@
   DeleteNum            = 210,
 };
 
-} // namespace tlv
-} // namespace repo
+} // namespace repo::tlv
 
 #endif // REPO_REPO_TLV_HPP
diff --git a/src/repo.cpp b/src/repo.cpp
index 4a4a8b5..8ee393f 100644
--- a/src/repo.cpp
+++ b/src/repo.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019, Regents of the University of California.
+ * Copyright (c) 2014-2022, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -34,16 +34,16 @@
   }
 
   std::ifstream fin(configPath.c_str());
- if (!fin.is_open())
-    BOOST_THROW_EXCEPTION(Repo::Error("failed to open configuration file '" + configPath + "'"));
+  if (!fin.is_open())
+    NDN_THROW(Repo::Error("failed to open configuration file '" + configPath + "'"));
 
   using namespace boost::property_tree;
   ptree propertyTree;
   try {
     read_info(fin, propertyTree);
   }
-  catch (const ptree_error& e) {
-    BOOST_THROW_EXCEPTION(Repo::Error("failed to read configuration file '" + configPath + "'"));
+  catch (const ptree_error&) {
+    NDN_THROW_NESTED(Repo::Error("failed to read configuration file '" + configPath + "'"));
   }
 
   ptree repoConf = propertyTree.get_child("repo");
@@ -58,8 +58,8 @@
     else if (section.first == "registration-subset")
       repoConfig.registrationSubset = section.second.get_value<int>();
     else
-      BOOST_THROW_EXCEPTION(Repo::Error("Unrecognized '" + section.first + "' option in 'data' section in "
-                                        "configuration file '"+ configPath +"'"));
+      NDN_THROW(Repo::Error("Unrecognized '" + section.first + "' option in 'data' section in "
+                            "configuration file '"+ configPath +"'"));
   }
 
   ptree commandConf = repoConf.get_child("command");
@@ -67,8 +67,8 @@
     if (section.first == "prefix")
       repoConfig.repoPrefixes.push_back(Name(section.second.get_value<std::string>()));
     else
-      BOOST_THROW_EXCEPTION(Repo::Error("Unrecognized '" + section.first + "' option in 'command' section in "
-                                        "configuration file '"+ configPath +"'"));
+      NDN_THROW(Repo::Error("Unrecognized '" + section.first + "' option in 'command' section in "
+                            "configuration file '"+ configPath +"'"));
   }
 
   auto tcpBulkInsert = repoConf.get_child_optional("tcp_bulk_insert");
@@ -85,8 +85,8 @@
         port = section.second.get_value<std::string>();
       }
       else
-        BOOST_THROW_EXCEPTION(Repo::Error("Unrecognized '" + section.first + "' option in 'tcp_bulk_insert' section in "
-                                          "configuration file '"+ configPath +"'"));
+        NDN_THROW(Repo::Error("Unrecognized '" + section.first + "' option in 'tcp_bulk_insert' section in "
+                              "configuration file '" + configPath + "'"));
     }
   }
   if (isTcpBulkEnabled) {
@@ -94,7 +94,7 @@
   }
 
   if (repoConf.get<std::string>("storage.method") != "sqlite") {
-    BOOST_THROW_EXCEPTION(Repo::Error("Only 'sqlite' storage method is supported"));
+    NDN_THROW(Repo::Error("Only 'sqlite' storage method is supported"));
   }
 
   repoConfig.dbPath = repoConf.get<std::string>("storage.path");
@@ -127,10 +127,10 @@
 Repo::initializeStorage()
 {
   // Rebuild storage if storage checkpoin exists
-  ndn::time::steady_clock::TimePoint start = ndn::time::steady_clock::now();
-  ndn::time::steady_clock::TimePoint end = ndn::time::steady_clock::now();
-  ndn::time::milliseconds cost = ndn::time::duration_cast<ndn::time::milliseconds>(end - start);
-  NDN_LOG_DEBUG("initialize storage cost: " << cost << "ms");
+  auto start = time::steady_clock::now();
+  auto end = time::steady_clock::now();
+  auto cost = time::duration_cast<time::milliseconds>(end - start);
+  NDN_LOG_DEBUG("initialize storage cost: " << cost);
 }
 
 void
@@ -144,7 +144,7 @@
     m_face.registerPrefix(cmdPrefix, nullptr,
       [] (const Name& cmdPrefix, const std::string& reason) {
         NDN_LOG_DEBUG("Command prefix " << cmdPrefix << " registration error: " << reason);
-        BOOST_THROW_EXCEPTION(Error("Command prefix registration failed"));
+        NDN_THROW(Error("Command prefix registration failed"));
       });
 
     m_dispatcher.addTopPrefix(cmdPrefix);
diff --git a/src/repo.hpp b/src/repo.hpp
index 07e8945..9b7630e 100644
--- a/src/repo.hpp
+++ b/src/repo.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019, Regents of the University of California.
+ * Copyright (c) 2014-2022, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -31,6 +31,7 @@
 #include "common.hpp"
 
 #include <ndn-cxx/mgmt/dispatcher.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
 #include <ndn-cxx/security/validator-config.hpp>
 
 #include <boost/property_tree/info_parser.hpp>
@@ -40,7 +41,7 @@
 
 struct RepoConfig
 {
-  static const size_t DISABLED_SUBSET_LENGTH = -1;
+  static constexpr size_t DISABLED_SUBSET_LENGTH = -1;
 
   std::string repoConfigPath;
   std::string dbPath;
@@ -61,11 +62,7 @@
   class Error : public std::runtime_error
   {
   public:
-    explicit
-    Error(const std::string& what)
-      : std::runtime_error(what)
-    {
-    }
+    using std::runtime_error::runtime_error;
   };
 
 public:
@@ -88,8 +85,8 @@
   ndn::mgmt::Dispatcher m_dispatcher;
   std::shared_ptr<Storage> m_store;
   RepoStorage m_storageHandle;
-  KeyChain m_keyChain;
-  ValidatorConfig m_validator;
+  ndn::KeyChain m_keyChain;
+  ndn::security::ValidatorConfig m_validator;
 
   ReadHandle m_readHandle;
   WriteHandle m_writeHandle;
diff --git a/src/storage/repo-storage.hpp b/src/storage/repo-storage.hpp
index fe355ad..62d8fa4 100644
--- a/src/storage/repo-storage.hpp
+++ b/src/storage/repo-storage.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019, Regents of the University of California.
+ * Copyright (c) 2014-2022, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -25,8 +25,6 @@
 
 #include <ndn-cxx/util/signal.hpp>
 
-#include <queue>
-
 namespace repo {
 
 /**
@@ -39,14 +37,9 @@
   class Error : public std::runtime_error
   {
   public:
-    explicit
-    Error(const std::string& what)
-      : std::runtime_error(what)
-    {
-    }
+    using std::runtime_error::runtime_error;
   };
 
-public:
   explicit
   RepoStorage(Storage& store);
 
@@ -96,7 +89,7 @@
 
 private:
   Storage& m_storage;
-  const int NOTFOUND = -1;
+  static constexpr int NOTFOUND = -1;
 };
 
 } // namespace repo
diff --git a/src/storage/sqlite-storage.hpp b/src/storage/sqlite-storage.hpp
index 217f9d0..6c6006d 100644
--- a/src/storage/sqlite-storage.hpp
+++ b/src/storage/sqlite-storage.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019, Regents of the University of California.
+ * Copyright (c) 2014-2022, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -22,33 +22,17 @@
 
 #include "storage.hpp"
 
-#include <algorithm>
-#include <iostream>
-#include <queue>
-#include <stdlib.h>
-#include <string>
 #include <sqlite3.h>
-#include <vector>
 
 namespace repo {
 
 class SqliteStorage : public Storage
 {
 public:
-  class Error : public std::runtime_error
-  {
-  public:
-    explicit
-    Error(const std::string& what)
-      : std::runtime_error(what)
-    {
-    }
-  };
-
   explicit
   SqliteStorage(const std::string& dbPath);
 
-  ~SqliteStorage();
+  ~SqliteStorage() override;
 
   /**
    *  @brief  put the data into database
@@ -92,7 +76,6 @@
   std::string m_dbPath;
 };
 
-
 } // namespace repo
 
 #endif // REPO_STORAGE_SQLITE_STORAGE_HPP
diff --git a/src/storage/storage.hpp b/src/storage/storage.hpp
index d724eb1..abda77c 100644
--- a/src/storage/storage.hpp
+++ b/src/storage/storage.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019, Regents of the University of California.
+ * Copyright (c) 2014-2022, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -21,26 +21,19 @@
 #define REPO_STORAGE_STORAGE_HPP
 
 #include "../common.hpp"
-#include <string>
-#include <iostream>
-#include <stdlib.h>
 
 namespace repo {
 
 /**
-  * @brief Storage is a virtual abstract class which will be called by SqliteStorage
-  */
+ * @brief Storage is a virtual abstract class which will be called by SqliteStorage
+ */
 class Storage : noncopyable
 {
 public:
   class Error : public std::runtime_error
   {
   public:
-    explicit
-    Error(const std::string& what)
-      : std::runtime_error(what)
-    {
-    }
+    using std::runtime_error::runtime_error;
   };
 
 public:
