diff --git a/.jenkins.d/40-headers-check.sh b/.jenkins.d/40-headers-check.sh
index efc3bf9..b0f9987 100755
--- a/.jenkins.d/40-headers-check.sh
+++ b/.jenkins.d/40-headers-check.sh
@@ -17,7 +17,7 @@
 fi
 
 CXX=${CXX:-g++}
-STD=-std=c++14
+STD=-std=c++17
 CXXFLAGS="-O2 -Wall -Wno-unneeded-internal-declaration -Wno-unused-const-variable $(pkg-config --cflags libndn-cxx $PROJ)"
 INCLUDEDIR="$(pkg-config --variable=includedir $PROJ)"/$PROJ
 
diff --git a/.waf-tools/default-compiler-flags.py b/.waf-tools/default-compiler-flags.py
index f086c17..7c6d282 100644
--- a/.waf-tools/default-compiler-flags.py
+++ b/.waf-tools/default-compiler-flags.py
@@ -136,7 +136,7 @@
     """
     def getGeneralFlags(self, conf):
         flags = super(GccBasicFlags, self).getGeneralFlags(conf)
-        flags['CXXFLAGS'] += ['-std=c++14']
+        flags['CXXFLAGS'] += ['-std=c++17']
         if Utils.unversioned_sys_platform() == 'linux':
             flags['LINKFLAGS'] += ['-fuse-ld=gold']
         elif Utils.unversioned_sys_platform() == 'freebsd':
diff --git a/src/detail/bzip2-helper.cpp b/src/detail/bzip2-helper.cpp
index 4c5617e..a774b50 100644
--- a/src/detail/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-2021 University of California, Los Angeles
+ * Copyright (c) 2012-2022 University of California, Los Angeles
  *
  * This file is part of ChronoSync, synchronization library for distributed realtime
  * applications for NDN.
@@ -27,8 +27,7 @@
 
 #include <ndn-cxx/encoding/buffer-stream.hpp>
 
-namespace chronosync {
-namespace bzip2 {
+namespace chronosync::bzip2 {
 
 namespace bio = boost::iostreams;
 
@@ -56,5 +55,4 @@
   return os.buf();
 }
 
-} // namespace bzip2
-} // namespace chronosync
+} // namespace chronosync::bzip2
diff --git a/src/detail/bzip2-helper.hpp b/src/detail/bzip2-helper.hpp
index 47ff5ac..9eb966d 100644
--- a/src/detail/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-2021 University of California, Los Angeles
+ * Copyright (c) 2012-2022 University of California, Los Angeles
  *
  * This file is part of ChronoSync, synchronization library for distributed realtime
  * applications for NDN.
@@ -22,8 +22,7 @@
 
 #include <ndn-cxx/encoding/buffer.hpp>
 
-namespace chronosync {
-namespace bzip2 {
+namespace chronosync::bzip2 {
 
 /**
  * @brief Compress @p buffer of size @p bufferSize with bzip2
@@ -37,7 +36,6 @@
 std::shared_ptr<ndn::Buffer>
 decompress(const char* buffer, size_t bufferSize);
 
-} // namespace bzip2
-} // namespace chronosync
+} // namespace chronosync::bzip2
 
 #endif // CHRONOSYNC_DETAIL_BZIP2_HELPER_HPP
diff --git a/src/detail/common.hpp b/src/detail/common.hpp
index dffd218..cb75626 100644
--- a/src/detail/common.hpp
+++ b/src/detail/common.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2012-2021 University of California, Los Angeles
+ * Copyright (c) 2012-2022 University of California, Los Angeles
  *
  * This file is part of ChronoSync, synchronization library for distributed realtime
  * applications for NDN.
@@ -65,9 +65,7 @@
 using std::size_t;
 
 using std::bind;
-using std::function;
 using std::make_shared;
-using std::ref;
 using std::shared_ptr;
 
 using ndn::Block;
@@ -79,8 +77,9 @@
 using ndn::security::ValidationError;
 
 namespace name = ndn::name;
-namespace time = ndn::time;
 namespace security = ndn::security;
+namespace time = ndn::time;
+using namespace ndn::time_literals;
 
 } // namespace chronosync
 
diff --git a/src/detail/tlv.hpp b/src/detail/tlv.hpp
index 5f9bd31..2a4b9b1 100644
--- a/src/detail/tlv.hpp
+++ b/src/detail/tlv.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2012-2021 University of California, Los Angeles
+ * Copyright (c) 2012-2022 University of California, Los Angeles
  *
  * This file is part of ChronoSync, synchronization library for distributed realtime
  * applications for NDN.
@@ -22,8 +22,7 @@
 #ifndef CHRONOSYNC_DETAIL_TLV_HPP
 #define CHRONOSYNC_DETAIL_TLV_HPP
 
-namespace chronosync {
-namespace tlv {
+namespace chronosync::tlv {
 
 /**
  * @brief Type value of sync reply related TLVs
@@ -35,7 +34,6 @@
   SeqNo       = 130, // 0x82
 };
 
-} // namespace tlv
-} // namespace chronosync
+} // namespace chronosync::tlv
 
 #endif // CHRONOSYNC_DETAIL_TLV_HPP
diff --git a/src/logic.cpp b/src/logic.cpp
index 05defbd..387690d 100644
--- a/src/logic.cpp
+++ b/src/logic.cpp
@@ -37,29 +37,15 @@
 
 namespace chronosync {
 
-const uint8_t EMPTY_DIGEST_VALUE[] = {
+const std::vector<uint8_t> EMPTY_DIGEST{
   0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14,
   0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24,
   0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c,
   0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55
 };
 
-int Logic::s_instanceCounter = 0;
-
-const ndn::Name Logic::DEFAULT_NAME;
-const ndn::Name Logic::EMPTY_NAME;
-const std::shared_ptr<Validator> Logic::DEFAULT_VALIDATOR;
-const time::steady_clock::Duration Logic::DEFAULT_RESET_TIMER = time::seconds(0);
-const time::steady_clock::Duration Logic::DEFAULT_CANCEL_RESET_TIMER = time::milliseconds(500);
-const time::milliseconds Logic::DEFAULT_RESET_INTEREST_LIFETIME(1000);
-const time::milliseconds Logic::DEFAULT_SYNC_INTEREST_LIFETIME(1000);
-const time::milliseconds Logic::DEFAULT_SYNC_REPLY_FRESHNESS(1000);
-const time::milliseconds Logic::DEFAULT_RECOVERY_INTEREST_LIFETIME(1000);
-
-const ConstBufferPtr Logic::EMPTY_DIGEST(new ndn::Buffer(EMPTY_DIGEST_VALUE, 32));
-const ndn::name::Component Logic::RESET_COMPONENT("reset");
-const ndn::name::Component Logic::RECOVERY_COMPONENT("recovery");
-
+const name::Component RESET_COMPONENT("reset");
+const name::Component RECOVERY_COMPONENT("recovery");
 const size_t NDNLP_EXPECTED_OVERHEAD = 20;
 
 /**
@@ -84,7 +70,7 @@
 
   if (getenv("CHRONOSYNC_MAX_PACKET_SIZE") != nullptr) {
     try {
-      limit = ndn::clamp<size_t>(boost::lexical_cast<size_t>(getenv("CHRONOSYNC_MAX_PACKET_SIZE")),
+      limit = std::clamp<size_t>(boost::lexical_cast<size_t>(getenv("CHRONOSYNC_MAX_PACKET_SIZE")),
                                  500, ndn::MAX_NDN_PACKET_SIZE);
     }
     catch (const boost::bad_lexical_cast&) {
@@ -104,8 +90,8 @@
              const UpdateCallback& onUpdate,
              const Name& defaultSigningId,
              std::shared_ptr<Validator> validator,
-             const time::steady_clock::Duration& resetTimer,
-             const time::steady_clock::Duration& cancelResetTimer,
+             const time::steady_clock::duration& resetTimer,
+             const time::steady_clock::duration& cancelResetTimer,
              const time::milliseconds& resetInterestLifetime,
              const time::milliseconds& syncInterestLifetime,
              const time::milliseconds& syncReplyFreshness,
@@ -129,7 +115,7 @@
   , m_syncInterestLifetime(syncInterestLifetime)
   , m_syncReplyFreshness(syncReplyFreshness)
   , m_recoveryInterestLifetime(recoveryInterestLifetime)
-  , m_validator(validator)
+  , m_validator(std::move(validator))
   , m_instanceId(s_instanceCounter++)
 {
   CHRONO_LOG_DBG(">> Logic::Logic");
@@ -275,19 +261,16 @@
       ConstBufferPtr previousRoot = m_state.getRootDigest();
       printDigest(previousRoot);
 
-      bool isInserted = false;
-      bool isUpdated = false;
-      SeqNo oldSeq;
-      std::tie(isInserted, isUpdated, oldSeq) = m_state.update(node.sessionName, node.seqNo);
-
+      auto [isInserted, isUpdated, oldSeq] = m_state.update(node.sessionName, node.seqNo);
       CHRONO_LOG_DBG("Insert: " << std::boolalpha << isInserted);
       CHRONO_LOG_DBG("Updated: " << std::boolalpha << isUpdated);
+      (void)oldSeq; // silence "unused variable" warning with gcc 7
+
       if (isInserted || isUpdated) {
         DiffStatePtr commit = make_shared<DiffState>();
         commit->update(node.sessionName, node.seqNo);
         commit->setRootDigest(m_state.getRootDigest());
         insertToDiffLog(commit, previousRoot);
-
         satisfyPendingSyncInterests(prefix, commit);
       }
     }
@@ -445,7 +428,7 @@
   }
 
   // If the digest of incoming interest is an "empty" digest
-  if (*digest == *EMPTY_DIGEST) {
+  if (*digest == EMPTY_DIGEST) {
     CHRONO_LOG_DBG("Poor guy, he knows nothing");
     sendSyncData(m_defaultUserPrefix, name, m_state);
     return;
@@ -505,10 +488,7 @@
       const Name& info = leaf->getSessionName();
       SeqNo seq = leaf->getSeq();
 
-      bool isInserted = false;
-      bool isUpdated = false;
-      SeqNo oldSeq;
-      std::tie(isInserted, isUpdated, oldSeq) = m_state.update(info, seq);
+      auto [isInserted, isUpdated, oldSeq] = m_state.update(info, seq);
       if (isInserted || isUpdated) {
         commit->update(info, seq);
         oldSeq++;
@@ -610,7 +590,7 @@
 
   Name interestName;
   interestName.append(m_syncPrefix)
-    .append(ndn::name::Component(*m_state.getRootDigest()));
+    .append(name::Component(*m_state.getRootDigest()));
 
   m_pendingSyncInterestName = interestName;
 
@@ -688,7 +668,7 @@
     trimState(partialState, state, nExcludedStates);
     finalizeReply(partialState);
 
-    BOOST_ASSERT(state.getLeaves().size() != 0);
+    BOOST_ASSERT(!state.getLeaves().empty());
     nExcludedStates *= 2;
   }
 
@@ -746,7 +726,7 @@
   Name interestName;
   interestName.append(m_syncPrefix)
               .append(RECOVERY_COMPONENT)
-              .append(ndn::name::Component(*digest));
+              .append(name::Component(*digest));
 
   Interest interest(interestName);
   interest.setMustBeFresh(true);
@@ -771,7 +751,7 @@
   ConstBufferPtr rootDigest = m_state.getRootDigest();
 
   auto stateIter = m_log.find(digest);
-  if (stateIter != m_log.end() || *digest == *EMPTY_DIGEST || *rootDigest == *digest) {
+  if (stateIter != m_log.end() || *digest == EMPTY_DIGEST || *rootDigest == *digest) {
     CHRONO_LOG_DBG("I can help you recover");
     sendSyncData(m_defaultUserPrefix, name, m_state);
     return;
diff --git a/src/logic.hpp b/src/logic.hpp
index 1383ef2..b180ca0 100644
--- a/src/logic.hpp
+++ b/src/logic.hpp
@@ -70,7 +70,7 @@
  * The parameter is a set of MissingDataInfo, of which each corresponds to
  * a session that has changed its state.
  */
-using UpdateCallback = function<void(const std::vector<MissingDataInfo>&)>;
+using UpdateCallback = std::function<void(const std::vector<MissingDataInfo>&)>;
 
 /**
  * @brief Logic of ChronoSync
@@ -84,12 +84,15 @@
     using std::runtime_error::runtime_error;
   };
 
-  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;
-  static const time::milliseconds DEFAULT_SYNC_INTEREST_LIFETIME;
-  static const time::milliseconds DEFAULT_SYNC_REPLY_FRESHNESS;
-  static const time::milliseconds DEFAULT_RECOVERY_INTEREST_LIFETIME;
+  static inline const Name EMPTY_NAME;
+  static inline const Name DEFAULT_NAME;
+  static inline const std::shared_ptr<Validator> DEFAULT_VALIDATOR;
+  static constexpr time::steady_clock::duration DEFAULT_RESET_TIMER = 0_ms;
+  static constexpr time::steady_clock::duration DEFAULT_CANCEL_RESET_TIMER = 500_ms;
+  static constexpr time::milliseconds DEFAULT_RESET_INTEREST_LIFETIME = 1_s;
+  static constexpr time::milliseconds DEFAULT_SYNC_INTEREST_LIFETIME = 1_s;
+  static constexpr time::milliseconds DEFAULT_SYNC_REPLY_FRESHNESS = 1_s;
+  static constexpr time::milliseconds DEFAULT_RECOVERY_INTEREST_LIFETIME = 1_s;
 
   /**
    * @brief Constructor
@@ -114,8 +117,8 @@
         const UpdateCallback& onUpdate,
         const Name& defaultSigningId = DEFAULT_NAME,
         std::shared_ptr<Validator> validator = DEFAULT_VALIDATOR,
-        const time::steady_clock::Duration& resetTimer = DEFAULT_RESET_TIMER,
-        const time::steady_clock::Duration& cancelResetTimer = DEFAULT_CANCEL_RESET_TIMER,
+        const time::steady_clock::duration& resetTimer = DEFAULT_RESET_TIMER,
+        const time::steady_clock::duration& cancelResetTimer = DEFAULT_CANCEL_RESET_TIMER,
         const time::milliseconds& resetInterestLifetime = DEFAULT_RESET_INTEREST_LIFETIME,
         const time::milliseconds& syncInterestLifetime = DEFAULT_SYNC_INTEREST_LIFETIME,
         const time::milliseconds& syncReplyFreshness = DEFAULT_SYNC_REPLY_FRESHNESS,
@@ -442,17 +445,8 @@
   void
   onRecoveryTimeout(const Interest& interest);
 
-public:
-  static const ndn::Name DEFAULT_NAME;
-  static const ndn::Name EMPTY_NAME;
-  static const std::shared_ptr<Validator> DEFAULT_VALIDATOR;
-
 private:
-  using NodeList = std::unordered_map<ndn::Name, NodeInfo>;
-
-  static const ConstBufferPtr EMPTY_DIGEST;
-  static const ndn::name::Component RESET_COMPONENT;
-  static const ndn::name::Component RECOVERY_COMPONENT;
+  using NodeList = std::unordered_map<Name, NodeInfo>;
 
   // Communication
   ndn::Face& m_face;
@@ -487,9 +481,9 @@
   std::uniform_int_distribution<> m_rangeUniformRandom;
   std::uniform_int_distribution<> m_reexpressionJitter;
   /// @brief Timer to send next reset 0 for no reset
-  time::steady_clock::Duration m_resetTimer;
+  time::steady_clock::duration m_resetTimer;
   /// @brief Timer to cancel reset state
-  time::steady_clock::Duration m_cancelResetTimer;
+  time::steady_clock::duration m_cancelResetTimer;
   /// @brief Lifetime of reset interest
   time::milliseconds m_resetInterestLifetime;
   /// @brief Lifetime of sync interest
@@ -503,8 +497,8 @@
   ndn::KeyChain m_keyChain;
   std::shared_ptr<Validator> m_validator;
 
-  int m_instanceId;
-  static int s_instanceCounter;
+  const int m_instanceId;
+  static inline int s_instanceCounter = 0;
 };
 
 #ifdef CHRONOSYNC_WITH_TESTS
diff --git a/src/socket.cpp b/src/socket.cpp
index e2c8b66..820b0a0 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -30,10 +30,6 @@
 
 namespace chronosync {
 
-const ndn::Name Socket::DEFAULT_NAME;
-const ndn::Name Socket::DEFAULT_PREFIX;
-const std::shared_ptr<Validator> Socket::DEFAULT_VALIDATOR;
-
 Socket::Socket(const Name& syncPrefix,
                const Name& userPrefix,
                ndn::Face& face,
@@ -49,14 +45,16 @@
             syncInterestLifetime, Logic::DEFAULT_SYNC_REPLY_FRESHNESS, Logic::DEFAULT_RECOVERY_INTEREST_LIFETIME,
             session)
   , m_signingId(signingId)
-  , m_validator(validator)
+  , m_validator(std::move(validator))
 {
   NDN_LOG_DEBUG(">> Socket::Socket");
+
   if (m_userPrefix != DEFAULT_NAME)
     m_registeredPrefixList[m_userPrefix] =
       m_face.setInterestFilter(m_userPrefix,
                                [this] (auto&&... args) { onInterest(std::forward<decltype(args)>(args)...); },
                                [] (auto&&...) {});
+
   NDN_LOG_DEBUG("<< Socket::Socket");
 }
 
diff --git a/src/socket.hpp b/src/socket.hpp
index e7fb4ef..78e67d2 100644
--- a/src/socket.hpp
+++ b/src/socket.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-2022 University of California, Los Angeles
  *
  * This file is part of ChronoSync, synchronization library for distributed realtime
  * applications for NDN.
@@ -52,11 +52,7 @@
   class Error : public std::runtime_error
   {
   public:
-    explicit
-    Error(const std::string& what)
-      : std::runtime_error(what)
-    {
-    }
+    using std::runtime_error::runtime_error;
   };
 
   Socket(const Name& syncPrefix,
@@ -70,9 +66,8 @@
 
   ~Socket();
 
-  using DataValidatedCallback = function<void(const Data&)>;
-
-  using DataValidationErrorCallback = function<void(const Data&, const ValidationError& error)> ;
+  using DataValidatedCallback = std::function<void(const Data&)>;
+  using DataValidationErrorCallback = std::function<void(const Data&, const ValidationError& error)> ;
 
   /**
    * @brief Add a sync node under same logic
@@ -232,12 +227,12 @@
                          const ValidationError& error);
 
 public:
-  static const ndn::Name DEFAULT_NAME;
-  static const ndn::Name DEFAULT_PREFIX;
-  static const std::shared_ptr<Validator> DEFAULT_VALIDATOR;
+  static inline const Name DEFAULT_NAME;
+  static inline const Name DEFAULT_PREFIX;
+  static inline const std::shared_ptr<Validator> DEFAULT_VALIDATOR;
 
 private:
-  using RegisteredPrefixList = std::unordered_map<ndn::Name, ndn::RegisteredPrefixHandle>;
+  using RegisteredPrefixList = std::unordered_map<Name, ndn::RegisteredPrefixHandle>;
 
   Name m_userPrefix;
   ndn::Face& m_face;
diff --git a/src/state.cpp b/src/state.cpp
index 00df7b9..260d493 100644
--- a/src/state.cpp
+++ b/src/state.cpp
@@ -40,16 +40,16 @@
   auto leaf = m_leaves.find(info);
   if (leaf == m_leaves.end()) {
     m_leaves.insert(make_shared<Leaf>(info, seq));
-    return std::make_tuple(true, false, 0);
+    return {true, false, 0};
   }
   else {
     if ((*leaf)->getSeq() == seq || seq < (*leaf)->getSeq()) {
-      return std::make_tuple(false, false, 0);
+      return {false, false, 0};
     }
 
     SeqNo old = (*leaf)->getSeq();
     m_leaves.modify(leaf, [seq] (LeafPtr& leaf) { leaf->setSeq(seq); } );
-    return std::make_tuple(false, true, old);
+    return {false, true, old};
   }
 }
 
@@ -128,7 +128,7 @@
     NDN_THROW(Error("The supplied block does not contain wire format"));
 
   if (wire.type() != tlv::SyncReply)
-    NDN_THROW(Error("Unexpected TLV type when decoding SyncReply: " + ndn::to_string(wire.type())));
+    NDN_THROW(Error("Unexpected TLV type when decoding SyncReply: " + std::to_string(wire.type())));
 
   wire.parse();
   m_wire = wire;
diff --git a/tests/identity-management-fixture.cpp b/tests/identity-management-fixture.cpp
index 007b35b..f545710 100644
--- a/tests/identity-management-fixture.cpp
+++ b/tests/identity-management-fixture.cpp
@@ -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-2022 University of California, Los Angeles
  *
  * This file is part of ChronoSync, synchronization library for distributed realtime
  * applications for NDN.
@@ -22,8 +22,7 @@
 #include <ndn-cxx/util/io.hpp>
 #include <boost/filesystem.hpp>
 
-namespace ndn {
-namespace tests {
+namespace ndn::tests {
 
 IdentityManagementFixture::IdentityManagementFixture()
   : m_keyChain("pib-memory:", "tpm-memory:")
@@ -75,5 +74,4 @@
   }
 }
 
-} // namespace tests
-} // namespace ndn
+} // namespace ndn::tests
diff --git a/tests/identity-management-fixture.hpp b/tests/identity-management-fixture.hpp
index 7bb39f8..6b81859 100644
--- a/tests/identity-management-fixture.hpp
+++ b/tests/identity-management-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2012-2021 University of California, Los Angeles
+ * Copyright (c) 2012-2022 University of California, Los Angeles
  *
  * This file is part of ChronoSync, synchronization library for distributed realtime
  * applications for NDN.
@@ -17,15 +17,14 @@
  * ChronoSync, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NDN_TESTS_IDENTITY_MANAGEMENT_FIXTURE_HPP
-#define NDN_TESTS_IDENTITY_MANAGEMENT_FIXTURE_HPP
+#ifndef CHRONOSYNC_TESTS_IDENTITY_MANAGEMENT_FIXTURE_HPP
+#define CHRONOSYNC_TESTS_IDENTITY_MANAGEMENT_FIXTURE_HPP
 
 #include "detail/common.hpp"
 
 #include "unit-test-time-fixture.hpp"
 
-namespace ndn {
-namespace tests {
+namespace ndn::tests {
 
 /** \brief a fixture that cleans up KeyChain identities and certificate files upon destruction
  */
@@ -69,7 +68,6 @@
 {
 };
 
-} // namespace tests
-} // namespace ndn
+} // namespace ndn::tests
 
-#endif // NDN_TESTS_IDENTITY_MANAGEMENT_FIXTURE_HPP
+#endif // CHRONOSYNC_TESTS_IDENTITY_MANAGEMENT_FIXTURE_HPP
diff --git a/tests/unit-test-time-fixture.hpp b/tests/unit-test-time-fixture.hpp
index f172cff..a8b46f7 100644
--- a/tests/unit-test-time-fixture.hpp
+++ b/tests/unit-test-time-fixture.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-2022 University of California, Los Angeles
  *
  * This file is part of ChronoSync, synchronization library for distributed realtime
  * applications for NDN.
@@ -17,15 +17,14 @@
  * ChronoSync, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NDN_TESTS_UNIT_TESTS_UNIT_TEST_TIME_FIXTURE_HPP
-#define NDN_TESTS_UNIT_TESTS_UNIT_TEST_TIME_FIXTURE_HPP
+#ifndef CHRONOSYNC_TESTS_UNIT_TEST_TIME_FIXTURE_HPP
+#define CHRONOSYNC_TESTS_UNIT_TEST_TIME_FIXTURE_HPP
 
 #include <ndn-cxx/util/time-unit-test-clock.hpp>
 
 #include <boost/asio.hpp>
 
-namespace ndn {
-namespace tests {
+namespace ndn::tests {
 
 class UnitTestTimeFixture
 {
@@ -61,7 +60,6 @@
   boost::asio::io_service io;
 };
 
-} // namespace tests
-} // namespace ndn
+} // namespace ndn::tests
 
-#endif // NDN_TESTS_UNIT_TESTS_UNIT_TEST_TIME_FIXTURE_HPP
+#endif // CHRONOSYNC_TESTS_UNIT_TEST_TIME_FIXTURE_HPP
diff --git a/tests/unit-tests/test-logic.cpp b/tests/unit-tests/test-logic.cpp
index 8459158..d883fe7 100644
--- a/tests/unit-tests/test-logic.cpp
+++ b/tests/unit-tests/test-logic.cpp
@@ -432,12 +432,12 @@
   {
     unsetenv("CHRONOSYNC_MAX_PACKET_SIZE");
     if (oldSize) {
-      setenv("CHRONOSYNC_MAX_PACKET_SIZE", oldSize->c_str(), 1);
+      setenv("CHRONOSYNC_MAX_PACKET_SIZE", oldSize->data(), 1);
     }
   }
 
 private:
-  ndn::optional<std::string> oldSize;
+  std::optional<std::string> oldSize;
 };
 
 BOOST_FIXTURE_TEST_CASE(MaxPacketCustomization, MaxPacketCustomizationFixture)
@@ -447,7 +447,7 @@
   setenv("CHRONOSYNC_MAX_PACKET_SIZE", "1500", 1);
   BOOST_CHECK_EQUAL(getMaxPacketLimit(), 1500);
 
-  setenv("CHRONOSYNC_MAX_PACKET_SIZE", ndn::to_string(ndn::MAX_NDN_PACKET_SIZE * 100).c_str(), 1);
+  setenv("CHRONOSYNC_MAX_PACKET_SIZE", std::to_string(ndn::MAX_NDN_PACKET_SIZE * 100).data(), 1);
   BOOST_CHECK_EQUAL(getMaxPacketLimit(), ndn::MAX_NDN_PACKET_SIZE);
 
   setenv("CHRONOSYNC_MAX_PACKET_SIZE", "1", 1);
diff --git a/tests/unit-tests/test-multiple-user.cpp b/tests/unit-tests/test-multiple-user.cpp
index db8ffcf..b8a5dbd 100644
--- a/tests/unit-tests/test-multiple-user.cpp
+++ b/tests/unit-tests/test-multiple-user.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-2022 University of California, Los Angeles
  *
  * This file is part of ChronoSync, synchronization library for distributed realtime
  * applications for NDN.
@@ -27,18 +27,8 @@
 class Handler
 {
 public:
-  Handler(ndn::Face& face,
-          const Name& syncPrefix,
-          const Name& userPrefix)
-    : logic(face,
-            syncPrefix,
-            userPrefix,
-            bind(&Handler::onUpdate, this, _1))
-  {
-  }
-
-  void
-  onUpdate(const std::vector<MissingDataInfo>& v)
+  Handler(ndn::Face& face, const Name& syncPrefix, const Name& userPrefix)
+    : logic(face, syncPrefix, userPrefix, [] (auto&&...) {})
   {
   }
 
@@ -76,7 +66,7 @@
     userPrefix[1] = Name("/user1");
     userPrefix[2] = Name("/user2");
 
-    face = make_shared<ndn::Face>(ref(io));
+    face = std::make_shared<ndn::Face>(io);
   }
 
   Name syncPrefix;
@@ -92,7 +82,7 @@
 
 BOOST_AUTO_TEST_CASE(ThreeUserNode)
 {
-  handler = make_shared<Handler>(ref(*face), syncPrefix, userPrefix[0]);
+  handler = std::make_shared<Handler>(*face, syncPrefix, userPrefix[0]);
   handler->addUserNode(userPrefix[1]);
   handler->addUserNode(userPrefix[2]);
   handler->removeUserNode(userPrefix[0]);
diff --git a/tests/unit-tests/test-socket.cpp b/tests/unit-tests/test-socket.cpp
index 3b16939..67f1c3e 100644
--- a/tests/unit-tests/test-socket.cpp
+++ b/tests/unit-tests/test-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-2022 University of California, Los Angeles
  *
  * This file is part of ChronoSync, synchronization library for distributed realtime
  * applications for NDN.
@@ -48,7 +48,7 @@
              userPrefix,
              face,
              isNum ? bind(&SocketTestApp::fetchNumbers, this, _1) :
-                          bind(&SocketTestApp::fetchAll, this, _1),
+                     bind(&SocketTestApp::fetchAll, this, _1),
              Logic::DEFAULT_NAME,
              Logic::DEFAULT_VALIDATOR,
              Logic::DEFAULT_SYNC_INTEREST_LIFETIME,
@@ -63,14 +63,14 @@
     Name dataName(dataPacket.getName());
     string str2(reinterpret_cast<const char*>(dataPacket.getContent().value()),
                 dataPacket.getContent().value_size());
-    data.insert(make_pair(dataName, str2));
+    data.emplace(dataName, str2);
   }
 
   void
   set(Name name, const char* buf, int len)
   {
     string str2(buf, len);
-    data.insert(make_pair(name, str2));
+    data.emplace(name, str2);
   }
 
   void
@@ -139,7 +139,7 @@
   }
 
 public:
-  std::map<ndn::Name, string> data;
+  std::map<Name, string> data;
   uint32_t sum;
   Socket socket;
 };
@@ -194,7 +194,7 @@
   void
   createSocket(size_t idx, bool isNum)
   {
-    app[idx] = make_shared<SocketTestApp>(syncPrefix, userPrefix[idx], ref(*faces[idx]), isNum);
+    app[idx] = make_shared<SocketTestApp>(syncPrefix, userPrefix[idx], std::ref(*faces[idx]), isNum);
     sessionName[idx] = app[idx]->socket.getLogic().getSessionName();
   }
 
