diff --git a/daemon/face/channel.hpp b/daemon/face/channel.hpp
index 5b870fe..db97cc8 100644
--- a/daemon/face/channel.hpp
+++ b/daemon/face/channel.hpp
@@ -84,25 +84,14 @@
  *  Parameters are passed as a struct rather than individually, so that a future change in the list
  *  of parameters does not require an update to the method signature in all subclasses.
  */
-class FaceParams
+struct FaceParams
 {
-public:
-  // get rid of this constructor and use aggregate init + NSDMIs when we switch to C++14
-  FaceParams() noexcept
-    : persistency(ndn::nfd::FACE_PERSISTENCY_PERSISTENT)
-    , wantLocalFields(false)
-    , wantLpReliability(false)
-    , wantCongestionMarking(boost::logic::indeterminate)
-  {
-  }
-
-public:
-  ndn::nfd::FacePersistency persistency;
+  ndn::nfd::FacePersistency persistency = ndn::nfd::FACE_PERSISTENCY_PERSISTENT;
   optional<time::nanoseconds> baseCongestionMarkingInterval;
   optional<uint64_t> defaultCongestionThreshold;
-  bool wantLocalFields;
-  bool wantLpReliability;
-  boost::logic::tribool wantCongestionMarking;
+  bool wantLocalFields = false;
+  bool wantLpReliability = false;
+  boost::logic::tribool wantCongestionMarking = boost::logic::indeterminate;
 };
 
 /** \brief invokes a callback when the face is closed
diff --git a/daemon/face/datagram-transport.hpp b/daemon/face/datagram-transport.hpp
index 0b375ad..669b46e 100644
--- a/daemon/face/datagram-transport.hpp
+++ b/daemon/face/datagram-transport.hpp
@@ -72,12 +72,10 @@
   doSend(Transport::Packet&& packet) override;
 
   void
-  handleSend(const boost::system::error_code& error,
-             size_t nBytesSent, const Block& payload);
+  handleSend(const boost::system::error_code& error, size_t nBytesSent);
 
   void
-  handleReceive(const boost::system::error_code& error,
-                size_t nBytesReceived);
+  handleReceive(const boost::system::error_code& error, size_t nBytesReceived);
 
   void
   processErrorCode(const boost::system::error_code& error);
@@ -120,9 +118,9 @@
   }
 
   m_socket.async_receive_from(boost::asio::buffer(m_receiveBuffer), m_sender,
-                              bind(&DatagramTransport<T, U>::handleReceive, this,
-                                   boost::asio::placeholders::error,
-                                   boost::asio::placeholders::bytes_transferred));
+                              [this] (auto&&... args) {
+                                this->handleReceive(std::forward<decltype(args)>(args)...);
+                              });
 }
 
 template<class T, class U>
@@ -164,10 +162,10 @@
   NFD_LOG_FACE_TRACE(__func__);
 
   m_socket.async_send(boost::asio::buffer(packet.packet),
-                      bind(&DatagramTransport<T, U>::handleSend, this,
-                           boost::asio::placeholders::error,
-                           boost::asio::placeholders::bytes_transferred,
-                           packet.packet));
+                      // packet.packet is copied into the lambda to retain the underlying Buffer
+                      [this, p = packet.packet] (auto&&... args) {
+                        this->handleSend(std::forward<decltype(args)>(args)...);
+                      });
 }
 
 template<class T, class U>
@@ -202,23 +200,20 @@
 
 template<class T, class U>
 void
-DatagramTransport<T, U>::handleReceive(const boost::system::error_code& error,
-                                       size_t nBytesReceived)
+DatagramTransport<T, U>::handleReceive(const boost::system::error_code& error, size_t nBytesReceived)
 {
   receiveDatagram(m_receiveBuffer.data(), nBytesReceived, error);
 
   if (m_socket.is_open())
     m_socket.async_receive_from(boost::asio::buffer(m_receiveBuffer), m_sender,
-                                bind(&DatagramTransport<T, U>::handleReceive, this,
-                                     boost::asio::placeholders::error,
-                                     boost::asio::placeholders::bytes_transferred));
+                                [this] (auto&&... args) {
+                                  this->handleReceive(std::forward<decltype(args)>(args)...);
+                                });
 }
 
 template<class T, class U>
 void
-DatagramTransport<T, U>::handleSend(const boost::system::error_code& error,
-                                    size_t nBytesSent, const Block& payload)
-// 'payload' is unused; it's needed to retain the underlying Buffer
+DatagramTransport<T, U>::handleSend(const boost::system::error_code& error, size_t nBytesSent)
 {
   if (error)
     return processErrorCode(error);
@@ -266,7 +261,7 @@
 
 template<class T, class U>
 Transport::EndpointId
-DatagramTransport<T, U>::makeEndpointId(const typename protocol::endpoint& ep)
+DatagramTransport<T, U>::makeEndpointId(const typename protocol::endpoint&)
 {
   return 0;
 }
diff --git a/daemon/face/ethernet-channel.cpp b/daemon/face/ethernet-channel.cpp
index 3791d44..69c6f45 100644
--- a/daemon/face/ethernet-channel.cpp
+++ b/daemon/face/ethernet-channel.cpp
@@ -65,7 +65,7 @@
   catch (const boost::system::system_error& e) {
     NFD_LOG_CHAN_DEBUG("Face creation for " << remoteEndpoint << " failed: " << e.what());
     if (onConnectFailed)
-      onConnectFailed(504, std::string("Face creation failed: ") + e.what());
+      onConnectFailed(504, "Face creation failed: "s + e.what());
     return;
   }
 
@@ -102,9 +102,7 @@
                            const FaceCreationFailedCallback& onReceiveFailed)
 {
   m_socket.async_read_some(boost::asio::null_buffers(),
-                           bind(&EthernetChannel::handleRead, this,
-                                boost::asio::placeholders::error,
-                                onFaceCreated, onReceiveFailed));
+                           [=] (const auto& e, auto) { this->handleRead(e, onFaceCreated, onReceiveFailed); });
 }
 
 void
@@ -172,7 +170,7 @@
   catch (const EthernetTransport::Error& e) {
     NFD_LOG_CHAN_DEBUG("Face creation for " << sender << " failed: " << e.what());
     if (onReceiveFailed)
-      onReceiveFailed(504, std::string("Face creation failed: ") + e.what());
+      onReceiveFailed(504, "Face creation failed: "s + e.what());
     return;
   }
 
diff --git a/daemon/face/ethernet-factory.cpp b/daemon/face/ethernet-factory.cpp
index d921855..f9767df 100644
--- a/daemon/face/ethernet-factory.cpp
+++ b/daemon/face/ethernet-factory.cpp
@@ -46,11 +46,10 @@
 EthernetFactory::EthernetFactory(const CtorParams& params)
   : ProtocolFactory(params)
 {
-  m_netifAddConn = netmon->onInterfaceAdded.connect(
-    [this] (const shared_ptr<const ndn::net::NetworkInterface>& netif) {
-      this->applyUnicastConfigToNetif(netif);
-      this->applyMcastConfigToNetif(*netif);
-    });
+  m_netifAddConn = netmon->onInterfaceAdded.connect([this] (const auto& netif) {
+    this->applyUnicastConfigToNetif(netif);
+    this->applyMcastConfigToNetif(*netif);
+  });
 }
 
 void
diff --git a/daemon/face/ethernet-transport.cpp b/daemon/face/ethernet-transport.cpp
index a7e8907..e2ba043 100644
--- a/daemon/face/ethernet-transport.cpp
+++ b/daemon/face/ethernet-transport.cpp
@@ -122,8 +122,7 @@
 EthernetTransport::asyncRead()
 {
   m_socket.async_read_some(boost::asio::null_buffers(),
-                           bind(&EthernetTransport::handleRead, this,
-                                boost::asio::placeholders::error));
+                           [this] (const auto& e, auto) { this->handleRead(e); });
 }
 
 void
diff --git a/daemon/face/face-system.cpp b/daemon/face/face-system.cpp
index 1d2db37..872efef 100644
--- a/daemon/face/face-system.cpp
+++ b/daemon/face/face-system.cpp
@@ -47,7 +47,7 @@
 ProtocolFactoryCtorParams
 FaceSystem::makePFCtorParams()
 {
-  auto addFace = bind(&FaceTable::add, &m_faceTable, _1);
+  auto addFace = [&ft = m_faceTable] (auto face) { ft.add(std::move(face)); };
   return {addFace, m_netmon};
 }
 
diff --git a/daemon/face/generic-link-service.cpp b/daemon/face/generic-link-service.cpp
index 5122755..e2f7e0e 100644
--- a/daemon/face/generic-link-service.cpp
+++ b/daemon/face/generic-link-service.cpp
@@ -36,17 +36,6 @@
 
 constexpr uint32_t DEFAULT_CONGESTION_THRESHOLD_DIVISOR = 2;
 
-GenericLinkService::Options::Options()
-  : allowLocalFields(false)
-  , allowFragmentation(false)
-  , allowReassembly(false)
-  , allowCongestionMarking(false)
-  , baseCongestionMarkingInterval(time::milliseconds(100)) // Interval from RFC 8289 (CoDel)
-  , defaultCongestionThreshold(65536) // This default value works well for a queue capacity of 200KiB
-  , allowSelfLearning(false)
-{
-}
-
 GenericLinkService::GenericLinkService(const GenericLinkService::Options& options)
   : m_options(options)
   , m_fragmenter(m_options.fragmenterOptions, this)
@@ -57,8 +46,8 @@
   , m_lastMarkTime(time::steady_clock::TimePoint::min())
   , m_nMarkedSinceInMarkingState(0)
 {
-  m_reassembler.beforeTimeout.connect(bind([this] { ++this->nReassemblyTimeouts; }));
-  m_reliability.onDroppedInterest.connect([this] (const Interest& i) { this->notifyDroppedInterest(i); });
+  m_reassembler.beforeTimeout.connect([this] (auto...) { ++this->nReassemblyTimeouts; });
+  m_reliability.onDroppedInterest.connect([this] (const auto& i) { this->notifyDroppedInterest(i); });
   nReassembling.observe(&m_reassembler);
 }
 
@@ -226,7 +215,7 @@
 void
 GenericLinkService::assignSequences(std::vector<lp::Packet>& pkts)
 {
-  std::for_each(pkts.begin(), pkts.end(), bind(&GenericLinkService::assignSequence, this, _1));
+  std::for_each(pkts.begin(), pkts.end(), [this] (auto& pkt) { this->assignSequence(pkt); });
 }
 
 void
diff --git a/daemon/face/generic-link-service.hpp b/daemon/face/generic-link-service.hpp
index d0eb3dd..c8eea37 100644
--- a/daemon/face/generic-link-service.hpp
+++ b/daemon/face/generic-link-service.hpp
@@ -98,16 +98,19 @@
   class Options
   {
   public:
-    Options();
+    constexpr
+    Options() noexcept
+    {
+    }
 
   public:
     /** \brief enables encoding of IncomingFaceId, and decoding of NextHopFaceId and CachePolicy
      */
-    bool allowLocalFields;
+    bool allowLocalFields = false;
 
     /** \brief enables fragmentation
      */
-    bool allowFragmentation;
+    bool allowFragmentation = false;
 
     /** \brief options for fragmentation
      */
@@ -115,7 +118,7 @@
 
     /** \brief enables reassembly
      */
-    bool allowReassembly;
+    bool allowReassembly = false;
 
     /** \brief options for reassembly
      */
@@ -127,19 +130,23 @@
 
     /** \brief enables send queue congestion detection and marking
      */
-    bool allowCongestionMarking;
+    bool allowCongestionMarking = false;
 
     /** \brief starting value for congestion marking interval
+     *
+     *  The default value (100 ms) is taken from RFC 8289 (CoDel).
      */
-    time::nanoseconds baseCongestionMarkingInterval;
+    time::nanoseconds baseCongestionMarkingInterval = 100_ms;
 
     /** \brief default congestion threshold in bytes
+     *
+     *  The default value (64 KiB) works well for a queue capacity of 200 KiB.
      */
-    size_t defaultCongestionThreshold;
+    size_t defaultCongestionThreshold = 65536;
 
     /** \brief enables self-learning forwarding support
      */
-    bool allowSelfLearning;
+    bool allowSelfLearning = false;
   };
 
   /** \brief counters provided by GenericLinkService
@@ -147,7 +154,7 @@
   using Counters = GenericLinkServiceCounters;
 
   explicit
-  GenericLinkService(const Options& options = Options());
+  GenericLinkService(const Options& options = {});
 
   /** \brief get Options used by GenericLinkService
    */
@@ -283,6 +290,7 @@
 PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   /// CongestionMark TLV-TYPE (3 octets) + CongestionMark TLV-LENGTH (1 octet) + sizeof(uint64_t)
   static constexpr size_t CONGESTION_MARK_SIZE = 3 + 1 + sizeof(uint64_t);
+
   /// Time to mark next packet due to send queue congestion
   time::steady_clock::TimePoint m_nextMarkTime;
   /// Time last packet was marked
diff --git a/daemon/face/lp-fragmenter.cpp b/daemon/face/lp-fragmenter.cpp
index 1928bf5..7494ca7 100644
--- a/daemon/face/lp-fragmenter.cpp
+++ b/daemon/face/lp-fragmenter.cpp
@@ -57,11 +57,6 @@
   1 + 1 + 8 + // FragCount TLV
   1 + 9; // Fragment TLV-TYPE and TLV-LENGTH
 
-LpFragmenter::Options::Options()
-  : nMaxFragments(400)
-{
-}
-
 LpFragmenter::LpFragmenter(const LpFragmenter::Options& options, const LinkService* linkService)
   : m_options(options)
   , m_linkService(linkService)
@@ -122,7 +117,7 @@
   // compute FragCount
   if (fragCount > m_options.nMaxFragments) {
     NFD_LOG_FACE_WARN("fragmentation error, FragCount over limit: DROP");
-    return std::make_pair(false, std::vector<lp::Packet>{});
+    return std::make_tuple(false, std::vector<lp::Packet>{});
   }
 
   // populate fragments
@@ -135,7 +130,7 @@
     lp::Packet& frag = frags[fragIndex];
     frag.add<lp::FragIndexField>(fragIndex);
     frag.add<lp::FragCountField>(fragCount);
-    frag.set<lp::FragmentField>(std::make_pair(fragBegin, fragEnd));
+    frag.set<lp::FragmentField>({fragBegin, fragEnd});
     BOOST_ASSERT(frag.wireEncode().size() <= mtu);
 
     ++fragIndex;
@@ -144,7 +139,7 @@
   }
   BOOST_ASSERT(fragIndex == fragCount);
 
-  return std::make_pair(true, frags);
+  return std::make_tuple(true, frags);
 }
 
 std::ostream&
diff --git a/daemon/face/lp-fragmenter.hpp b/daemon/face/lp-fragmenter.hpp
index 40d32cb..51d14d9 100644
--- a/daemon/face/lp-fragmenter.hpp
+++ b/daemon/face/lp-fragmenter.hpp
@@ -44,19 +44,15 @@
 public:
   /** \brief Options that control the behavior of LpFragmenter
    */
-  class Options
+  struct Options
   {
-  public:
-    Options();
-
-  public:
     /** \brief maximum number of fragments in a packet
      */
-    size_t nMaxFragments;
+    size_t nMaxFragments = 400;
   };
 
   explicit
-  LpFragmenter(const Options& options = Options(), const LinkService* linkService = nullptr);
+  LpFragmenter(const Options& options, const LinkService* linkService = nullptr);
 
   /** \brief set options for fragmenter
    */
diff --git a/daemon/face/lp-reassembler.cpp b/daemon/face/lp-reassembler.cpp
index a6d1c60..cd6f873 100644
--- a/daemon/face/lp-reassembler.cpp
+++ b/daemon/face/lp-reassembler.cpp
@@ -33,12 +33,6 @@
 
 NFD_LOG_INIT(LpReassembler);
 
-LpReassembler::Options::Options()
-  : nMaxFragments(400)
-  , reassemblyTimeout(time::milliseconds(500))
-{
-}
-
 LpReassembler::LpReassembler(const LpReassembler::Options& options, const LinkService* linkService)
   : m_options(options)
   , m_linkService(linkService)
@@ -119,8 +113,7 @@
   }
 
   // set drop timer
-  pp.dropTimer = scheduler::schedule(m_options.reassemblyTimeout,
-                                     bind(&LpReassembler::timeoutPartialPacket, this, key));
+  pp.dropTimer = scheduler::schedule(m_options.reassemblyTimeout, [=] { timeoutPartialPacket(key); });
 
   return FALSE_RETURN;
 }
@@ -130,7 +123,7 @@
 {
   PartialPacket& pp = m_partialPackets[key];
 
-  size_t payloadSize = std::accumulate(pp.fragments.begin(), pp.fragments.end(), 0,
+  size_t payloadSize = std::accumulate(pp.fragments.begin(), pp.fragments.end(), 0U,
     [&] (size_t sum, const lp::Packet& pkt) -> size_t {
       ndn::Buffer::const_iterator fragBegin, fragEnd;
       std::tie(fragBegin, fragEnd) = pkt.get<lp::FragmentField>();
@@ -138,7 +131,7 @@
     });
 
   ndn::Buffer fragBuffer(payloadSize);
-  ndn::Buffer::iterator it = fragBuffer.begin();
+  auto it = fragBuffer.begin();
 
   for (const lp::Packet& frag : pp.fragments) {
     ndn::Buffer::const_iterator fragBegin, fragEnd;
diff --git a/daemon/face/lp-reassembler.hpp b/daemon/face/lp-reassembler.hpp
index fd0d874..f416b2c 100644
--- a/daemon/face/lp-reassembler.hpp
+++ b/daemon/face/lp-reassembler.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -38,32 +38,28 @@
 class LinkService;
 
 /** \brief reassembles fragmented network-layer packets
- *  \sa http://redmine.named-data.net/projects/nfd/wiki/NDNLPv2
+ *  \sa https://redmine.named-data.net/projects/nfd/wiki/NDNLPv2
  */
 class LpReassembler : noncopyable
 {
 public:
   /** \brief Options that control the behavior of LpReassembler
    */
-  class Options
+  struct Options
   {
-  public:
-    Options();
-
-  public:
     /** \brief maximum number of fragments in a packet
      *
      *  LpPackets with FragCount over this limit are dropped.
      */
-    size_t nMaxFragments;
+    size_t nMaxFragments = 400;
 
     /** \brief timeout before a partially reassembled packet is dropped
      */
-    time::nanoseconds reassemblyTimeout;
+    time::nanoseconds reassemblyTimeout = 500_ms;
   };
 
   explicit
-  LpReassembler(const Options& options = Options(), const LinkService* linkService = nullptr);
+  LpReassembler(const Options& options, const LinkService* linkService = nullptr);
 
   /** \brief set options for reassembler
    */
diff --git a/daemon/face/lp-reliability.cpp b/daemon/face/lp-reliability.cpp
index 5a4621d..7b248fb 100644
--- a/daemon/face/lp-reliability.cpp
+++ b/daemon/face/lp-reliability.cpp
@@ -39,13 +39,13 @@
 {
   BOOST_ASSERT(m_linkService != nullptr);
 
-  BOOST_ASSERT(m_options.idleAckTimerPeriod > time::nanoseconds::zero());
+  BOOST_ASSERT(m_options.idleAckTimerPeriod > 0_ns);
 }
 
 void
 LpReliability::setOptions(const Options& options)
 {
-  BOOST_ASSERT(options.idleAckTimerPeriod > time::nanoseconds::zero());
+  BOOST_ASSERT(options.idleAckTimerPeriod > 0_ns);
 
   if (m_options.isEnabled && !options.isEnabled) {
     this->stopIdleAckTimer();
@@ -81,8 +81,7 @@
                                                  std::forward_as_tuple(txSeq),
                                                  std::forward_as_tuple(frag));
     unackedFragsIt->second.sendTime = sendTime;
-    unackedFragsIt->second.rtoTimer =
-      scheduler::schedule(m_rto.computeRto(), bind(&LpReliability::onLpPacketLost, this, txSeq));
+    unackedFragsIt->second.rtoTimer = scheduler::schedule(m_rto.computeRto(), [=] { onLpPacketLost(txSeq); });
     unackedFragsIt->second.netPkt = netPkt;
 
     if (m_unackedFrags.size() == 1) {
@@ -305,8 +304,7 @@
     m_linkService->sendLpPacket(lp::Packet(newTxFrag.pkt));
 
     // Start RTO timer for this sequence
-    newTxFrag.rtoTimer = scheduler::schedule(m_rto.computeRto(),
-                                          bind(&LpReliability::onLpPacketLost, this, newTxSeq));
+    newTxFrag.rtoTimer = scheduler::schedule(m_rto.computeRto(), [=] { onLpPacketLost(newTxSeq); });
   }
 
   return removedThisTxSeq;
diff --git a/daemon/face/lp-reliability.hpp b/daemon/face/lp-reliability.hpp
index 896cc0e..9521183 100644
--- a/daemon/face/lp-reliability.hpp
+++ b/daemon/face/lp-reliability.hpp
@@ -57,7 +57,7 @@
 
     /** \brief period between sending pending Acks in an IDLE packet
      */
-    time::nanoseconds idleAckTimerPeriod = time::milliseconds(5);
+    time::nanoseconds idleAckTimerPeriod = 5_ms;
 
     /** \brief a fragment is considered lost if this number of fragments with greater sequence
      *         numbers are acknowledged
diff --git a/daemon/face/multicast-udp-transport.cpp b/daemon/face/multicast-udp-transport.cpp
index 3574158..a01063b 100644
--- a/daemon/face/multicast-udp-transport.cpp
+++ b/daemon/face/multicast-udp-transport.cpp
@@ -87,10 +87,10 @@
   NFD_LOG_FACE_TRACE(__func__);
 
   m_sendSocket.async_send_to(boost::asio::buffer(packet.packet), m_multicastGroup,
-                             bind(&MulticastUdpTransport::handleSend, this,
-                                  boost::asio::placeholders::error,
-                                  boost::asio::placeholders::bytes_transferred,
-                                  packet.packet));
+                             // packet.packet is copied into the lambda to retain the underlying Buffer
+                             [this, p = packet.packet] (auto&&... args) {
+                               this->handleSend(std::forward<decltype(args)>(args)...);
+                             });
 }
 
 void
diff --git a/daemon/face/stream-transport.hpp b/daemon/face/stream-transport.hpp
index d70e4f6..9daf29e 100644
--- a/daemon/face/stream-transport.hpp
+++ b/daemon/face/stream-transport.hpp
@@ -200,9 +200,7 @@
 StreamTransport<T>::sendFromQueue()
 {
   boost::asio::async_write(m_socket, boost::asio::buffer(m_sendQueue.front()),
-                           bind(&StreamTransport<T>::handleSend, this,
-                                boost::asio::placeholders::error,
-                                boost::asio::placeholders::bytes_transferred));
+                           [this] (auto&&... args) { this->handleSend(std::forward<decltype(args)>(args)...); });
 }
 
 template<class T>
@@ -232,9 +230,7 @@
 
   m_socket.async_receive(boost::asio::buffer(m_receiveBuffer + m_receiveBufferSize,
                                              ndn::MAX_NDN_PACKET_SIZE - m_receiveBufferSize),
-                         bind(&StreamTransport<T>::handleReceive, this,
-                              boost::asio::placeholders::error,
-                              boost::asio::placeholders::bytes_transferred));
+                         [this] (auto&&... args) { this->handleReceive(std::forward<decltype(args)>(args)...); });
 }
 
 template<class T>
diff --git a/daemon/face/tcp-channel.cpp b/daemon/face/tcp-channel.cpp
index 1e6b410..639b27d 100644
--- a/daemon/face/tcp-channel.cpp
+++ b/daemon/face/tcp-channel.cpp
@@ -83,15 +83,15 @@
     return;
   }
 
-  auto clientSocket = make_shared<ip::tcp::socket>(ref(getGlobalIoService()));
-  auto timeoutEvent = scheduler::schedule(timeout, bind(&TcpChannel::handleConnectTimeout, this,
-                                                        remoteEndpoint, clientSocket, onConnectFailed));
+  auto clientSocket = make_shared<ip::tcp::socket>(std::ref(getGlobalIoService()));
+  auto timeoutEvent = scheduler::schedule(timeout, [=] {
+    handleConnectTimeout(remoteEndpoint, clientSocket, onConnectFailed);
+  });
 
   NFD_LOG_CHAN_TRACE("Connecting to " << remoteEndpoint);
-  clientSocket->async_connect(remoteEndpoint,
-                              bind(&TcpChannel::handleConnect, this,
-                                   boost::asio::placeholders::error, remoteEndpoint, clientSocket,
-                                   params, timeoutEvent, onFaceCreated, onConnectFailed));
+  clientSocket->async_connect(remoteEndpoint, [=] (const auto& e) {
+    this->handleConnect(e, remoteEndpoint, clientSocket, params, timeoutEvent, onFaceCreated, onConnectFailed);
+  });
 }
 
 void
@@ -151,9 +151,7 @@
 TcpChannel::accept(const FaceCreatedCallback& onFaceCreated,
                    const FaceCreationFailedCallback& onAcceptFailed)
 {
-  m_acceptor.async_accept(m_socket, bind(&TcpChannel::handleAccept, this,
-                                         boost::asio::placeholders::error,
-                                         onFaceCreated, onAcceptFailed));
+  m_acceptor.async_accept(m_socket, [=] (const auto& e) { this->handleAccept(e, onFaceCreated, onAcceptFailed); });
 }
 
 void
diff --git a/daemon/face/tcp-transport.cpp b/daemon/face/tcp-transport.cpp
index ad1be5d..78d7097 100644
--- a/daemon/face/tcp-transport.cpp
+++ b/daemon/face/tcp-transport.cpp
@@ -35,8 +35,8 @@
 
 NFD_LOG_MEMBER_INIT_SPECIALIZED(StreamTransport<boost::asio::ip::tcp>, TcpTransport);
 
-time::milliseconds TcpTransport::s_initialReconnectWait = time::seconds(1);
-time::milliseconds TcpTransport::s_maxReconnectWait = time::minutes(5);
+time::milliseconds TcpTransport::s_initialReconnectWait = 1_s;
+time::milliseconds TcpTransport::s_maxReconnectWait = 5_min;
 float TcpTransport::s_reconnectWaitMultiplier = 2.0f;
 
 TcpTransport::TcpTransport(protocol::socket&& socket, ndn::nfd::FacePersistency persistency, ndn::nfd::FaceScope faceScope)
@@ -134,10 +134,8 @@
   this->resetReceiveBuffer();
   this->resetSendQueue();
 
-  m_reconnectEvent = scheduler::schedule(m_nextReconnectWait,
-                                         [this] { handleReconnectTimeout(); });
-  m_socket.async_connect(m_remoteEndpoint,
-                         [this] (const boost::system::error_code& error) { handleReconnect(error); });
+  m_reconnectEvent = scheduler::schedule(m_nextReconnectWait, [this] { this->handleReconnectTimeout(); });
+  m_socket.async_connect(m_remoteEndpoint, [this] (const auto& e) { this->handleReconnect(e); });
 }
 
 void
diff --git a/daemon/face/udp-channel.cpp b/daemon/face/udp-channel.cpp
index 3d6e6b8..b87e697 100644
--- a/daemon/face/udp-channel.cpp
+++ b/daemon/face/udp-channel.cpp
@@ -60,7 +60,7 @@
   catch (const boost::system::system_error& e) {
     NFD_LOG_CHAN_DEBUG("Face creation for " << remoteEndpoint << " failed: " << e.what());
     if (onConnectFailed)
-      onConnectFailed(504, std::string("Face creation failed: ") + e.what());
+      onConnectFailed(504, "Face creation failed: "s + e.what());
     return;
   }
 
@@ -94,10 +94,9 @@
                            const FaceCreationFailedCallback& onReceiveFailed)
 {
   m_socket.async_receive_from(boost::asio::buffer(m_receiveBuffer), m_remoteEndpoint,
-                              bind(&UdpChannel::handleNewPeer, this,
-                                   boost::asio::placeholders::error,
-                                   boost::asio::placeholders::bytes_transferred,
-                                   onFaceCreated, onReceiveFailed));
+                              [=] (auto&&... args) {
+                                this->handleNewPeer(std::forward<decltype(args)>(args)..., onFaceCreated, onReceiveFailed);
+                              });
 }
 
 void
@@ -127,7 +126,7 @@
   catch (const boost::system::system_error& e) {
     NFD_LOG_CHAN_DEBUG("Face creation for " << m_remoteEndpoint << " failed: " << e.what());
     if (onReceiveFailed)
-      onReceiveFailed(504, std::string("Face creation failed: ") + e.what());
+      onReceiveFailed(504, "Face creation failed: "s + e.what());
     return;
   }
 
diff --git a/daemon/face/udp-factory.cpp b/daemon/face/udp-factory.cpp
index 5d28bed..3660db5 100644
--- a/daemon/face/udp-factory.cpp
+++ b/daemon/face/udp-factory.cpp
@@ -50,7 +50,9 @@
 UdpFactory::UdpFactory(const CtorParams& params)
   : ProtocolFactory(params)
 {
-  m_netifAddConn = netmon->onInterfaceAdded.connect(bind(&UdpFactory::applyMcastConfigToNetif, this, _1));
+  m_netifAddConn = netmon->onInterfaceAdded.connect([this] (const auto& netif) {
+    this->applyMcastConfigToNetif(netif);
+  });
 }
 
 void
@@ -414,7 +416,7 @@
     NFD_LOG_DEBUG("Not creating multicast faces on " << netif->getName() << ": no viable IP address");
     // keep an eye on new addresses
     m_netifConns[netif->getIndex()].addrAddConn =
-      netif->onAddressAdded.connect(bind(&UdpFactory::applyMcastConfigToNetif, this, netif));
+      netif->onAddressAdded.connect([=] (auto...) { this->applyMcastConfigToNetif(netif); });
     return {};
   }
 
diff --git a/daemon/face/unix-stream-channel.cpp b/daemon/face/unix-stream-channel.cpp
index a127c84..8c58c55 100644
--- a/daemon/face/unix-stream-channel.cpp
+++ b/daemon/face/unix-stream-channel.cpp
@@ -101,7 +101,7 @@
   m_acceptor.bind(m_endpoint);
   m_acceptor.listen(backlog);
 
-  if (::chmod(m_endpoint.path().c_str(), 0666) < 0) {
+  if (::chmod(m_endpoint.path().data(), 0666) < 0) {
     BOOST_THROW_EXCEPTION(Error("chmod(" + m_endpoint.path() + ") failed: " + std::strerror(errno)));
   }
 
@@ -113,9 +113,7 @@
 UnixStreamChannel::accept(const FaceCreatedCallback& onFaceCreated,
                           const FaceCreationFailedCallback& onAcceptFailed)
 {
-  m_acceptor.async_accept(m_socket, bind(&UnixStreamChannel::handleAccept, this,
-                                         boost::asio::placeholders::error,
-                                         onFaceCreated, onAcceptFailed));
+  m_acceptor.async_accept(m_socket, [=] (const auto& e) { this->handleAccept(e, onFaceCreated, onAcceptFailed); });
 }
 
 void
diff --git a/daemon/face/websocket-channel.cpp b/daemon/face/websocket-channel.cpp
index 2ac9384..ca149b3 100644
--- a/daemon/face/websocket-channel.cpp
+++ b/daemon/face/websocket-channel.cpp
@@ -117,7 +117,7 @@
   NFD_LOG_CHAN_TRACE("Incoming connection from " << m_server.get_con_from_hdl(hdl)->get_remote_endpoint());
 
   auto linkService = make_unique<GenericLinkService>();
-  auto transport = make_unique<WebSocketTransport>(hdl, ref(m_server), m_pingInterval);
+  auto transport = make_unique<WebSocketTransport>(hdl, std::ref(m_server), m_pingInterval);
   auto face = make_shared<Face>(std::move(linkService), std::move(transport));
 
   BOOST_ASSERT(m_channelFaces.count(hdl) == 0);
diff --git a/daemon/face/websocket-transport.cpp b/daemon/face/websocket-transport.cpp
index 97af039..4262287 100644
--- a/daemon/face/websocket-transport.cpp
+++ b/daemon/face/websocket-transport.cpp
@@ -97,7 +97,7 @@
 
   bool isOk = false;
   Block element;
-  std::tie(isOk, element) = Block::fromBuffer(reinterpret_cast<const uint8_t*>(msg.c_str()), msg.size());
+  std::tie(isOk, element) = Block::fromBuffer(reinterpret_cast<const uint8_t*>(msg.data()), msg.size());
   if (!isOk) {
     NFD_LOG_FACE_WARN("Failed to parse message payload");
     return;
@@ -109,7 +109,7 @@
 void
 WebSocketTransport::schedulePing()
 {
-  m_pingEventId = scheduler::schedule(m_pingInterval, bind(&WebSocketTransport::sendPing, this));
+  m_pingEventId = scheduler::schedule(m_pingInterval, [this] { sendPing(); });
 }
 
 void
diff --git a/daemon/fw/access-strategy.cpp b/daemon/fw/access-strategy.cpp
index a766424..8460a00 100644
--- a/daemon/fw/access-strategy.cpp
+++ b/daemon/fw/access-strategy.cpp
@@ -35,8 +35,7 @@
 
 AccessStrategy::AccessStrategy(Forwarder& forwarder, const Name& name)
   : Strategy(forwarder)
-  , m_removeFaceInfoConn(this->beforeRemoveFace.connect(
-                         bind(&AccessStrategy::removeFaceInfo, this, _1)))
+  , m_removeFaceInfoConn(beforeRemoveFace.connect([this] (const Face& face) { removeFaceInfo(face); }))
 {
   ParsedInstanceName parsed = parseInstanceName(name);
   if (!parsed.parameters.empty()) {
@@ -177,14 +176,13 @@
     return;
   }
 
-  pit::InRecordCollection::iterator inRecord = pitEntry->getInRecord(*inFace);
+  auto inRecord = pitEntry->getInRecord(*inFace);
   BOOST_ASSERT(inRecord != pitEntry->in_end());
   // in-record is erased only if Interest is satisfied, and RTO timer should have been cancelled
   // note: if this strategy is extended to send Nacks, that would also erase in-record,
   //       and RTO timer should be cancelled in that case as well
 
   const Interest& interest = inRecord->getInterest();
-
   const fib::Entry& fibEntry = this->lookupFib(*pitEntry);
 
   NFD_LOG_DEBUG(pitEntry->getInterest() << " timeoutFrom " << firstOutFaceId <<
@@ -227,14 +225,14 @@
     return;
   }
 
-  pit::OutRecordCollection::iterator outRecord = pitEntry->getOutRecord(inFace);
+  auto outRecord = pitEntry->getOutRecord(inFace);
   if (outRecord == pitEntry->out_end()) { // no out-record
     NFD_LOG_DEBUG(pitEntry->getInterest() << " dataFrom " << inFace.getId() <<
                   " no-out-record");
     return;
   }
 
-  time::steady_clock::Duration rtt = time::steady_clock::now() - outRecord->getLastRenewed();
+  auto rtt = time::steady_clock::now() - outRecord->getLastRenewed();
   NFD_LOG_DEBUG(pitEntry->getInterest() << " dataFrom " << inFace.getId() <<
                 " rtt=" << time::duration_cast<time::microseconds>(rtt).count());
   this->updateMeasurements(inFace, data, time::duration_cast<RttEstimator::Duration>(rtt));
@@ -260,7 +258,7 @@
 
 AccessStrategy::MtInfo::MtInfo()
   : lastNexthop(face::INVALID_FACEID)
-  , rtt(1, time::milliseconds(1), 0.1)
+  , rtt(1, 1_ms, 0.1)
 {
 }
 
@@ -292,14 +290,13 @@
     BOOST_ASSERT(me != nullptr);
   }
 
-  static const time::nanoseconds ME_LIFETIME = time::seconds(8);
-  this->getMeasurements().extendLifetime(*me, ME_LIFETIME);
+  this->getMeasurements().extendLifetime(*me, 8_s);
 
   return me->insertStrategyInfo<MtInfo>().first;
 }
 
 AccessStrategy::FaceInfo::FaceInfo()
-  : rtt(1, time::milliseconds(1), 0.1)
+  : rtt(1, 1_ms, 0.1)
 {
 }
 
diff --git a/daemon/fw/asf-measurements.cpp b/daemon/fw/asf-measurements.cpp
index 0d772ac..f743e06 100644
--- a/daemon/fw/asf-measurements.cpp
+++ b/daemon/fw/asf-measurements.cpp
@@ -168,7 +168,7 @@
   FaceInfo* info = nullptr;
 
   if (it == m_fit.end()) {
-    const auto& pair = m_fit.insert(std::make_pair(faceId, FaceInfo()));
+    const auto& pair = m_fit.emplace(faceId, FaceInfo());
     info = &pair.first->second;
 
     extendFaceInfoLifetime(*info, faceId);
@@ -193,9 +193,7 @@
   scheduler::cancel(info.getMeasurementExpirationEventId());
 
   // Refresh measurement
-  scheduler::EventId id = scheduler::schedule(AsfMeasurements::MEASUREMENTS_LIFETIME,
-    bind(&NamespaceInfo::expireFaceInfo, this, faceId));
-
+  auto id = scheduler::schedule(AsfMeasurements::MEASUREMENTS_LIFETIME, [=] { expireFaceInfo(faceId); });
   info.setMeasurementExpirationEventId(id);
 }
 
diff --git a/daemon/fw/asf-measurements.hpp b/daemon/fw/asf-measurements.hpp
index ee5885d..b5b1f8e 100644
--- a/daemon/fw/asf-measurements.hpp
+++ b/daemon/fw/asf-measurements.hpp
@@ -254,8 +254,7 @@
   const FaceInfoTable::iterator
   insert(FaceId faceId)
   {
-    const auto& pair = m_fit.insert(std::make_pair(faceId, FaceInfo()));
-    return pair.first;
+    return m_fit.emplace(faceId, FaceInfo()).first;
   }
 
   bool
@@ -317,7 +316,7 @@
   extendLifetime(measurements::Entry& me);
 
 public:
-  static constexpr time::microseconds MEASUREMENTS_LIFETIME = time::seconds(300);
+  static constexpr time::microseconds MEASUREMENTS_LIFETIME = 300_s;
 
 private:
   MeasurementsAccessor& m_measurements;
diff --git a/daemon/fw/asf-probing-module.cpp b/daemon/fw/asf-probing-module.cpp
index 24b4577..63f9867 100644
--- a/daemon/fw/asf-probing-module.cpp
+++ b/daemon/fw/asf-probing-module.cpp
@@ -70,7 +70,7 @@
                               const Face& faceUsed)
 {
   FaceInfoFacePairSet rankedFaces(
-    [] (FaceInfoFacePair pairLhs, FaceInfoFacePair pairRhs) -> bool {
+    [] (const auto& pairLhs, const auto& pairRhs) -> bool {
       // Sort by RTT
       // If a face has timed-out, rank it behind non-timed-out faces
       FaceInfo& lhs = *pairLhs.first;
@@ -93,14 +93,13 @@
     }
 
     FaceInfo* info = m_measurements.getFaceInfo(fibEntry, interest, hopFace.getId());
-
     // If no RTT has been recorded, probe this face
     if (info == nullptr || !info->hasSrttMeasurement()) {
       return &hopFace;
     }
 
     // Add FaceInfo to container sorted by RTT
-    rankedFaces.insert(std::make_pair(info, &hopFace));
+    rankedFaces.insert({info, &hopFace});
   }
 
   if (rankedFaces.empty()) {
@@ -149,7 +148,7 @@
   uint64_t rank = 1;
   double offset = 0.0;
 
-  for (const FaceInfoFacePair pair : rankedFaces) {
+  for (const auto& pair : rankedFaces) {
     double probability = getProbingProbability(rank++, rankSum, rankedFaces.size());
 
     // Is the random number within the bounds of this face's probability + the previous faces'
diff --git a/daemon/fw/asf-probing-module.hpp b/daemon/fw/asf-probing-module.hpp
index 785abd8..02ef155 100644
--- a/daemon/fw/asf-probing-module.hpp
+++ b/daemon/fw/asf-probing-module.hpp
@@ -80,8 +80,8 @@
   getRandomNumber(double start, double end);
 
 public:
-  static constexpr time::milliseconds DEFAULT_PROBING_INTERVAL = time::milliseconds(60000);
-  static constexpr time::milliseconds MIN_PROBING_INTERVAL = time::milliseconds(1000);
+  static constexpr time::milliseconds DEFAULT_PROBING_INTERVAL = 1_min;
+  static constexpr time::milliseconds MIN_PROBING_INTERVAL = 1_s;
 
 private:
   time::milliseconds m_probingInterval;
diff --git a/daemon/fw/best-route-strategy.cpp b/daemon/fw/best-route-strategy.cpp
index 69cbec7..e4462e4 100644
--- a/daemon/fw/best-route-strategy.cpp
+++ b/daemon/fw/best-route-strategy.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2017,  Regents of the University of California,
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -44,10 +44,8 @@
   }
 
   const fib::Entry& fibEntry = this->lookupFib(*pitEntry);
-  const fib::NextHopList& nexthops = fibEntry.getNextHops();
-
-  for (fib::NextHopList::const_iterator it = nexthops.begin(); it != nexthops.end(); ++it) {
-    Face& outFace = it->getFace();
+  for (const auto& nexthop : fibEntry.getNextHops()) {
+    Face& outFace = nexthop.getFace();
     if (!wouldViolateScope(inFace, interest, outFace) &&
         canForwardToLegacy(*pitEntry, outFace)) {
       this->sendInterest(pitEntry, outFace, interest);
diff --git a/daemon/fw/best-route-strategy2.cpp b/daemon/fw/best-route-strategy2.cpp
index 2956ed7..0ab6b25 100644
--- a/daemon/fw/best-route-strategy2.cpp
+++ b/daemon/fw/best-route-strategy2.cpp
@@ -69,7 +69,7 @@
  *  \param wantUnused if true, NextHop must not have unexpired out-record
  *  \param now time::steady_clock::now(), ignored if !wantUnused
  */
-static inline bool
+static bool
 isNextHopEligible(const Face& inFace, const Interest& interest,
                   const fib::NextHop& nexthop,
                   const shared_ptr<pit::Entry>& pitEntry,
@@ -88,7 +88,7 @@
 
   if (wantUnused) {
     // nexthop must not have unexpired out-record
-    pit::OutRecordCollection::iterator outRecord = pitEntry->getOutRecord(outFace);
+    auto outRecord = pitEntry->getOutRecord(outFace);
     if (outRecord != pitEntry->out_end() && outRecord->getExpiry() > now) {
       return false;
     }
@@ -100,23 +100,26 @@
 /** \brief pick an eligible NextHop with earliest out-record
  *  \note It is assumed that every nexthop has an out-record.
  */
-static inline fib::NextHopList::const_iterator
+static fib::NextHopList::const_iterator
 findEligibleNextHopWithEarliestOutRecord(const Face& inFace, const Interest& interest,
                                          const fib::NextHopList& nexthops,
                                          const shared_ptr<pit::Entry>& pitEntry)
 {
-  fib::NextHopList::const_iterator found = nexthops.end();
-  time::steady_clock::TimePoint earliestRenewed = time::steady_clock::TimePoint::max();
-  for (fib::NextHopList::const_iterator it = nexthops.begin(); it != nexthops.end(); ++it) {
+  auto found = nexthops.end();
+  auto earliestRenewed = time::steady_clock::TimePoint::max();
+
+  for (auto it = nexthops.begin(); it != nexthops.end(); ++it) {
     if (!isNextHopEligible(inFace, interest, *it, pitEntry))
       continue;
-    pit::OutRecordCollection::iterator outRecord = pitEntry->getOutRecord(it->getFace());
+
+    auto outRecord = pitEntry->getOutRecord(it->getFace());
     BOOST_ASSERT(outRecord != pitEntry->out_end());
     if (outRecord->getLastRenewed() < earliestRenewed) {
       found = it;
       earliestRenewed = outRecord->getLastRenewed();
     }
   }
+
   return found;
 }
 
@@ -133,13 +136,13 @@
 
   const fib::Entry& fibEntry = this->lookupFib(*pitEntry);
   const fib::NextHopList& nexthops = fibEntry.getNextHops();
-  fib::NextHopList::const_iterator it = nexthops.end();
+  auto it = nexthops.end();
 
   if (suppression == RetxSuppressionResult::NEW) {
     // forward to nexthop with lowest cost except downstream
-    it = std::find_if(nexthops.begin(), nexthops.end(),
-      bind(&isNextHopEligible, cref(inFace), interest, _1, pitEntry,
-           false, time::steady_clock::TimePoint::min()));
+    it = std::find_if(nexthops.begin(), nexthops.end(), [&] (const auto& nexthop) {
+      return isNextHopEligible(inFace, interest, nexthop, pitEntry);
+    });
 
     if (it == nexthops.end()) {
       NFD_LOG_DEBUG(interest << " from=" << inFace.getId() << " noNextHop");
@@ -160,9 +163,10 @@
   }
 
   // find an unused upstream with lowest cost except downstream
-  it = std::find_if(nexthops.begin(), nexthops.end(),
-                    bind(&isNextHopEligible, cref(inFace), interest, _1, pitEntry,
-                         true, time::steady_clock::now()));
+  it = std::find_if(nexthops.begin(), nexthops.end(), [&] (const auto& nexthop) {
+    return isNextHopEligible(inFace, interest, nexthop, pitEntry, true, time::steady_clock::now());
+  });
+
   if (it != nexthops.end()) {
     Face& outFace = it->getFace();
     this->sendInterest(pitEntry, outFace, interest);
diff --git a/daemon/fw/face-table.cpp b/daemon/fw/face-table.cpp
index 3e19dd1..7e1880f 100644
--- a/daemon/fw/face-table.cpp
+++ b/daemon/fw/face-table.cpp
@@ -86,7 +86,7 @@
                " remote=" << face->getRemoteUri() <<
                " local=" << face->getLocalUri());
 
-  connectFaceClosedSignal(*face, bind(&FaceTable::remove, this, faceId));
+  connectFaceClosedSignal(*face, [=] { remove(faceId); });
 
   this->afterAdd(*face);
 }
diff --git a/daemon/fw/forwarder.cpp b/daemon/fw/forwarder.cpp
index accfb38..7e28db2 100644
--- a/daemon/fw/forwarder.cpp
+++ b/daemon/fw/forwarder.cpp
@@ -132,8 +132,8 @@
   // is pending?
   if (!pitEntry->hasInRecords()) {
     m_cs.find(interest,
-              bind(&Forwarder::onContentStoreHit, this, ref(inFace), pitEntry, _1, _2),
-              bind(&Forwarder::onContentStoreMiss, this, ref(inFace), pitEntry, _1));
+              bind(&Forwarder::onContentStoreHit, this, std::ref(inFace), pitEntry, _1, _2),
+              bind(&Forwarder::onContentStoreMiss, this, std::ref(inFace), pitEntry, _1));
   }
   else {
     this->onContentStoreMiss(inFace, pitEntry, interest);
@@ -511,15 +511,7 @@
 
   scheduler::cancel(pitEntry->expiryTimer);
 
-  pitEntry->expiryTimer = scheduler::schedule(duration,
-    bind(&Forwarder::onInterestFinalize, this, pitEntry));
-}
-
-static inline void
-insertNonceToDnl(DeadNonceList& dnl, const pit::Entry& pitEntry,
-                 const pit::OutRecord& outRecord)
-{
-  dnl.add(pitEntry.getName(), outRecord.getLastNonce());
+  pitEntry->expiryTimer = scheduler::schedule(duration, [=] { onInterestFinalize(pitEntry); });
 }
 
 void
@@ -540,13 +532,14 @@
   // Dead Nonce List insert
   if (upstream == nullptr) {
     // insert all outgoing Nonces
-    const pit::OutRecordCollection& outRecords = pitEntry.getOutRecords();
-    std::for_each(outRecords.begin(), outRecords.end(),
-                  bind(&insertNonceToDnl, ref(m_deadNonceList), cref(pitEntry), _1));
+    const auto& outRecords = pitEntry.getOutRecords();
+    std::for_each(outRecords.begin(), outRecords.end(), [&] (const auto& outRecord) {
+      m_deadNonceList.add(pitEntry.getName(), outRecord.getLastNonce());
+    });
   }
   else {
     // insert outgoing Nonce of a specific face
-    pit::OutRecordCollection::iterator outRecord = pitEntry.getOutRecord(*upstream);
+    auto outRecord = pitEntry.getOutRecord(*upstream);
     if (outRecord != pitEntry.getOutRecords().end()) {
       m_deadNonceList.add(pitEntry.getName(), outRecord->getLastNonce());
     }
diff --git a/daemon/fw/ncc-strategy.cpp b/daemon/fw/ncc-strategy.cpp
index bdb322a..0f7f4e1 100644
--- a/daemon/fw/ncc-strategy.cpp
+++ b/daemon/fw/ncc-strategy.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2017,  Regents of the University of California,
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -32,9 +32,9 @@
 
 NFD_REGISTER_STRATEGY(NccStrategy);
 
-const time::microseconds NccStrategy::DEFER_FIRST_WITHOUT_BEST_FACE = time::microseconds(4000);
-const time::microseconds NccStrategy::DEFER_RANGE_WITHOUT_BEST_FACE = time::microseconds(75000);
-const time::nanoseconds NccStrategy::MEASUREMENTS_LIFETIME = time::seconds(16);
+const time::microseconds NccStrategy::DEFER_FIRST_WITHOUT_BEST_FACE = 4_ms;
+const time::microseconds NccStrategy::DEFER_RANGE_WITHOUT_BEST_FACE = 75_ms;
+const time::nanoseconds NccStrategy::MEASUREMENTS_LIFETIME = 16_s;
 
 NccStrategy::NccStrategy(Forwarder& forwarder, const Name& name)
   : Strategy(forwarder)
@@ -118,7 +118,7 @@
   }
 
   if (nUpstreams > 0) {
-    pitEntryInfo->maxInterval = std::max(time::microseconds(1),
+    pitEntryInfo->maxInterval = std::max(1_us,
       time::microseconds((2 * deferRange.count() + nUpstreams - 1) / nUpstreams));
   }
   else {
@@ -142,7 +142,7 @@
   if (pitEntry == nullptr) {
     return;
   }
-  pit::InRecordCollection::const_iterator inRecord = pitEntry->getInRecord(*inFace);
+  auto inRecord = pitEntry->getInRecord(*inFace);
   if (inRecord == pitEntry->in_end()) {
     return;
   }
@@ -163,10 +163,9 @@
     this->sendInterest(pitEntry, *previousFace, interest);
   }
 
-  const fib::NextHopList& nexthops = fibEntry.getNextHops();
   bool isForwarded = false;
-  for (fib::NextHopList::const_iterator it = nexthops.begin(); it != nexthops.end(); ++it) {
-    Face& face = it->getFace();
+  for (const auto& nexthop : fibEntry.getNextHops()) {
+    Face& face = nexthop.getFace();
     if (!wouldViolateScope(*inFace, interest, face) &&
         canForwardToLegacy(*pitEntry, face)) {
       isForwarded = true;
@@ -271,9 +270,9 @@
   return *info;
 }
 
-const time::microseconds NccStrategy::MeasurementsEntryInfo::INITIAL_PREDICTION = time::microseconds(8192);
-const time::microseconds NccStrategy::MeasurementsEntryInfo::MIN_PREDICTION = time::microseconds(127);
-const time::microseconds NccStrategy::MeasurementsEntryInfo::MAX_PREDICTION = time::milliseconds(160);
+const time::microseconds NccStrategy::MeasurementsEntryInfo::INITIAL_PREDICTION = 8192_us;
+const time::microseconds NccStrategy::MeasurementsEntryInfo::MIN_PREDICTION = 127_us;
+const time::microseconds NccStrategy::MeasurementsEntryInfo::MAX_PREDICTION = 160_ms;
 
 NccStrategy::MeasurementsEntryInfo::MeasurementsEntryInfo()
   : prediction(INITIAL_PREDICTION)
diff --git a/daemon/fw/retx-suppression-exponential.cpp b/daemon/fw/retx-suppression-exponential.cpp
index f2ff1b2..b110588 100644
--- a/daemon/fw/retx-suppression-exponential.cpp
+++ b/daemon/fw/retx-suppression-exponential.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2017,  Regents of the University of California,
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -28,11 +28,9 @@
 namespace nfd {
 namespace fw {
 
-const RetxSuppressionExponential::Duration RetxSuppressionExponential::DEFAULT_INITIAL_INTERVAL =
-    time::milliseconds(1);
-const float RetxSuppressionExponential::DEFAULT_MULTIPLIER = 2.0;
-const RetxSuppressionExponential::Duration RetxSuppressionExponential::DEFAULT_MAX_INTERVAL =
-    time::milliseconds(250);
+const RetxSuppressionExponential::Duration RetxSuppressionExponential::DEFAULT_INITIAL_INTERVAL = 1_ms;
+const RetxSuppressionExponential::Duration RetxSuppressionExponential::DEFAULT_MAX_INTERVAL = 250_ms;
+const float RetxSuppressionExponential::DEFAULT_MULTIPLIER = 2.0f;
 
 class RetxSuppressionExponential::PitInfo : public StrategyInfo
 {
@@ -63,8 +61,8 @@
   , m_multiplier(multiplier)
   , m_maxInterval(maxInterval)
 {
-  BOOST_ASSERT(initialInterval > time::milliseconds::zero());
-  BOOST_ASSERT(multiplier >= 1.0);
+  BOOST_ASSERT(initialInterval > 0_us);
+  BOOST_ASSERT(multiplier >= 1.0f);
   BOOST_ASSERT(maxInterval >= initialInterval);
 }
 
@@ -76,9 +74,9 @@
     return RetxSuppressionResult::NEW;
   }
 
-  time::steady_clock::TimePoint lastOutgoing = getLastOutgoing(pitEntry);
-  time::steady_clock::TimePoint now = time::steady_clock::now();
-  time::steady_clock::Duration sinceLastOutgoing = now - lastOutgoing;
+  auto lastOutgoing = getLastOutgoing(pitEntry);
+  auto now = time::steady_clock::now();
+  auto sinceLastOutgoing = now - lastOutgoing;
 
   PitInfo* pi = pitEntry.insertStrategyInfo<PitInfo>(m_initialInterval).first;
   bool shouldSuppress = sinceLastOutgoing < pi->suppressionInterval;
@@ -102,9 +100,9 @@
     return RetxSuppressionResult::NEW;
   }
 
-  time::steady_clock::TimePoint lastOutgoing = outRecord->getLastRenewed();
-  time::steady_clock::TimePoint now = time::steady_clock::now();
-  time::steady_clock::Duration sinceLastOutgoing = now - lastOutgoing;
+  auto lastOutgoing = outRecord->getLastRenewed();
+  auto now = time::steady_clock::now();
+  auto sinceLastOutgoing = now - lastOutgoing;
 
   // insertStrategyInfo does not insert m_initialInterval again if it already exists
   PitInfo* pi = outRecord->insertStrategyInfo<PitInfo>(m_initialInterval).first;
diff --git a/daemon/fw/retx-suppression-fixed.cpp b/daemon/fw/retx-suppression-fixed.cpp
index 6245ae3..dddd742 100644
--- a/daemon/fw/retx-suppression-fixed.cpp
+++ b/daemon/fw/retx-suppression-fixed.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2017,  Regents of the University of California,
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -28,12 +28,12 @@
 namespace nfd {
 namespace fw {
 
-const time::milliseconds RetxSuppressionFixed::DEFAULT_MIN_RETX_INTERVAL(100);
+const time::milliseconds RetxSuppressionFixed::DEFAULT_MIN_RETX_INTERVAL = 100_ms;
 
 RetxSuppressionFixed::RetxSuppressionFixed(const time::milliseconds& minRetxInterval)
   : m_minRetxInterval(minRetxInterval)
 {
-  BOOST_ASSERT(minRetxInterval > time::milliseconds::zero());
+  BOOST_ASSERT(minRetxInterval > 0_ms);
 }
 
 RetxSuppressionResult
diff --git a/daemon/nfd.cpp b/daemon/nfd.cpp
index f96720f..28f6989 100644
--- a/daemon/nfd.cpp
+++ b/daemon/nfd.cpp
@@ -89,7 +89,7 @@
   m_netmon->onNetworkStateChanged.connect([this] {
       // delay stages, so if multiple events are triggered in short sequence,
       // only one auto-detection procedure is triggered
-      m_reloadConfigEvent = scheduler::schedule(time::seconds(5),
+      m_reloadConfigEvent = scheduler::schedule(5_s,
         [this] {
           NFD_LOG_INFO("Network change detected, reloading face section of the config file...");
           this->reloadConfigFileFaceSection();
diff --git a/daemon/table/cs-policy-priority-fifo.cpp b/daemon/table/cs-policy-priority-fifo.cpp
index 934d759..7984739 100644
--- a/daemon/table/cs-policy-priority-fifo.cpp
+++ b/daemon/table/cs-policy-priority-fifo.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -118,7 +118,7 @@
   else {
     entryInfo->queueType = QUEUE_FIFO;
     entryInfo->moveStaleEventId = scheduler::schedule(i->getData().getFreshnessPeriod(),
-                                                      bind(&PriorityFifoPolicy::moveToStaleQueue, this, i));
+                                                      [=] { moveToStaleQueue(i); });
   }
 
   Queue& queue = m_queues[entryInfo->queueType];
diff --git a/daemon/table/cs.cpp b/daemon/table/cs.cpp
index 00dc9ee..1663d8f 100644
--- a/daemon/table/cs.cpp
+++ b/daemon/table/cs.cpp
@@ -155,7 +155,7 @@
 iterator
 Cs::findLeftmost(const Interest& interest, iterator first, iterator last) const
 {
-  return std::find_if(first, last, bind(&cs::EntryImpl::canSatisfy, _1, interest));
+  return std::find_if(first, last, [&interest] (const auto& entry) { return entry.canSatisfy(interest); });
 }
 
 iterator
@@ -193,7 +193,7 @@
 iterator
 Cs::findRightmostAmongExact(const Interest& interest, iterator first, iterator last) const
 {
-  return find_last_if(first, last, bind(&EntryImpl::canSatisfy, _1, interest));
+  return find_last_if(first, last, [&interest] (const auto& entry) { return entry.canSatisfy(interest); });
 }
 
 void
diff --git a/daemon/table/dead-nonce-list.cpp b/daemon/table/dead-nonce-list.cpp
index d732a90..144e68e 100644
--- a/daemon/table/dead-nonce-list.cpp
+++ b/daemon/table/dead-nonce-list.cpp
@@ -31,8 +31,8 @@
 
 NFD_LOG_INIT(DeadNonceList);
 
-const time::nanoseconds DeadNonceList::DEFAULT_LIFETIME = time::seconds(6);
-const time::nanoseconds DeadNonceList::MIN_LIFETIME = time::milliseconds(1);
+const time::nanoseconds DeadNonceList::DEFAULT_LIFETIME = 6_s;
+const time::nanoseconds DeadNonceList::MIN_LIFETIME = 1_ms;
 const size_t DeadNonceList::INITIAL_CAPACITY = (1 << 7);
 const size_t DeadNonceList::MIN_CAPACITY = (1 << 3);
 const size_t DeadNonceList::MAX_CAPACITY = (1 << 24);
@@ -58,9 +58,8 @@
     m_queue.push_back(MARK);
   }
 
-  m_markEvent = scheduler::schedule(m_markInterval, bind(&DeadNonceList::mark, this));
-  m_adjustCapacityEvent = scheduler::schedule(m_adjustCapacityInterval,
-                                              bind(&DeadNonceList::adjustCapacity, this));
+  m_markEvent = scheduler::schedule(m_markInterval, [this] { mark(); });
+  m_adjustCapacityEvent = scheduler::schedule(m_adjustCapacityInterval, [this] { adjustCapacity(); });
 }
 
 DeadNonceList::~DeadNonceList()
@@ -125,15 +124,13 @@
 
   NFD_LOG_TRACE("mark nMarks=" << nMarks);
 
-  scheduler::schedule(m_markInterval, bind(&DeadNonceList::mark, this));
+  m_markEvent = scheduler::schedule(m_markInterval, [this] { mark(); });
 }
 
 void
 DeadNonceList::adjustCapacity()
 {
-  std::pair<std::multiset<size_t>::iterator, std::multiset<size_t>::iterator> equalRange =
-    m_actualMarkCounts.equal_range(EXPECTED_MARK_COUNT);
-
+  auto equalRange = m_actualMarkCounts.equal_range(EXPECTED_MARK_COUNT);
   if (equalRange.second == m_actualMarkCounts.begin()) {
     // all counts are above expected count, adjust down
     m_capacity = std::max(MIN_CAPACITY,
@@ -148,11 +145,9 @@
   }
 
   m_actualMarkCounts.clear();
-
   this->evictEntries();
 
-  m_adjustCapacityEvent = scheduler::schedule(m_adjustCapacityInterval,
-                                              bind(&DeadNonceList::adjustCapacity, this));
+  m_adjustCapacityEvent = scheduler::schedule(m_adjustCapacityInterval, [this] { adjustCapacity(); });
 }
 
 void
diff --git a/daemon/table/fib.cpp b/daemon/table/fib.cpp
index 0a9522a..7b6d21a 100644
--- a/daemon/table/fib.cpp
+++ b/daemon/table/fib.cpp
@@ -93,12 +93,12 @@
   name_tree::Entry& nte = m_nameTree.lookup(prefix);
   Entry* entry = nte.getFibEntry();
   if (entry != nullptr) {
-    return std::make_pair(entry, false);
+    return {entry, false};
   }
 
   nte.setFibEntry(make_unique<Entry>(prefix));
   ++m_nItems;
-  return std::make_pair(nte.getFibEntry(), true);
+  return {nte.getFibEntry(), true};
 }
 
 void
diff --git a/daemon/table/measurements.cpp b/daemon/table/measurements.cpp
index 4d84746..651a83b 100644
--- a/daemon/table/measurements.cpp
+++ b/daemon/table/measurements.cpp
@@ -50,8 +50,7 @@
   entry = nte.getMeasurementsEntry();
 
   entry->m_expiry = time::steady_clock::now() + getInitialLifetime();
-  entry->m_cleanup = scheduler::schedule(getInitialLifetime(),
-                                         bind(&Measurements::cleanup, this, ref(*entry)));
+  entry->m_cleanup = scheduler::schedule(getInitialLifetime(), [=] { cleanup(*entry); });
 
   return *entry;
 }
@@ -137,7 +136,7 @@
 
   scheduler::cancel(entry.m_cleanup);
   entry.m_expiry = expiry;
-  entry.m_cleanup = scheduler::schedule(lifetime, bind(&Measurements::cleanup, this, ref(entry)));
+  entry.m_cleanup = scheduler::schedule(lifetime, [&] { cleanup(entry); });
 }
 
 void
diff --git a/daemon/table/measurements.hpp b/daemon/table/measurements.hpp
index d110ed6..c72ba28 100644
--- a/daemon/table/measurements.hpp
+++ b/daemon/table/measurements.hpp
@@ -167,7 +167,7 @@
 inline time::nanoseconds
 Measurements::getInitialLifetime()
 {
-  return time::seconds(4);
+  return 4_s;
 }
 
 inline size_t
diff --git a/daemon/table/name-tree-iterator.cpp b/daemon/table/name-tree-iterator.cpp
index 56c0360..f295d9c 100644
--- a/daemon/table/name-tree-iterator.cpp
+++ b/daemon/table/name-tree-iterator.cpp
@@ -46,7 +46,7 @@
 }
 
 Iterator::Iterator(shared_ptr<EnumerationImpl> impl, const Entry* ref)
-  : m_impl(impl)
+  : m_impl(std::move(impl))
   , m_entry(nullptr)
   , m_ref(ref)
   , m_state(0)
diff --git a/daemon/table/name-tree-iterator.hpp b/daemon/table/name-tree-iterator.hpp
index 87a93f7..973c961 100644
--- a/daemon/table/name-tree-iterator.hpp
+++ b/daemon/table/name-tree-iterator.hpp
@@ -69,9 +69,15 @@
 
 /** \brief NameTree iterator
  */
-class Iterator : public std::iterator<std::forward_iterator_tag, const Entry>
+class Iterator
 {
 public:
+  using iterator_category = std::forward_iterator_tag;
+  using value_type        = const Entry;
+  using difference_type   = std::ptrdiff_t;
+  using pointer           = value_type*;
+  using reference         = value_type&;
+
   Iterator();
 
   Iterator(shared_ptr<EnumerationImpl> impl, const Entry* ref);
diff --git a/daemon/table/pit-iterator.hpp b/daemon/table/pit-iterator.hpp
index 434dfd0..35e02c5 100644
--- a/daemon/table/pit-iterator.hpp
+++ b/daemon/table/pit-iterator.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -34,9 +34,15 @@
 
 /** \brief PIT iterator
  */
-class Iterator : public std::iterator<std::forward_iterator_tag, const Entry>
+class Iterator
 {
 public:
+  using iterator_category = std::forward_iterator_tag;
+  using value_type        = const Entry;
+  using difference_type   = std::ptrdiff_t;
+  using pointer           = value_type*;
+  using reference         = value_type&;
+
   /** \brief constructor
    *  \param ntIt a name tree iterator that visits name tree entries with one or more PIT entries
    *  \param iPitEntry make this iterator to dereference to the i-th PIT entry in name tree entry
