diff --git a/src/daemon/config-file.cpp b/src/daemon/config-file.cpp
index a03937f..636a69e 100644
--- a/src/daemon/config-file.cpp
+++ b/src/daemon/config-file.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-2020,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -43,8 +43,8 @@
                                        const ConfigSection& section,
                                        bool isDryRun)
 {
-  BOOST_THROW_EXCEPTION(Error("Error processing configuration file " + filename +
-                              ": no module subscribed for section \"" + sectionName + "\""));
+  NDN_THROW(Error("Error processing configuration file " + filename +
+                  ": no module subscribed for section \"" + sectionName + "\""));
 }
 
 void
@@ -69,8 +69,8 @@
     return false;
   }
 
-  BOOST_THROW_EXCEPTION(Error("Invalid value \"" + value + "\" for option \"" +
-                              key + "\" in \"" + sectionName + "\" section"));
+  NDN_THROW(Error("Invalid value \"" + value + "\" for option \"" +
+                  key + "\" in \"" + sectionName + "\" section"));
 }
 
 void
@@ -85,7 +85,7 @@
 {
   std::ifstream inputFile(filename);
   if (!inputFile.good() || !inputFile.is_open()) {
-    BOOST_THROW_EXCEPTION(Error("Failed to read configuration file " + filename));
+    NDN_THROW(Error("Failed to read configuration file " + filename));
   }
   parse(inputFile, isDryRun, filename);
   inputFile.close();
@@ -105,8 +105,8 @@
     boost::property_tree::read_info(input, m_global);
   }
   catch (const boost::property_tree::info_parser_error& error) {
-    BOOST_THROW_EXCEPTION(Error("Failed to parse configuration file " + filename +
-                                ": " + error.message() + " on line " + to_string(error.line())));
+    NDN_THROW_NESTED(Error("Failed to parse configuration file " + filename +
+                           ": " + error.message() + " on line " + to_string(error.line())));
   }
 
   process(isDryRun, filename);
diff --git a/src/daemon/config-file.hpp b/src/daemon/config-file.hpp
index a177bfa..b17dfe6 100644
--- a/src/daemon/config-file.hpp
+++ b/src/daemon/config-file.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-2020,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,8 @@
 
 #include "common.hpp"
 
+#include <boost/property_tree/ptree.hpp>
+
 namespace ndn {
 namespace ndns {
 
@@ -54,17 +56,13 @@
 
 /** \brief configuration file parsing utility
  */
-class ConfigFile : noncopyable
+class ConfigFile : boost::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;
   };
 
   explicit
@@ -115,8 +113,8 @@
     if (value) {
       return *value;
     }
-    BOOST_THROW_EXCEPTION(Error("Invalid value \"" + node.get_value<std::string>() +
-                                "\" for option \"" + key + "\" in \"" + sectionName + "\" section"));
+    NDN_THROW(Error("Invalid value \"" + node.get_value<std::string>() +
+                    "\" for option \"" + key + "\" in \"" + sectionName + "\" section"));
   }
 
   template <typename T>
diff --git a/src/daemon/db-mgr.cpp b/src/daemon/db-mgr.cpp
index da40d58..49dcfa9 100644
--- a/src/daemon/db-mgr.cpp
+++ b/src/daemon/db-mgr.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-2020, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -85,7 +85,7 @@
 
   if (res != SQLITE_OK) {
     NDNS_LOG_FATAL("Cannot open the db file: " << m_dbFile);
-    BOOST_THROW_EXCEPTION(ConnectError("Cannot open the db file: " + m_dbFile));
+    NDN_THROW(ConnectError("Cannot open the db file: " + m_dbFile));
   }
 
   // ignore any errors from DB creation (command will fail for the existing database, which is ok)
@@ -116,7 +116,7 @@
   // sqlite3_step cannot execute multiple SQL statements
   int rc = sqlite3_exec(m_conn, sql, nullptr, nullptr, nullptr);
   if (rc != SQLITE_OK) {
-    BOOST_THROW_EXCEPTION(ExecuteError(sql));
+    NDN_THROW(ExecuteError(sql));
   }
 
   NDNS_LOG_INFO("clear all the data in the database: " << m_dbFile);
@@ -142,7 +142,7 @@
     name::Component component;
     std::tie(hasDecodingSucceeded, component) = Block::fromBuffer(buffer, nBytesLeft);
     if (!hasDecodingSucceeded) {
-      BOOST_THROW_EXCEPTION(Error("Error while decoding name from the database"));
+      NDN_THROW(Error("Error while decoding name from the database"));
     }
     name.append(component);
     buffer += component.size();
@@ -166,7 +166,7 @@
   const char* sql = "INSERT INTO zones (name, ttl) VALUES (?, ?)";
   int rc = sqlite3_prepare_v2(m_conn, sql, -1, &stmt, nullptr);
   if (rc != SQLITE_OK) {
-    BOOST_THROW_EXCEPTION(PrepareError(sql));
+    NDN_THROW(PrepareError(sql));
   }
 
   saveName(zone.getName(), stmt, 1);
@@ -175,7 +175,7 @@
   rc = sqlite3_step(stmt);
   if (rc != SQLITE_DONE) {
     sqlite3_finalize(stmt);
-    BOOST_THROW_EXCEPTION(ExecuteError(sql));
+    NDN_THROW(ExecuteError(sql));
   }
 
   zone.setId(sqlite3_last_insert_rowid(m_conn));
@@ -188,18 +188,18 @@
                    const Block& value)
 {
   if (zone.getId() == 0) {
-    BOOST_THROW_EXCEPTION(Error("zone has not been initialized"));
+    NDN_THROW(Error("zone has not been initialized"));
   }
 
   if (key.length() > 10) {
-    BOOST_THROW_EXCEPTION(Error("key length should not exceed 10"));
+    NDN_THROW(Error("key length should not exceed 10"));
   }
 
   sqlite3_stmt* stmt;
   const char* sql = "INSERT OR REPLACE INTO zone_info (zone_id, key, value) VALUES (?, ?, ?)";
   int rc = sqlite3_prepare_v2(m_conn, sql, -1, &stmt, nullptr);
   if (rc != SQLITE_OK) {
-    BOOST_THROW_EXCEPTION(PrepareError(sql));
+    NDN_THROW(PrepareError(sql));
   }
 
   sqlite3_bind_int(stmt,  1, zone.getId());
@@ -209,7 +209,7 @@
   rc = sqlite3_step(stmt);
   if (rc != SQLITE_DONE) {
     sqlite3_finalize(stmt);
-    BOOST_THROW_EXCEPTION(ExecuteError(sql));
+    NDN_THROW(ExecuteError(sql));
   }
 
   sqlite3_finalize(stmt);
@@ -226,14 +226,14 @@
   }
 
   if (zone.getId() == 0) {
-    BOOST_THROW_EXCEPTION(Error("zone has not been initialized"));
+    NDN_THROW(Error("zone has not been initialized"));
   }
 
   sqlite3_stmt* stmt;
   const char* sql = "SELECT key, value FROM zone_info WHERE zone_id=?";
   int rc = sqlite3_prepare_v2(m_conn, sql, -1, &stmt, nullptr);
   if (rc != SQLITE_OK) {
-    BOOST_THROW_EXCEPTION(PrepareError(sql));
+    NDN_THROW(PrepareError(sql));
   }
 
   sqlite3_bind_int(stmt, 1, zone.getId());
@@ -255,7 +255,7 @@
   const char* sql = "SELECT id, ttl FROM zones WHERE name=?";
   int rc = sqlite3_prepare_v2(m_conn, sql, -1, &stmt, nullptr);
   if (rc != SQLITE_OK) {
-    BOOST_THROW_EXCEPTION(PrepareError(sql));
+    NDN_THROW(PrepareError(sql));
   }
 
   saveName(zone.getName(), stmt, 1);
@@ -280,7 +280,7 @@
   const char* sql = "SELECT id, name, ttl FROM zones";
   int rc = sqlite3_prepare_v2(m_conn, sql, -1, &stmt, nullptr);
   if (rc != SQLITE_OK) {
-    BOOST_THROW_EXCEPTION(PrepareError(sql));
+    NDN_THROW(PrepareError(sql));
   }
 
   std::vector<Zone> vec;
@@ -307,7 +307,7 @@
   const char* sql = "DELETE FROM zones where id=?";
   int rc = sqlite3_prepare_v2(m_conn, sql, -1, &stmt, nullptr);
   if (rc != SQLITE_OK) {
-    BOOST_THROW_EXCEPTION(PrepareError(sql));
+    NDN_THROW(PrepareError(sql));
   }
 
   sqlite3_bind_int64(stmt, 1, zone.getId());
@@ -315,7 +315,7 @@
   rc = sqlite3_step(stmt);
   if (rc != SQLITE_DONE) {
     sqlite3_finalize(stmt);
-    BOOST_THROW_EXCEPTION(ExecuteError(sql));
+    NDN_THROW(ExecuteError(sql));
   }
 
   sqlite3_finalize(stmt);
@@ -334,7 +334,7 @@
     return;
 
   if (rrset.getZone() == nullptr) {
-    BOOST_THROW_EXCEPTION(RrsetError("Rrset has not been assigned to a zone"));
+    NDN_THROW(RrsetError("Rrset has not been assigned to a zone"));
   }
 
   if (rrset.getZone()->getId() == 0) {
@@ -348,7 +348,7 @@
   sqlite3_stmt* stmt;
   int rc = sqlite3_prepare_v2(m_conn, sql, -1, &stmt, nullptr);
   if (rc != SQLITE_OK) {
-    BOOST_THROW_EXCEPTION(PrepareError(sql));
+    NDN_THROW(PrepareError(sql));
   }
 
   sqlite3_bind_int64(stmt, 1, rrset.getZone()->getId());
@@ -362,7 +362,7 @@
   rc = sqlite3_step(stmt);
   if (rc != SQLITE_DONE) {
     sqlite3_finalize(stmt);
-    BOOST_THROW_EXCEPTION(ExecuteError(sql));
+    NDN_THROW(ExecuteError(sql));
   }
 
   rrset.setId(sqlite3_last_insert_rowid(m_conn));
@@ -373,7 +373,7 @@
 DbMgr::find(Rrset& rrset)
 {
   if (rrset.getZone() == nullptr) {
-    BOOST_THROW_EXCEPTION(RrsetError("Rrset has not been assigned to a zone"));
+    NDN_THROW(RrsetError("Rrset has not been assigned to a zone"));
   }
 
   if (rrset.getZone()->getId() == 0) {
@@ -389,7 +389,7 @@
     "    WHERE zone_id=? and label=? and type=?";
   int rc = sqlite3_prepare_v2(m_conn, sql, -1, &stmt, nullptr);
   if (rc != SQLITE_OK) {
-    BOOST_THROW_EXCEPTION(PrepareError(sql));
+    NDN_THROW(PrepareError(sql));
   }
 
   sqlite3_bind_int64(stmt, 1, rrset.getZone()->getId());
@@ -417,7 +417,7 @@
 DbMgr::findLowerBound(Rrset& rrset)
 {
   if (rrset.getZone() == nullptr) {
-    BOOST_THROW_EXCEPTION(RrsetError("Rrset has not been assigned to a zone"));
+    NDN_THROW(RrsetError("Rrset has not been assigned to a zone"));
   }
 
   if (rrset.getZone()->getId() == 0) {
@@ -433,7 +433,7 @@
     "    WHERE zone_id=? and label<? and type=? ORDER BY label DESC";
   int rc = sqlite3_prepare_v2(m_conn, sql, -1, &stmt, nullptr);
   if (rc != SQLITE_OK) {
-    BOOST_THROW_EXCEPTION(PrepareError(sql));
+    NDN_THROW(PrepareError(sql));
   }
 
   sqlite3_bind_int64(stmt, 1, rrset.getZone()->getId());
@@ -464,7 +464,7 @@
     find(zone);
 
   if (zone.getId() == 0)
-    BOOST_THROW_EXCEPTION(RrsetError("Attempting to find all the rrsets with a zone does not in the database"));
+    NDN_THROW(RrsetError("Attempting to find all the rrsets with a zone does not in the database"));
 
   std::vector<Rrset> vec;
   sqlite3_stmt* stmt;
@@ -473,7 +473,7 @@
 
   int rc = sqlite3_prepare_v2(m_conn, sql, -1, &stmt, nullptr);
   if (rc != SQLITE_OK) {
-    BOOST_THROW_EXCEPTION(PrepareError(sql));
+    NDN_THROW(PrepareError(sql));
   }
   sqlite3_bind_int64(stmt, 1, zone.getId());
 
@@ -503,13 +503,13 @@
     find(zone);
 
   if (zone.getId() == 0)
-    BOOST_THROW_EXCEPTION(RrsetError("Attempting to find all the rrsets with a zone does not in the database"));
+    NDN_THROW(RrsetError("Attempting to find all the rrsets with a zone does not in the database"));
 
   sqlite3_stmt* stmt;
   const char* sql = "DELETE FROM rrsets WHERE zone_id = ? AND type = ?";
   int rc = sqlite3_prepare_v2(m_conn, sql, -1, &stmt, nullptr);
   if (rc != SQLITE_OK) {
-    BOOST_THROW_EXCEPTION(PrepareError(sql));
+    NDN_THROW(PrepareError(sql));
   }
 
   sqlite3_bind_int64(stmt, 1, zone.getId());
@@ -518,7 +518,7 @@
   rc = sqlite3_step(stmt);
   if (rc != SQLITE_DONE) {
     sqlite3_finalize(stmt);
-    BOOST_THROW_EXCEPTION(ExecuteError(sql));
+    NDN_THROW(ExecuteError(sql));
   }
   sqlite3_finalize(stmt);
 }
@@ -527,13 +527,13 @@
 DbMgr::remove(Rrset& rrset)
 {
   if (rrset.getId() == 0)
-    BOOST_THROW_EXCEPTION(RrsetError("Attempting to remove Rrset that has no assigned id"));
+    NDN_THROW(RrsetError("Attempting to remove Rrset that has no assigned id"));
 
   sqlite3_stmt* stmt;
   const char* sql = "DELETE FROM rrsets WHERE id=?";
   int rc = sqlite3_prepare_v2(m_conn, sql, -1, &stmt, nullptr);
   if (rc != SQLITE_OK) {
-    BOOST_THROW_EXCEPTION(PrepareError(sql));
+    NDN_THROW(PrepareError(sql));
   }
 
   sqlite3_bind_int64(stmt, 1, rrset.getId());
@@ -541,7 +541,7 @@
   rc = sqlite3_step(stmt);
   if (rc != SQLITE_DONE) {
     sqlite3_finalize(stmt);
-    BOOST_THROW_EXCEPTION(ExecuteError(sql));
+    NDN_THROW(ExecuteError(sql));
   }
 
   sqlite3_finalize(stmt);
@@ -553,18 +553,18 @@
 DbMgr::update(Rrset& rrset)
 {
   if (rrset.getId() == 0) {
-    BOOST_THROW_EXCEPTION(RrsetError("Attempting to replace Rrset that has no assigned id"));
+    NDN_THROW(RrsetError("Attempting to replace Rrset that has no assigned id"));
   }
 
   if (rrset.getZone() == nullptr) {
-    BOOST_THROW_EXCEPTION(RrsetError("Rrset has not been assigned to a zone"));
+    NDN_THROW(RrsetError("Rrset has not been assigned to a zone"));
   }
 
   sqlite3_stmt* stmt;
   const char* sql = "UPDATE rrsets SET ttl=?, version=?, data=? WHERE id=?";
   int rc = sqlite3_prepare_v2(m_conn, sql, -1, &stmt, nullptr);
   if (rc != SQLITE_OK) {
-    BOOST_THROW_EXCEPTION(PrepareError(sql));
+    NDN_THROW(PrepareError(sql));
   }
 
   sqlite3_bind_int64(stmt, 1, rrset.getTtl().count());
diff --git a/src/daemon/db-mgr.hpp b/src/daemon/db-mgr.hpp
index a41380a..81ae5ad 100644
--- a/src/daemon/db-mgr.hpp
+++ b/src/daemon/db-mgr.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-2020, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -20,7 +20,7 @@
 #ifndef NDNS_DAEMON_DB_MGR_HPP
 #define NDNS_DAEMON_DB_MGR_HPP
 
-#include "config.hpp"
+#include "common.hpp"
 #include "rrset.hpp"
 #include "zone.hpp"
 
@@ -46,7 +46,7 @@
  *
  * @note Method names follow MongoDB convention: insert/remove/find/update
  */
-class DbMgr : noncopyable
+class DbMgr : boost::noncopyable
 {
 public:
   /**
diff --git a/src/daemon/name-server.cpp b/src/daemon/name-server.cpp
index c1d3bfa..4e40b17 100644
--- a/src/daemon/name-server.cpp
+++ b/src/daemon/name-server.cpp
@@ -44,7 +44,7 @@
 
   if (m_zone.getId() == 0) {
     NDNS_LOG_FATAL("m_zone does not exist: " << zoneName);
-    BOOST_THROW_EXCEPTION(Error("Zone " + zoneName.toUri() + " does not exist in the database"));
+    NDN_THROW(Error("Zone " + zoneName.toUri() + " does not exist in the database"));
   }
 
   m_ndnsPrefix.append(ndns::label::NDNS_ITERATIVE_QUERY);
@@ -101,7 +101,7 @@
     doe.setType(label::DOE_RR_TYPE);
     if (!m_dbMgr.findLowerBound(doe)) {
         NDNS_LOG_FATAL("fail to find DoE record of zone:" + m_zone.getName().toUri());
-        BOOST_THROW_EXCEPTION(std::runtime_error("fail to find DoE record of zone:" + m_zone.getName().toUri()));
+        NDN_THROW(std::runtime_error("fail to find DoE record of zone:" + m_zone.getName().toUri()));
     }
 
     answer->setContent(doe.getData());
@@ -133,9 +133,9 @@
     }
     m_validator.validate(*data,
                          bind(&NameServer::doUpdate, this, interest.shared_from_this(), data),
-                         [] (const Data& data, const security::ValidationError& msg) {
+                         [] (const Data&, const security::ValidationError&) {
                            NDNS_LOG_WARN("Ignoring update that did not pass the verification. "
-                                         << "Check the root certificate");
+                                         "Check the root certificate");
                          });
   }
 }
@@ -144,8 +144,8 @@
 NameServer::onRegisterFailed(const ndn::Name& prefix, const std::string& reason)
 {
   NDNS_LOG_FATAL("fail to register prefix=" << prefix << ". Due to: " << reason);
-  BOOST_THROW_EXCEPTION(Error("zone " + m_zone.getName().toUri() + " register prefix: " +
-                              prefix.toUri() + " fails. due to: " + reason));
+  NDN_THROW(Error("zone " + m_zone.getName().toUri() + " register prefix: " +
+                  prefix.toUri() + " fails. due to: " + reason));
 }
 
 void
diff --git a/src/daemon/name-server.hpp b/src/daemon/name-server.hpp
index fd820e5..8a84f42 100644
--- a/src/daemon/name-server.hpp
+++ b/src/daemon/name-server.hpp
@@ -26,14 +26,12 @@
 #include "ndns-label.hpp"
 #include "ndns-tlv.hpp"
 #include "validator/validator.hpp"
-#include "common.hpp"
 
 #include <ndn-cxx/security/key-chain.hpp>
 #include <ndn-cxx/face.hpp>
 
 #include <boost/asio.hpp>
 #include <boost/bind.hpp>
-#include <boost/noncopyable.hpp>
 
 #include <sstream>
 #include <stdexcept>
@@ -46,7 +44,7 @@
  *
  * The authoritative name server handles NDNS query and update.
  */
-class NameServer : noncopyable
+class NameServer : boost::noncopyable
 {
   DEFINE_ERROR(Error, std::runtime_error);
 
diff --git a/src/daemon/rrset-factory.cpp b/src/daemon/rrset-factory.cpp
index 029e3b0..d0938a1 100644
--- a/src/daemon/rrset-factory.cpp
+++ b/src/daemon/rrset-factory.cpp
@@ -52,7 +52,7 @@
   Name zoneIdentityName = Name(m_zone.getName()).append(label::NDNS_ITERATIVE_QUERY);
   if (m_dskCertName != DEFAULT_CERT &&
       !matchCertificate(m_dskCertName, zoneIdentityName)) {
-    BOOST_THROW_EXCEPTION(Error("Cannot verify certificate"));
+    NDN_THROW(Error("Cannot verify certificate"));
   }
 }
 
@@ -67,7 +67,7 @@
   DbMgr dbMgr(m_dbFile);
   const Name& zoneName = m_zone.getName();
   if (!dbMgr.find(m_zone)) {
-    BOOST_THROW_EXCEPTION(Error(zoneName.toUri() + " is not presented in the NDNS db"));
+    NDN_THROW(Error(zoneName.toUri() + " is not presented in the NDNS db"));
   }
 }
 
@@ -120,7 +120,7 @@
                               const ndn::DelegationList& delegations)
 {
   if (!m_checked) {
-    BOOST_THROW_EXCEPTION(Error("You have to call checkZoneKey before call generate functions"));
+    NDN_THROW(Error("You have to call checkZoneKey before call generate functions"));
   }
 
   if (ttl == DEFAULT_RR_TTL)
@@ -147,7 +147,7 @@
                                const std::vector<std::string>& strings)
 {
   if (!m_checked) {
-    BOOST_THROW_EXCEPTION(Error("You have to call checkZoneKey before call generate functions"));
+    NDN_THROW(Error("You have to call checkZoneKey before call generate functions"));
   }
 
   if (ttl == DEFAULT_RR_TTL)
@@ -181,7 +181,7 @@
                                 const ndn::security::Certificate& cert)
 {
   if (!m_checked) {
-    BOOST_THROW_EXCEPTION(Error("You have to call checkZoneKey before call generate functions"));
+    NDN_THROW(Error("You have to call checkZoneKey before call generate functions"));
   }
 
   if (ttl == DEFAULT_RR_TTL)
@@ -207,7 +207,7 @@
                                 time::seconds ttl)
 {
   if (!m_checked) {
-    BOOST_THROW_EXCEPTION(Error("You have to call checkZoneKey before call generate functions"));
+    NDN_THROW(Error("You have to call checkZoneKey before call generate functions"));
   }
 
   if (ttl == DEFAULT_RR_TTL)
@@ -234,7 +234,7 @@
                                const Name& upperLabel)
 {
   if (!m_checked) {
-    BOOST_THROW_EXCEPTION(Error("You have to call checkZoneKey before call generate functions"));
+    NDN_THROW(Error("You have to call checkZoneKey before call generate functions"));
   }
 
   if (ttl == DEFAULT_RR_TTL)
diff --git a/src/daemon/rrset-factory.hpp b/src/daemon/rrset-factory.hpp
index 1773fe0..bab99ca 100644
--- a/src/daemon/rrset-factory.hpp
+++ b/src/daemon/rrset-factory.hpp
@@ -20,7 +20,6 @@
 #ifndef NDNS_DAEMON_RRSET_FACTORY_HPP
 #define NDNS_DAEMON_RRSET_FACTORY_HPP
 
-#include "common.hpp"
 #include "rrset.hpp"
 #include "logger.hpp"
 #include "daemon/db-mgr.hpp"
@@ -29,9 +28,7 @@
 #include <ndn-cxx/link.hpp>
 #include <ndn-cxx/security/key-chain.hpp>
 
-#include <vector>
-#include <string>
-#include <boost/filesystem.hpp>
+#include <boost/filesystem/path.hpp>
 
 namespace ndn {
 namespace ndns {
@@ -44,10 +41,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:
@@ -138,4 +132,3 @@
 } // namespace ndn
 
 #endif // NDNS_DAEMON_RRSET_FACTORY_HPP
-
diff --git a/src/daemon/rrset.cpp b/src/daemon/rrset.cpp
index 75c4d81..5c95a8f 100644
--- a/src/daemon/rrset.cpp
+++ b/src/daemon/rrset.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-2020, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -62,7 +62,7 @@
 {
   if (getZone() != other.getZone() ||
       (getZone() != nullptr && *getZone() != *other.getZone())) {
-    BOOST_THROW_EXCEPTION(std::runtime_error("Cannot compare Rrset that belong to different zones"));
+    NDN_THROW(std::runtime_error("Cannot compare Rrset that belong to different zones"));
   }
 
   bool isLess = getLabel() < other.getLabel();
diff --git a/src/daemon/zone.hpp b/src/daemon/zone.hpp
index e3a15d4..854523a 100644
--- a/src/daemon/zone.hpp
+++ b/src/daemon/zone.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014, Regents of the University of California.
+/*
+ * Copyright (c) 2014-2020, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -20,9 +20,7 @@
 #ifndef NDNS_DAEMON_ZONE_HPP
 #define NDNS_DAEMON_ZONE_HPP
 
-#include <ndn-cxx/name.hpp>
-
-#include <iostream>
+#include "common.hpp"
 
 namespace ndn {
 namespace ndns {
@@ -32,8 +30,8 @@
  * @see http://en.wikipedia.org/wiki/DNS_zone
  * @see http://irl.cs.ucla.edu/data/files/theses/afanasyev-thesis.pdf
  *
- * The class is copyable, since it may be assigned to another Zone instance
- *  when resolving Response or Query from database
+ * This class is copyable, since it may be assigned to another Zone instance
+ * when resolving Response or Query from database
  */
 class Zone
 {
