diff --git a/src/bzip2-helper.cpp b/src/detail/bzip2-helper.cpp
similarity index 94%
rename from src/bzip2-helper.cpp
rename to src/detail/bzip2-helper.cpp
index 527c4f4..0784b7f 100644
--- a/src/bzip2-helper.cpp
+++ b/src/detail/bzip2-helper.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2012-2018 University of California, Los Angeles
+ * Copyright (c) 2012-2021 University of California, Los Angeles
  *
  * This file is part of ChronoSync, synchronization library for distributed realtime
  * applications for NDN.
@@ -17,7 +17,7 @@
  * ChronoSync, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "bzip2-helper.hpp"
+#include "detail/bzip2-helper.hpp"
 
 #include <boost/iostreams/filtering_stream.hpp>
 #include <boost/iostreams/detail/iostream.hpp>
diff --git a/src/bzip2-helper.hpp b/src/detail/bzip2-helper.hpp
similarity index 86%
rename from src/bzip2-helper.hpp
rename to src/detail/bzip2-helper.hpp
index 60485c4..47ff5ac 100644
--- a/src/bzip2-helper.hpp
+++ b/src/detail/bzip2-helper.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2012-2018 University of California, Los Angeles
+ * Copyright (c) 2012-2021 University of California, Los Angeles
  *
  * This file is part of ChronoSync, synchronization library for distributed realtime
  * applications for NDN.
@@ -17,8 +17,8 @@
  * ChronoSync, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef CHRONOSYNC_BZIP2_HELPER_HPP
-#define CHRONOSYNC_BZIP2_HELPER_HPP
+#ifndef CHRONOSYNC_DETAIL_BZIP2_HELPER_HPP
+#define CHRONOSYNC_DETAIL_BZIP2_HELPER_HPP
 
 #include <ndn-cxx/encoding/buffer.hpp>
 
@@ -40,4 +40,4 @@
 } // namespace bzip2
 } // namespace chronosync
 
-#endif // CHRONOSYNC_BZIP2_HELPER_HPP
+#endif // CHRONOSYNC_DETAIL_BZIP2_HELPER_HPP
diff --git a/src/detail/common.hpp b/src/detail/common.hpp
new file mode 100644
index 0000000..4e9e4cd
--- /dev/null
+++ b/src/detail/common.hpp
@@ -0,0 +1,96 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012-2021 University of California, Los Angeles
+ *
+ * This file is part of ChronoSync, synchronization library for distributed realtime
+ * applications for NDN.
+ *
+ * ChronoSync is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation, either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * ChronoSync is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * ChronoSync, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @author Alexander Afanasyev <http://lasr.cs.ucla.edu/afanasyev/index.html>
+ * @author Yingdi Yu <yingdi@cs.ucla.edu>
+ */
+
+#ifndef CHRONOSYNC_DETAIL_COMMON_HPP
+#define CHRONOSYNC_DETAIL_COMMON_HPP
+
+#include "detail/config.hpp"
+
+#ifdef CHRONOSYNC_WITH_TESTS
+#define CHRONOSYNC_VIRTUAL_WITH_TESTS virtual
+#define CHRONOSYNC_PUBLIC_WITH_TESTS_ELSE_PROTECTED public
+#define CHRONOSYNC_PUBLIC_WITH_TESTS_ELSE_PRIVATE public
+#define CHRONOSYNC_PROTECTED_WITH_TESTS_ELSE_PRIVATE protected
+#else
+#define CHRONOSYNC_VIRTUAL_WITH_TESTS
+#define CHRONOSYNC_PUBLIC_WITH_TESTS_ELSE_PROTECTED protected
+#define CHRONOSYNC_PUBLIC_WITH_TESTS_ELSE_PRIVATE private
+#define CHRONOSYNC_PROTECTED_WITH_TESTS_ELSE_PRIVATE private
+#endif
+
+#include <cstddef>
+#include <list>
+#include <queue>
+#include <set>
+#include <vector>
+#include <tuple>
+
+#include <ndn-cxx/data.hpp>
+#include <ndn-cxx/face.hpp>
+#include <ndn-cxx/interest.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
+#include <ndn-cxx/security/signing-helpers.hpp>
+#include <ndn-cxx/security/validator.hpp>
+#include <ndn-cxx/security/validator-config.hpp>
+#include <ndn-cxx/util/scheduler.hpp>
+#include <ndn-cxx/util/time.hpp>
+
+#include <boost/algorithm/string.hpp>
+#include <boost/asio.hpp>
+#include <boost/assert.hpp>
+#include <boost/core/noncopyable.hpp>
+#include <boost/lexical_cast.hpp>
+
+namespace chronosync {
+
+using std::size_t;
+
+using boost::noncopyable;
+
+using std::bind;
+using std::cref;
+using std::function;
+using std::make_shared;
+using std::make_tuple;
+using std::ref;
+using std::shared_ptr;
+
+using ndn::Block;
+using ndn::ConstBufferPtr;
+using ndn::Data;
+using ndn::Interest;
+using ndn::Name;
+using ndn::security::ValidationError;
+using ndn::security::Validator;
+
+namespace tlv {
+using namespace ndn::tlv;
+} // namespace tlv
+
+namespace name = ndn::name;
+namespace time = ndn::time;
+namespace security = ndn::security;
+namespace encoding = ndn::encoding;
+
+} // namespace chronosync
+
+#endif // CHRONOSYNC_DETAIL_COMMON_HPP
diff --git a/src/mi-tag.hpp b/src/detail/mi-tag.hpp
similarity index 87%
rename from src/mi-tag.hpp
rename to src/detail/mi-tag.hpp
index 1abafc4..a64195e 100644
--- a/src/mi-tag.hpp
+++ b/src/detail/mi-tag.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2012-2014 University of California, Los Angeles
+ * Copyright (c) 2012-2021 University of California, Los Angeles
  *
  * This file is part of ChronoSync, synchronization library for distributed realtime
  * applications for NDN.
@@ -22,8 +22,8 @@
  * @author Yingdi Yu <yingdi@cs.ucla.edu>
  */
 
-#ifndef CHRONOSYNC_MI_TAG_HPP
-#define CHRONOSYNC_MI_TAG_HPP
+#ifndef CHRONOSYNC_DETAIL_MI_TAG_HPP
+#define CHRONOSYNC_DETAIL_MI_TAG_HPP
 
 namespace chronosync {
 
@@ -40,11 +40,6 @@
 {
 };
 
-struct timed
-{
-};
-
-
 } // namespace chronosync
 
-#endif // CHRONOSYNC_MI_TAG_HPP
+#endif // CHRONOSYNC_DETAIL_MI_TAG_HPP
diff --git a/src/diff-state-container.hpp b/src/diff-state-container.hpp
index dbd4a11..615d639 100644
--- a/src/diff-state-container.hpp
+++ b/src/diff-state-container.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2012-2017 University of California, Los Angeles
+ * Copyright (c) 2012-2021 University of California, Los Angeles
  *
  * This file is part of ChronoSync, synchronization library for distributed realtime
  * applications for NDN.
@@ -25,15 +25,14 @@
 #ifndef CHRONOSYNC_DIFF_STATE_CONTAINER_HPP
 #define CHRONOSYNC_DIFF_STATE_CONTAINER_HPP
 
-#include "mi-tag.hpp"
+#include "detail/mi-tag.hpp"
 #include "diff-state.hpp"
 
 #include <boost/multi_index_container.hpp>
-#include <boost/multi_index/tag.hpp>
 #include <boost/multi_index/hashed_index.hpp>
 #include <boost/multi_index/sequenced_index.hpp>
-#include <boost/multi_index/member.hpp>
 #include <boost/multi_index/mem_fun.hpp>
+#include <boost/multi_index/tag.hpp>
 
 namespace chronosync {
 
@@ -72,9 +71,8 @@
       DigestPtrHash,
       DigestPtrEqual
       >,
-
     // sequenced index to access older/newer element (like in list)
-    mi::sequenced<mi::tag<sequenced> >
+    mi::sequenced<mi::tag<sequenced>>
     >
   >
 {
diff --git a/src/interest-container.hpp b/src/interest-container.hpp
index 56c08ce..9ad3816 100644
--- a/src/interest-container.hpp
+++ b/src/interest-container.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2012-2019 University of California, Los Angeles
+ * Copyright (c) 2012-2021 University of California, Los Angeles
  *
  * This file is part of ChronoSync, synchronization library for distributed realtime
  * applications for NDN.
@@ -25,15 +25,12 @@
 #ifndef CHRONOSYNC_INTEREST_CONTAINER_HPP
 #define CHRONOSYNC_INTEREST_CONTAINER_HPP
 
-#include "common.hpp"
-#include "mi-tag.hpp"
 #include "diff-state-container.hpp"
 
 #include <boost/multi_index_container.hpp>
-#include <boost/multi_index/tag.hpp>
 #include <boost/multi_index/hashed_index.hpp>
-#include <boost/multi_index/ordered_index.hpp>
 #include <boost/multi_index/member.hpp>
+#include <boost/multi_index/tag.hpp>
 
 namespace chronosync {
 
diff --git a/src/leaf-container.hpp b/src/leaf-container.hpp
index 95ddc75..4e7a805 100644
--- a/src/leaf-container.hpp
+++ b/src/leaf-container.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2012-2017 University of California, Los Angeles
+ * Copyright (c) 2012-2021 University of California, Los Angeles
  *
  * This file is part of ChronoSync, synchronization library for distributed realtime
  * applications for NDN.
@@ -25,13 +25,14 @@
 #ifndef CHRONOSYNC_LEAF_CONTAINER_HPP
 #define CHRONOSYNC_LEAF_CONTAINER_HPP
 
-#include "mi-tag.hpp"
+#include "detail/mi-tag.hpp"
 #include "leaf.hpp"
 
 #include <boost/multi_index_container.hpp>
-#include <boost/multi_index/ordered_index.hpp>
 #include <boost/multi_index/hashed_index.hpp>
+#include <boost/multi_index/ordered_index.hpp>
 #include <boost/multi_index/mem_fun.hpp>
+#include <boost/multi_index/tag.hpp>
 
 #include <ndn-cxx/util/sha256.hpp>
 
diff --git a/src/leaf.hpp b/src/leaf.hpp
index 63284b8..952b063 100644
--- a/src/leaf.hpp
+++ b/src/leaf.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2012-2017 University of California, Los Angeles
+ * Copyright (c) 2012-2021 University of California, Los Angeles
  *
  * This file is part of ChronoSync, synchronization library for distributed realtime
  * applications for NDN.
@@ -25,7 +25,7 @@
 #ifndef CHRONOSYNC_LEAF_HPP
 #define CHRONOSYNC_LEAF_HPP
 
-#include "common.hpp"
+#include "detail/common.hpp"
 
 #include <ndn-cxx/util/sha256.hpp>
 
diff --git a/src/logger.hpp b/src/logger.hpp
deleted file mode 100644
index 78e3040..0000000
--- a/src/logger.hpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
-/*
- * Copyright (c) 2012-2017 University of California, Los Angeles
- *
- * This file is part of ChronoSync, synchronization library for distributed realtime
- * applications for NDN.
- *
- * ChronoSync is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation, either
- * version 3 of the License, or (at your option) any later version.
- *
- * ChronoSync is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * ChronoSync, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- *
- * @author Zhenkai Zhu <http://irl.cs.ucla.edu/~zhenkai/>
- * @author Chaoyi Bian <bcy@pku.edu.cn>
- * @author Alexander Afanasyev <http://lasr.cs.ucla.edu/afanasyev/index.html>
- */
-
-#ifndef CHRONOSYNC_LOGGER_HPP
-#define CHRONOSYNC_LOGGER_HPP
-
-#include <ndn-cxx/util/logger.hpp>
-
-#define INIT_LOGGER(name) NDN_LOG_INIT(sync.name)
-
-#define _LOG_ERROR(x) NDN_LOG_ERROR(x)
-#define _LOG_WARN(x)  NDN_LOG_WARN(x)
-#define _LOG_INFO(x)  NDN_LOG_INFO(x)
-#define _LOG_DEBUG(x) NDN_LOG_DEBUG(x)
-#define _LOG_TRACE(x) NDN_LOG_TRACE(x)
-
-#define _LOG_FUNCTION(x)     NDN_LOG_TRACE(__FUNCTION__ << "(" << x << ")")
-#define _LOG_FUNCTION_NOARGS NDN_LOG_TRACE(__FUNCTION__ << "()")
-
-#endif // CHRONOSYNC_LOGGER_HPP
diff --git a/src/logic.cpp b/src/logic.cpp
index 6d52def..db6bc02 100644
--- a/src/logic.cpp
+++ b/src/logic.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2012-2020 University of California, Los Angeles
+ * Copyright (c) 2012-2021 University of California, Los Angeles
  *
  * This file is part of ChronoSync, synchronization library for distributed realtime
  * applications for NDN.
@@ -24,16 +24,16 @@
  */
 
 #include "logic.hpp"
-#include "logger.hpp"
-#include "bzip2-helper.hpp"
+#include "detail/bzip2-helper.hpp"
 
 #include <ndn-cxx/util/backports.hpp>
 #include <ndn-cxx/util/exception.hpp>
+#include <ndn-cxx/util/logger.hpp>
 #include <ndn-cxx/util/string-helper.hpp>
 
-INIT_LOGGER(Logic);
+NDN_LOG_INIT(sync.Logic);
 
-#define _LOG_DEBUG_ID(v) _LOG_DEBUG("Instance" << m_instanceId << ": " << v)
+#define CHRONO_LOG_DBG(v) NDN_LOG_DEBUG("Instance" << m_instanceId << ": " << v)
 
 namespace chronosync {
 
@@ -69,18 +69,18 @@
  * The returned value can be customized using the environment variable `CHRONOSYNC_MAX_PACKET_SIZE`,
  * but the returned value will be at least 500 and no more than `ndn::MAX_NDN_PACKET_SIZE`.
  */
-#ifndef CHRONOSYNC_HAVE_TESTS
+#ifndef CHRONOSYNC_WITH_TESTS
 static
-#endif // CHRONOSYNC_HAVE_TESTS
+#endif // CHRONOSYNC_WITH_TESTS
 size_t
 getMaxPacketLimit()
 {
   static size_t limit = 0;
-#ifndef CHRONOSYNC_HAVE_TESTS
+#ifndef CHRONOSYNC_WITH_TESTS
   if (limit != 0) {
     return limit;
   }
-#endif // CHRONOSYNC_HAVE_TESTS
+#endif // CHRONOSYNC_WITH_TESTS
 
   if (getenv("CHRONOSYNC_MAX_PACKET_SIZE") != nullptr) {
     try {
@@ -132,25 +132,25 @@
   , m_validator(validator)
   , m_instanceId(s_instanceCounter++)
 {
-  _LOG_DEBUG_ID(">> Logic::Logic");
+  CHRONO_LOG_DBG(">> Logic::Logic");
   addUserNode(m_defaultUserPrefix, defaultSigningId, session, false);
 
-  _LOG_DEBUG_ID("Listen to: " << m_syncPrefix);
+  CHRONO_LOG_DBG("Listen to: " << m_syncPrefix);
   m_syncRegisteredPrefix = m_face.setInterestFilter(
     ndn::InterestFilter(m_syncPrefix).allowLoopback(false),
     bind(&Logic::onSyncInterest, this, _1, _2),
     bind(&Logic::onSyncRegisterFailed, this, _1, _2));
 
   sendSyncInterest();
-  _LOG_DEBUG_ID("<< Logic::Logic");
+  CHRONO_LOG_DBG("<< Logic::Logic");
 }
 
 Logic::~Logic()
 {
-  _LOG_DEBUG_ID(">> Logic::~Logic");
+  CHRONO_LOG_DBG(">> Logic::~Logic");
   m_interestTable.clear();
   m_scheduler.cancelAllEvents();
-  _LOG_DEBUG_ID("<< Logic::~Logic");
+  CHRONO_LOG_DBG("<< Logic::~Logic");
 }
 
 void
@@ -262,20 +262,20 @@
   auto it = m_nodeList.find(prefix);
   if (it != m_nodeList.end()) {
     NodeInfo& node = it->second;
-    _LOG_DEBUG_ID(">> Logic::updateSeqNo");
-    _LOG_DEBUG_ID("seqNo: " << seqNo << " m_seqNo: " << node.seqNo);
+    CHRONO_LOG_DBG(">> Logic::updateSeqNo");
+    CHRONO_LOG_DBG("seqNo: " << seqNo << " m_seqNo: " << node.seqNo);
     if (seqNo < node.seqNo || seqNo == 0)
       return;
 
     node.seqNo = seqNo;
-    _LOG_DEBUG_ID("updateSeqNo: m_seqNo " << node.seqNo);
+    CHRONO_LOG_DBG("updateSeqNo: m_seqNo " << node.seqNo);
 
     if (!m_isInReset) {
-      _LOG_DEBUG_ID("updateSeqNo: not in Reset ");
+      CHRONO_LOG_DBG("updateSeqNo: not in Reset");
       ConstBufferPtr previousRoot = m_state.getRootDigest();
       {
         std::string hash = ndn::toHex(previousRoot->data(), previousRoot->size(), false);
-        _LOG_DEBUG_ID("Hash: " << hash);
+        CHRONO_LOG_DBG("Hash: " << hash);
       }
 
       bool isInserted = false;
@@ -283,8 +283,8 @@
       SeqNo oldSeq;
       std::tie(isInserted, isUpdated, oldSeq) = m_state.update(node.sessionName, node.seqNo);
 
-      _LOG_DEBUG_ID("Insert: " << std::boolalpha << isInserted);
-      _LOG_DEBUG_ID("Updated: " << std::boolalpha << isUpdated);
+      CHRONO_LOG_DBG("Insert: " << std::boolalpha << isInserted);
+      CHRONO_LOG_DBG("Updated: " << std::boolalpha << isUpdated);
       if (isInserted || isUpdated) {
         DiffStatePtr commit = make_shared<DiffState>();
         commit->update(node.sessionName, node.seqNo);
@@ -322,12 +322,12 @@
 }
 
 void
-Logic::onSyncInterest(const Name& prefix, const Interest& interest)
+Logic::onSyncInterest(const Name&, const Interest& interest)
 {
-  _LOG_DEBUG_ID(">> Logic::onSyncInterest");
+  CHRONO_LOG_DBG(">> Logic::onSyncInterest");
   Name name = interest.getName();
 
-  _LOG_DEBUG_ID("InterestName: " << name);
+  CHRONO_LOG_DBG("InterestName: " << name);
 
   if (name.size() >= 1 && RESET_COMPONENT == name.get(-1)) {
     processResetInterest(interest);
@@ -339,20 +339,19 @@
     processSyncInterest(interest);
   }
 
-  _LOG_DEBUG_ID("<< Logic::onSyncInterest");
+  CHRONO_LOG_DBG("<< Logic::onSyncInterest");
 }
 
 void
 Logic::onSyncRegisterFailed(const Name& prefix, const std::string& msg)
 {
-  //Sync prefix registration failed
-  _LOG_DEBUG_ID(">> Logic::onSyncRegisterFailed");
+  CHRONO_LOG_DBG(">> Logic::onSyncRegisterFailed");
 }
 
 void
-Logic::onSyncData(const Interest& interest, const Data& data)
+Logic::onSyncData(const Interest&, const Data& data)
 {
-  _LOG_DEBUG_ID(">> Logic::onSyncData");
+  CHRONO_LOG_DBG(">> Logic::onSyncData");
   if (m_validator != nullptr)
     m_validator->validate(data,
                           bind(&Logic::onSyncDataValidated, this, _1),
@@ -360,38 +359,38 @@
   else
      onSyncDataValidated(data);
 
-  _LOG_DEBUG_ID("<< Logic::onSyncData");
+  CHRONO_LOG_DBG("<< Logic::onSyncData");
 }
 
 void
-Logic::onResetData(const Interest& interest, const Data& data)
+Logic::onResetData(const Interest&, const Data&)
 {
   // This should not happened, drop the received data.
 }
 
 void
-Logic::onSyncNack(const Interest& interest, const ndn::lp::Nack& nack)
+Logic::onSyncNack(const Interest&, const ndn::lp::Nack& nack)
 {
-  _LOG_DEBUG_ID(">> Logic::onSyncNack");
+  CHRONO_LOG_DBG(">> Logic::onSyncNack");
   if (nack.getReason() == ndn::lp::NackReason::NO_ROUTE) {
     auto after = ndn::time::milliseconds(m_reexpressionJitter(m_rng));
-    _LOG_DEBUG_ID("Schedule sync interest after: " << after);
+    CHRONO_LOG_DBG("Schedule sync interest after: " << after);
     m_scheduler.schedule(after, [this] { sendSyncInterest(); });
   }
-  _LOG_DEBUG_ID("<< Logic::onSyncNack");
+  CHRONO_LOG_DBG("<< Logic::onSyncNack");
 }
 
 void
 Logic::onSyncTimeout(const Interest& interest)
 {
   // It is OK. Others will handle the time out situation.
-  _LOG_DEBUG_ID(">> Logic::onSyncTimeout");
-  _LOG_DEBUG_ID("Interest: " << interest.getName());
-  _LOG_DEBUG_ID("<< Logic::onSyncTimeout");
+  CHRONO_LOG_DBG(">> Logic::onSyncTimeout");
+  CHRONO_LOG_DBG("Interest: " << interest.getName());
+  CHRONO_LOG_DBG("<< Logic::onSyncTimeout");
 }
 
 void
-Logic::onSyncDataValidationFailed(const Data& data)
+Logic::onSyncDataValidationFailed(const Data&)
 {
   // SyncReply cannot be validated.
 }
@@ -408,14 +407,14 @@
     processSyncData(name, digest, Block(std::move(contentBuffer)));
   }
   catch (const std::ios_base::failure& error) {
-    _LOG_WARN("Error decompressing content of " << data.getName() << " (" << error.what() << ")");
+    NDN_LOG_WARN("Error decompressing content of " << data.getName() << " (" << error.what() << ")");
   }
 }
 
 void
 Logic::processSyncInterest(const Interest& interest, bool isTimedProcessing/*=false*/)
 {
-  _LOG_DEBUG_ID(">> Logic::processSyncInterest");
+  CHRONO_LOG_DBG(">> Logic::processSyncInterest");
 
   Name name = interest.getName();
   ConstBufferPtr digest = make_shared<ndn::Buffer>(name.get(-1).value(), name.get(-1).value_size());
@@ -425,23 +424,23 @@
   // If the digest of the incoming interest is the same as root digest
   // Put the interest into InterestTable
   if (*rootDigest == *digest) {
-    _LOG_DEBUG_ID("Oh, we are in the same state");
+    CHRONO_LOG_DBG("Oh, we are in the same state");
     m_interestTable.insert(interest, digest, false);
 
     if (!m_isInReset)
       return;
 
     if (!isTimedProcessing) {
-      _LOG_DEBUG_ID("Non timed processing in reset");
+      CHRONO_LOG_DBG("Non timed processing in reset");
       // Still in reset, our own seq has not been put into state yet
       // Do not hurry, some others may be also resetting and may send their reply
       time::milliseconds after(m_rangeUniformRandom(m_rng));
-      _LOG_DEBUG_ID("After: " << after);
+      CHRONO_LOG_DBG("After: " << after);
       m_delayedInterestProcessingId = m_scheduler.schedule(after,
                                                            [=] { processSyncInterest(interest, true); });
     }
     else {
-      _LOG_DEBUG_ID("Timed processing in reset");
+      CHRONO_LOG_DBG("Timed processing in reset");
       // Now we can get out of reset state by putting our own stuff into m_state.
       cancelReset();
     }
@@ -451,7 +450,7 @@
 
   // If the digest of incoming interest is an "empty" digest
   if (*digest == *EMPTY_DIGEST) {
-    _LOG_DEBUG_ID("Poor guy, he knows nothing");
+    CHRONO_LOG_DBG("Poor guy, he knows nothing");
     sendSyncData(m_defaultUserPrefix, name, m_state);
     return;
   }
@@ -459,13 +458,13 @@
   auto stateIter = m_log.find(digest);
   // If the digest of incoming interest can be found from the log
   if (stateIter != m_log.end()) {
-    _LOG_DEBUG_ID("It is ok, you are so close");
+    CHRONO_LOG_DBG("It is ok, you are so close");
     sendSyncData(m_defaultUserPrefix, name, *(*stateIter)->diff());
     return;
   }
 
   if (!isTimedProcessing) {
-    _LOG_DEBUG_ID("Let's wait, just wait for a while");
+    CHRONO_LOG_DBG("Let's wait, just wait for a while");
     // Do not hurry, some incoming SyncReplies may help us to recognize the digest
     m_interestTable.insert(interest, digest, true);
 
@@ -475,25 +474,25 @@
   }
   else {
     // OK, nobody is helping us, just tell the truth.
-    _LOG_DEBUG_ID("OK, nobody is helping us, let us try to recover");
+    CHRONO_LOG_DBG("OK, nobody is helping us, let us try to recover");
     m_interestTable.erase(digest);
     sendRecoveryInterest(digest);
   }
 
-  _LOG_DEBUG_ID("<< Logic::processSyncInterest");
+  CHRONO_LOG_DBG("<< Logic::processSyncInterest");
 }
 
 void
 Logic::processResetInterest(const Interest&)
 {
-  _LOG_DEBUG_ID(">> Logic::processResetInterest");
+  CHRONO_LOG_DBG(">> Logic::processResetInterest");
   reset(true);
 }
 
 void
 Logic::processSyncData(const Name&, ConstBufferPtr digest, const Block& syncReply)
 {
-  _LOG_DEBUG_ID(">> Logic::processSyncData");
+  CHRONO_LOG_DBG(">> Logic::processSyncData");
   DiffStatePtr commit = make_shared<DiffState>();
   ConstBufferPtr previousRoot = m_state.getRootDigest();
 
@@ -528,12 +527,11 @@
       insertToDiffLog(commit, previousRoot);
     }
     else {
-      _LOG_DEBUG_ID("What? nothing new");
+      CHRONO_LOG_DBG("What? nothing new");
     }
   }
   catch (const State::Error&) {
-    _LOG_DEBUG_ID("Something really fishy happened during state decoding");
-    // Something really fishy happened during state decoding;
+    CHRONO_LOG_DBG("Something really fishy happened during state decoding");
     commit.reset();
     return;
   }
@@ -541,7 +539,7 @@
   if (static_cast<bool>(commit) && !commit->getLeaves().empty()) {
     // state changed and it is safe to express a new interest
     auto after = time::milliseconds(m_reexpressionJitter(m_rng));
-    _LOG_DEBUG_ID("Reschedule sync interest after: " << after);
+    CHRONO_LOG_DBG("Reschedule sync interest after: " << after);
     m_reexpressingInterestId = m_scheduler.schedule(after, [this] { sendSyncInterest(); });
   }
 }
@@ -549,9 +547,9 @@
 void
 Logic::satisfyPendingSyncInterests(const Name& updatedPrefix, ConstDiffStatePtr commit)
 {
-  _LOG_DEBUG_ID(">> Logic::satisfyPendingSyncInterests");
+  CHRONO_LOG_DBG(">> Logic::satisfyPendingSyncInterests");
   try {
-    _LOG_DEBUG_ID("InterestTable size: " << m_interestTable.size());
+    CHRONO_LOG_DBG("InterestTable size: " << m_interestTable.size());
     auto it = m_interestTable.begin();
     while (it != m_interestTable.end()) {
       ConstUnsatisfiedInterestPtr request = *it;
@@ -566,13 +564,13 @@
   catch (const InterestTable::Error&) {
     // ok. not really an error
   }
-  _LOG_DEBUG_ID("<< Logic::satisfyPendingSyncInterests");
+  CHRONO_LOG_DBG("<< Logic::satisfyPendingSyncInterests");
 }
 
 void
 Logic::insertToDiffLog(DiffStatePtr commit, ConstBufferPtr previousRoot)
 {
-  _LOG_DEBUG_ID(">> Logic::insertToDiffLog");
+  CHRONO_LOG_DBG(">> Logic::insertToDiffLog");
   // Connect to the history
   if (!m_log.empty())
     (*m_log.find(previousRoot))->setNext(commit);
@@ -580,17 +578,17 @@
   // Insert the commit
   m_log.erase(commit->getRootDigest());
   m_log.insert(commit);
-  _LOG_DEBUG_ID("<< Logic::insertToDiffLog");
+  CHRONO_LOG_DBG("<< Logic::insertToDiffLog");
 }
 
 void
 Logic::sendResetInterest()
 {
-  _LOG_DEBUG_ID(">> Logic::sendResetInterest");
+  CHRONO_LOG_DBG(">> Logic::sendResetInterest");
 
   if (m_needPeriodReset) {
-    _LOG_DEBUG_ID("Need Period Reset");
-    _LOG_DEBUG_ID("ResetTimer: " << m_resetTimer);
+    CHRONO_LOG_DBG("Need Period Reset");
+    CHRONO_LOG_DBG("ResetTimer: " << m_resetTimer);
 
     m_resetInterestId = m_scheduler.schedule(m_resetTimer + time::milliseconds(m_reexpressionJitter(m_rng)),
                                              [this] { sendResetInterest(); });
@@ -607,13 +605,13 @@
     bind(&Logic::onResetData, this, _1, _2),
     bind(&Logic::onSyncTimeout, this, _1), // Nack
     bind(&Logic::onSyncTimeout, this, _1));
-  _LOG_DEBUG_ID("<< Logic::sendResetInterest");
+  CHRONO_LOG_DBG("<< Logic::sendResetInterest");
 }
 
 void
 Logic::sendSyncInterest()
 {
-  _LOG_DEBUG_ID(">> Logic::sendSyncInterest");
+  CHRONO_LOG_DBG(">> Logic::sendSyncInterest");
 
   Name interestName;
   interestName.append(m_syncPrefix)
@@ -639,8 +637,8 @@
                                                  bind(&Logic::onSyncNack, this, _1, _2),
                                                  bind(&Logic::onSyncTimeout, this, _1));
 
-  _LOG_DEBUG_ID("Send interest: " << interest.getName());
-  _LOG_DEBUG_ID("<< Logic::sendSyncInterest");
+  CHRONO_LOG_DBG("Send interest: " << interest.getName());
+  CHRONO_LOG_DBG("<< Logic::sendSyncInterest");
 }
 
 void
@@ -688,7 +686,8 @@
   while (syncReply.wireEncode().size() > getMaxPacketLimit() - NDNLP_EXPECTED_OVERHEAD) {
     if (nExcludedStates == 1) {
       // To show this debug message only once
-      _LOG_DEBUG("Sync reply size exceeded maximum packet limit (" << (getMaxPacketLimit() - NDNLP_EXPECTED_OVERHEAD) << ")");
+      NDN_LOG_DEBUG("Sync reply size exceeded maximum packet limit ("
+                    << (getMaxPacketLimit() - NDNLP_EXPECTED_OVERHEAD) << ")");
     }
     State partialState;
     trimState(partialState, state, nExcludedStates);
@@ -704,7 +703,7 @@
 void
 Logic::sendSyncData(const Name& nodePrefix, const Name& name, const State& state)
 {
-  _LOG_DEBUG_ID(">> Logic::sendSyncData");
+  CHRONO_LOG_DBG(">> Logic::sendSyncData");
   if (m_nodeList.find(nodePrefix) == m_nodeList.end())
     return;
 
@@ -717,17 +716,17 @@
 
     // re-schedule sending Sync interest
     time::milliseconds after(m_reexpressionJitter(m_rng));
-    _LOG_DEBUG_ID("Satisfy our own interest");
-    _LOG_DEBUG_ID("Reschedule sync interest after " << after);
+    CHRONO_LOG_DBG("Satisfy our own interest");
+    CHRONO_LOG_DBG("Reschedule sync interest after " << after);
     m_reexpressingInterestId = m_scheduler.schedule(after, [this] { sendSyncInterest(); });
   }
-  _LOG_DEBUG_ID("<< Logic::sendSyncData");
+  CHRONO_LOG_DBG("<< Logic::sendSyncData");
 }
 
 void
 Logic::cancelReset()
 {
-  _LOG_DEBUG_ID(">> Logic::cancelReset");
+  CHRONO_LOG_DBG(">> Logic::cancelReset");
   if (!m_isInReset)
     return;
 
@@ -735,20 +734,20 @@
   for (const auto& node : m_nodeList) {
     updateSeqNo(node.second.seqNo, node.first);
   }
-  _LOG_DEBUG_ID("<< Logic::cancelReset");
+  CHRONO_LOG_DBG("<< Logic::cancelReset");
 }
 
 void
 Logic::printDigest(ConstBufferPtr digest)
 {
   std::string hash = ndn::toHex(digest->data(), digest->size(), false);
-  _LOG_DEBUG_ID("Hash: " << hash);
+  CHRONO_LOG_DBG("Hash: " << hash);
 }
 
 void
 Logic::sendRecoveryInterest(ConstBufferPtr digest)
 {
-  _LOG_DEBUG_ID(">> Logic::sendRecoveryInterest");
+  CHRONO_LOG_DBG(">> Logic::sendRecoveryInterest");
 
   Name interestName;
   interestName.append(m_syncPrefix)
@@ -764,14 +763,14 @@
     bind(&Logic::onRecoveryData, this, _1, _2),
     bind(&Logic::onRecoveryTimeout, this, _1), // Nack
     bind(&Logic::onRecoveryTimeout, this, _1));
-  _LOG_DEBUG_ID("interest: " << interest.getName());
-  _LOG_DEBUG_ID("<< Logic::sendRecoveryInterest");
+  CHRONO_LOG_DBG("interest: " << interest.getName());
+  CHRONO_LOG_DBG("<< Logic::sendRecoveryInterest");
 }
 
 void
 Logic::processRecoveryInterest(const Interest& interest)
 {
-  _LOG_DEBUG_ID(">> Logic::processRecoveryInterest");
+  CHRONO_LOG_DBG(">> Logic::processRecoveryInterest");
 
   Name name = interest.getName();
   ConstBufferPtr digest = make_shared<ndn::Buffer>(name.get(-1).value(), name.get(-1).value_size());
@@ -779,30 +778,30 @@
 
   auto stateIter = m_log.find(digest);
   if (stateIter != m_log.end() || *digest == *EMPTY_DIGEST || *rootDigest == *digest) {
-    _LOG_DEBUG_ID("I can help you recover");
+    CHRONO_LOG_DBG("I can help you recover");
     sendSyncData(m_defaultUserPrefix, name, m_state);
     return;
   }
 
-  _LOG_DEBUG_ID("<< Logic::processRecoveryInterest");
+  CHRONO_LOG_DBG("<< Logic::processRecoveryInterest");
 }
 
 void
 Logic::onRecoveryData(const Interest& interest, const Data& data)
 {
-  _LOG_DEBUG_ID(">> Logic::onRecoveryData");
+  CHRONO_LOG_DBG(">> Logic::onRecoveryData");
   m_pendingRecoveryInterests.erase(interest.getName()[-1].toUri());
   onSyncDataValidated(data);
-  _LOG_DEBUG_ID("<< Logic::onRecoveryData");
+  CHRONO_LOG_DBG("<< Logic::onRecoveryData");
 }
 
 void
 Logic::onRecoveryTimeout(const Interest& interest)
 {
-  _LOG_DEBUG_ID(">> Logic::onRecoveryTimeout");
+  CHRONO_LOG_DBG(">> Logic::onRecoveryTimeout");
   m_pendingRecoveryInterests.erase(interest.getName()[-1].toUri());
-  _LOG_DEBUG_ID("Interest: " << interest.getName());
-  _LOG_DEBUG_ID("<< Logic::onRecoveryTimeout");
+  CHRONO_LOG_DBG("Interest: " << interest.getName());
+  CHRONO_LOG_DBG("<< Logic::onRecoveryTimeout");
 }
 
 } // namespace chronosync
diff --git a/src/logic.hpp b/src/logic.hpp
index e016a9e..25514ed 100644
--- a/src/logic.hpp
+++ b/src/logic.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2012-2020 University of California, Los Angeles
+ * Copyright (c) 2012-2021 University of California, Los Angeles
  *
  * This file is part of ChronoSync, synchronization library for distributed realtime
  * applications for NDN.
@@ -81,14 +81,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:
   static const time::steady_clock::Duration DEFAULT_RESET_TIMER;
   static const time::steady_clock::Duration DEFAULT_CANCEL_RESET_TIMER;
   static const time::milliseconds DEFAULT_RESET_INTEREST_LIFETIME;
@@ -512,10 +507,10 @@
   static int s_instanceCounter;
 };
 
-#ifdef CHRONOSYNC_HAVE_TESTS
+#ifdef CHRONOSYNC_WITH_TESTS
 size_t
 getMaxPacketLimit();
-#endif // CHRONOSYNC_HAVE_TESTS
+#endif // CHRONOSYNC_WITH_TESTS
 
 } // namespace chronosync
 
diff --git a/src/socket.cpp b/src/socket.cpp
index 9aca2e5..46dc8dd 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2012-2019 University of California, Los Angeles
+ * Copyright (c) 2012-2021 University of California, Los Angeles
  *
  * This file is part of ChronoSync, synchronization library for distributed realtime
  * applications for NDN.
@@ -23,9 +23,10 @@
  */
 
 #include "socket.hpp"
-#include "logger.hpp"
 
-INIT_LOGGER(Socket);
+#include <ndn-cxx/util/logger.hpp>
+
+NDN_LOG_INIT(sync.Socket);
 
 namespace chronosync {
 
@@ -55,7 +56,7 @@
     m_registeredPrefixList[m_userPrefix] =
       m_face.setInterestFilter(m_userPrefix,
                                bind(&Socket::onInterest, this, _1, _2),
-                               [] (const Name& prefix, const std::string& msg) {});
+                               [] (const Name&, const std::string&) {});
   NDN_LOG_DEBUG("<< Socket::Socket");
 }
 
@@ -84,7 +85,8 @@
   m_registeredPrefixList[prefix] =
     m_face.setInterestFilter(prefix,
                              bind(&Socket::onInterest, this, _1, _2),
-                             [] (const Name& prefix, const std::string& msg) {});
+                             [] (const Name&, const std::string&) {});
+
   NDN_LOG_DEBUG("<< addSyncNode");
 }
 
@@ -194,7 +196,7 @@
                   const ndn::TimeoutCallback& onTimeout,
                   int nRetries)
 {
-  _LOG_DEBUG(">> Socket::fetchData");
+  NDN_LOG_DEBUG(">> Socket::fetchData");
   Name interestName;
   interestName.append(sessionName).appendNumber(seqNo);
 
@@ -207,24 +209,24 @@
                          bind(onTimeout, _1), // Nack
                          onTimeout);
 
-  _LOG_DEBUG("<< Socket::fetchData");
+  NDN_LOG_DEBUG("<< Socket::fetchData");
 }
 
 void
-Socket::onInterest(const Name& prefix, const Interest& interest)
+Socket::onInterest(const Name&, const Interest& interest)
 {
-  shared_ptr<const Data> data = m_ims.find(interest);
+  auto data = m_ims.find(interest);
   if (data != nullptr) {
     m_face.put(*data);
   }
 }
 
 void
-Socket::onData(const Interest& interest, const Data& data,
+Socket::onData(const Interest&, const Data& data,
                const DataValidatedCallback& onValidated,
                const DataValidationErrorCallback& onFailed)
 {
-  _LOG_DEBUG("Socket::onData");
+  NDN_LOG_DEBUG("Socket::onData");
 
   if (static_cast<bool>(m_validator))
     m_validator->validate(data, onValidated, onFailed);
@@ -237,7 +239,8 @@
                       const DataValidatedCallback& onValidated,
                       const DataValidationErrorCallback& onFailed)
 {
-  _LOG_DEBUG("Socket::onDataTimeout");
+  NDN_LOG_DEBUG("Socket::onDataTimeout");
+
   if (nRetries <= 0)
     return;
 
