diff --git a/tools/ndn-autoconfig-server/program.cpp b/tools/ndn-autoconfig-server/program.cpp
index d0be0d1..21e7857 100644
--- a/tools/ndn-autoconfig-server/program.cpp
+++ b/tools/ndn-autoconfig-server/program.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-2021,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -67,7 +67,9 @@
         m_face.put(*data);
       }
     },
-    bind(&Program::handlePrefixRegistrationFailure, this, _1, _2));
+    [this] (auto&&... args) {
+      handlePrefixRegistrationFailure(std::forward<decltype(args)>(args)...);
+    });
 }
 
 void
@@ -84,8 +86,10 @@
   m_dispatcher.addTopPrefix(ROUTABLE_PREFIXES_DATA_PREFIX, false);
 
   m_face.registerPrefix(Name(ROUTABLE_PREFIXES_DATA_PREFIX).append(ROUTABLE_PREFIXES_DATA_SUFFIX),
-                        nullptr,
-                        bind(&Program::handlePrefixRegistrationFailure, this, _1, _2));
+    nullptr,
+    [this] (auto&&... args) {
+      handlePrefixRegistrationFailure(std::forward<decltype(args)>(args)...);
+    });
 }
 
 void
diff --git a/tools/ndn-autoconfig/multicast-discovery.cpp b/tools/ndn-autoconfig/multicast-discovery.cpp
index 200ae75..0a76b22 100644
--- a/tools/ndn-autoconfig/multicast-discovery.cpp
+++ b/tools/ndn-autoconfig/multicast-discovery.cpp
@@ -34,7 +34,6 @@
 namespace autoconfig {
 
 using nfd::ControlParameters;
-using nfd::ControlResponse;
 
 const Name HUB_DISCOVERY_PREFIX("/localhop/ndn-autoconf/hub");
 const uint64_t HUB_DISCOVERY_ROUTE_COST(1);
@@ -55,9 +54,9 @@
 
   m_controller.fetch<nfd::FaceQueryDataset>(
     filter,
-    bind(&MulticastDiscovery::registerHubDiscoveryPrefix, this, _1),
+    [this] (const auto& dataset) { registerHubDiscoveryPrefix(dataset); },
     [this] (uint32_t code, const std::string& reason) {
-      this->fail("Error " + to_string(code) + " when querying multi-access faces: " + reason);
+      fail("Error " + to_string(code) + " when querying multi-access faces: " + reason);
     });
 }
 
@@ -65,7 +64,7 @@
 MulticastDiscovery::registerHubDiscoveryPrefix(const std::vector<nfd::FaceStatus>& dataset)
 {
   if (dataset.empty()) {
-    this->fail("No multi-access faces available");
+    fail("No multi-access faces available");
     return;
   }
 
@@ -82,11 +81,11 @@
 
     m_controller.start<nfd::RibRegisterCommand>(
       parameters,
-      [this] (const ControlParameters&) {
+      [this] (const auto&) {
         ++m_nRegSuccess;
         afterReg();
       },
-      [this, faceStatus] (const ControlResponse& resp) {
+      [this, faceStatus] (const auto& resp) {
         std::cerr << "Error " << resp.getCode() << " when registering hub discovery prefix "
                   << "for face " << faceStatus.getFaceId() << " (" << faceStatus.getRemoteUri()
                   << "): " << resp.getText() << std::endl;
@@ -103,10 +102,10 @@
     return; // continue waiting
   }
   if (m_nRegSuccess > 0) {
-    this->setStrategy();
+    setStrategy();
   }
   else {
-    this->fail("Cannot register hub discovery prefix for any face");
+    fail("Cannot register hub discovery prefix for any face");
   }
 }
 
@@ -119,10 +118,9 @@
 
   m_controller.start<nfd::StrategyChoiceSetCommand>(
     parameters,
-    bind(&MulticastDiscovery::requestHubData, this),
-    [this] (const ControlResponse& resp) {
-      this->fail("Error " + to_string(resp.getCode()) + " when setting multicast strategy: " +
-                 resp.getText());
+    [this] (const auto&) { requestHubData(); },
+    [this] (const auto& resp) {
+      fail("Error " + to_string(resp.getCode()) + " when setting multicast strategy: " + resp.getText());
     });
 }
 
@@ -141,17 +139,17 @@
 
       auto i = content.find(tlv::nfd::Uri);
       if (i == content.elements_end()) {
-        this->fail("Malformed hub Data: missing Uri element");
+        fail("Malformed hub Data: missing Uri element");
         return;
       }
 
-      this->provideHubFaceUri(std::string(reinterpret_cast<const char*>(i->value()), i->value_size()));
+      provideHubFaceUri(std::string(reinterpret_cast<const char*>(i->value()), i->value_size()));
     },
     [this] (const Interest&, const lp::Nack& nack) {
-      this->fail("Nack-" + boost::lexical_cast<std::string>(nack.getReason()) + " when retrieving hub Data");
+      fail("Nack-" + boost::lexical_cast<std::string>(nack.getReason()) + " when retrieving hub Data");
     },
     [this] (const Interest&) {
-      this->fail("Timeout when retrieving hub Data");
+      fail("Timeout when retrieving hub Data");
     });
 }
 
diff --git a/tools/ndn-autoconfig/procedure.cpp b/tools/ndn-autoconfig/procedure.cpp
index dded94b..b0896ec 100644
--- a/tools/ndn-autoconfig/procedure.cpp
+++ b/tools/ndn-autoconfig/procedure.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-2021,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -52,16 +52,16 @@
 Procedure::initialize(const Options& options)
 {
   BOOST_ASSERT(m_stages.empty());
-  this->makeStages(options);
+  makeStages(options);
   BOOST_ASSERT(!m_stages.empty());
 
   for (size_t i = 0; i < m_stages.size(); ++i) {
-    m_stages[i]->onSuccess.connect(bind(&Procedure::connect, this, _1));
+    m_stages[i]->onSuccess.connect([this] (const auto& uri) { connect(uri); });
     if (i + 1 < m_stages.size()) {
-      m_stages[i]->onFailure.connect([=] (const std::string&) { m_stages[i + 1]->start(); });
+      m_stages[i]->onFailure.connect([=] (const auto&) { m_stages[i + 1]->start(); });
     }
     else {
-      m_stages[i]->onFailure.connect([=] (const std::string&) { this->onComplete(false); });
+      m_stages[i]->onFailure.connect([=] (const auto&) { onComplete(false); });
     }
   }
 }
diff --git a/tools/nfd-autoreg.cpp b/tools/nfd-autoreg.cpp
index fed9cfb..3745cb0 100644
--- a/tools/nfd-autoreg.cpp
+++ b/tools/nfd-autoreg.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-2021,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -90,7 +90,7 @@
   isBlacklisted(const boost::asio::ip::address& address) const
   {
     return std::any_of(m_blackList.begin(), m_blackList.end(),
-                       bind(&Network::doesContain, _1, address));
+                       std::bind(&Network::doesContain, _1, address));
   }
 
   /**
@@ -100,7 +100,7 @@
   isWhitelisted(const boost::asio::ip::address& address) const
   {
     return std::any_of(m_whiteList.begin(), m_whiteList.end(),
-                       bind(&Network::doesContain, _1, address));
+                       std::bind(&Network::doesContain, _1, address));
   }
 
   void
@@ -114,8 +114,8 @@
           .setOrigin(nfd::ROUTE_ORIGIN_AUTOREG)
           .setCost(m_cost)
           .setExpirationPeriod(time::milliseconds::max()),
-        bind(&AutoregServer::onRegisterCommandSuccess, this, faceId, prefix),
-        bind(&AutoregServer::onRegisterCommandFailure, this, faceId, prefix, _1));
+        std::bind(&AutoregServer::onRegisterCommandSuccess, this, faceId, prefix),
+        std::bind(&AutoregServer::onRegisterCommandFailure, this, faceId, prefix, _1));
     }
   }
 
@@ -154,12 +154,6 @@
     }
   }
 
-  void
-  signalHandler()
-  {
-    m_face.shutdown();
-  }
-
   static void
   usage(std::ostream& os,
         const boost::program_options::options_description& desc,
@@ -194,11 +188,11 @@
       std::cout << "  " << network << std::endl;
     }
 
-    m_faceMonitor.onNotification.connect(bind(&AutoregServer::onNotification, this, _1));
+    m_faceMonitor.onNotification.connect(std::bind(&AutoregServer::onNotification, this, _1));
     m_faceMonitor.start();
 
     boost::asio::signal_set signalSet(m_face.getIoService(), SIGINT, SIGTERM);
-    signalSet.async_wait(bind(&AutoregServer::signalHandler, this));
+    signalSet.async_wait([this] (auto&&...) { m_face.shutdown(); });
 
     m_face.processEvents();
   }
@@ -207,13 +201,13 @@
   startFetchingFaceStatusDataset()
   {
     m_controller.fetch<nfd::FaceDataset>(
-      [this] (const std::vector<nfd::FaceStatus>& faces) {
+      [this] (const auto& faces) {
         for (const auto& faceStatus : faces) {
           registerPrefixesIfNeeded(faceStatus.getFaceId(), FaceUri(faceStatus.getRemoteUri()),
                                    faceStatus.getFacePersistency());
         }
       },
-      [] (uint32_t code, const std::string& reason) {});
+      [] (auto&&...) {});
   }
 
   int
diff --git a/tools/nfdc/command-arguments.hpp b/tools/nfdc/command-arguments.hpp
index 164a672..1d0c9bd 100644
--- a/tools/nfdc/command-arguments.hpp
+++ b/tools/nfdc/command-arguments.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-2021,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -30,6 +30,7 @@
 #include "status-report.hpp"
 
 #include <ndn-cxx/encoding/nfd-constants.hpp>
+#include <ndn-cxx/util/any.hpp>
 
 #include <boost/logic/tribool.hpp>
 
diff --git a/tools/nfdc/face-module.cpp b/tools/nfdc/face-module.cpp
index e46279d2..18862aa 100644
--- a/tools/nfdc/face-module.cpp
+++ b/tools/nfdc/face-module.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-2021,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -236,7 +236,7 @@
     if (isChangingParams) {
       ctx.controller.start<ndn::nfd::FaceUpdateCommand>(
         params,
-        bind(updateFace, respParams, _1),
+        [=, &updateFace] (const auto& cp) { updateFace(respParams, cp); },
         ctx.makeCommandFailureHandler("updating face"),
         ctx.makeCommandOptions());
     }
diff --git a/tools/nfdc/format-helpers.cpp b/tools/nfdc/format-helpers.cpp
index fa72512..a207bf8 100644
--- a/tools/nfdc/format-helpers.cpp
+++ b/tools/nfdc/format-helpers.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-2021,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -110,9 +110,9 @@
 }
 
 std::string
-formatTimestamp(time::system_clock::TimePoint t)
+formatTimestamp(time::system_clock::time_point t)
 {
-  return time::toString(t, "%Y-%m-%dT%H:%M:%S%F");
+  return time::toIsoExtendedString(t);
 }
 
 } // namespace xml
@@ -199,7 +199,7 @@
 }
 
 std::string
-formatTimestamp(time::system_clock::TimePoint t)
+formatTimestamp(time::system_clock::time_point t)
 {
   return time::toIsoString(t);
 }
diff --git a/tools/nfdc/format-helpers.hpp b/tools/nfdc/format-helpers.hpp
index 1ee88ee..95f3310 100644
--- a/tools/nfdc/format-helpers.hpp
+++ b/tools/nfdc/format-helpers.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-2021,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -73,7 +73,7 @@
  *  Definition of this format: https://www.w3.org/TR/xmlschema11-2/#dateTime
  */
 std::string
-formatTimestamp(time::system_clock::TimePoint t);
+formatTimestamp(time::system_clock::time_point t);
 
 } // namespace xml
 
@@ -262,7 +262,7 @@
 }
 
 std::string
-formatTimestamp(time::system_clock::TimePoint t);
+formatTimestamp(time::system_clock::time_point t);
 
 } // namespace text
 
diff --git a/tools/nfdc/forwarder-general-module.cpp b/tools/nfdc/forwarder-general-module.cpp
index 417b346..1542b9f 100644
--- a/tools/nfdc/forwarder-general-module.cpp
+++ b/tools/nfdc/forwarder-general-module.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-2021,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -46,7 +46,7 @@
     onFailure, options);
 }
 
-static time::system_clock::Duration
+static auto
 calculateUptime(const ForwarderStatus& status)
 {
   return status.getCurrentTimestamp() - status.getStartTimestamp();
diff --git a/tools/nfdc/status.cpp b/tools/nfdc/status.cpp
index 441c3a9..a338b1d 100644
--- a/tools/nfdc/status.cpp
+++ b/tools/nfdc/status.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-2021,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -128,25 +128,29 @@
   CommandDefinition defStatusShow("status", "show");
   defStatusShow
     .setTitle("print general status");
-  parser.addCommand(defStatusShow, bind(&reportStatusSingleSection, _1, &StatusReportOptions::wantForwarderGeneral));
+  parser.addCommand(defStatusShow,
+                    std::bind(&reportStatusSingleSection, _1, &StatusReportOptions::wantForwarderGeneral));
   parser.addAlias("status", "show", "");
 
   CommandDefinition defChannelList("channel", "list");
   defChannelList
     .setTitle("print channel list");
-  parser.addCommand(defChannelList, bind(&reportStatusSingleSection, _1, &StatusReportOptions::wantChannels));
+  parser.addCommand(defChannelList,
+                    std::bind(&reportStatusSingleSection, _1, &StatusReportOptions::wantChannels));
   parser.addAlias("channel", "list", "");
 
   CommandDefinition defFibList("fib", "list");
   defFibList
     .setTitle("print FIB entries");
-  parser.addCommand(defFibList, bind(&reportStatusSingleSection, _1, &StatusReportOptions::wantFib));
+  parser.addCommand(defFibList,
+                    std::bind(&reportStatusSingleSection, _1, &StatusReportOptions::wantFib));
   parser.addAlias("fib", "list", "");
 
   CommandDefinition defCsInfo("cs", "info");
   defCsInfo
     .setTitle("print CS information");
-  parser.addCommand(defCsInfo, bind(&reportStatusSingleSection, _1, &StatusReportOptions::wantCs));
+  parser.addCommand(defCsInfo,
+                    std::bind(&reportStatusSingleSection, _1, &StatusReportOptions::wantCs));
   parser.addAlias("cs", "info", "");
 }
 
