diff --git a/daemon/table/dead-nonce-list.cpp b/daemon/table/dead-nonce-list.cpp
index a5bd9f8..720a415 100644
--- a/daemon/table/dead-nonce-list.cpp
+++ b/daemon/table/dead-nonce-list.cpp
@@ -33,16 +33,16 @@
 
 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);
+const size_t DeadNonceList::INITIAL_CAPACITY = 1 << 7;
+const size_t DeadNonceList::MIN_CAPACITY = 1 << 3;
+const size_t DeadNonceList::MAX_CAPACITY = 1 << 24;
 const DeadNonceList::Entry DeadNonceList::MARK = 0;
 const size_t DeadNonceList::EXPECTED_MARK_COUNT = 5;
 const double DeadNonceList::CAPACITY_UP = 1.2;
 const double DeadNonceList::CAPACITY_DOWN = 0.9;
-const size_t DeadNonceList::EVICT_LIMIT = (1 << 6);
+const size_t DeadNonceList::EVICT_LIMIT = 1 << 6;
 
-DeadNonceList::DeadNonceList(const time::nanoseconds& lifetime)
+DeadNonceList::DeadNonceList(time::nanoseconds lifetime)
   : m_lifetime(lifetime)
   , m_queue(m_index.get<0>())
   , m_ht(m_index.get<1>())
@@ -133,14 +133,12 @@
   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,
-                          static_cast<size_t>(m_capacity * CAPACITY_DOWN));
+    m_capacity = std::max(MIN_CAPACITY, static_cast<size_t>(m_capacity * CAPACITY_DOWN));
     NFD_LOG_TRACE("adjustCapacity DOWN capacity=" << m_capacity);
   }
   else if (equalRange.first == m_actualMarkCounts.end()) {
     // all counts are below expected count, adjust up
-    m_capacity = std::min(MAX_CAPACITY,
-                          static_cast<size_t>(m_capacity * CAPACITY_UP));
+    m_capacity = std::min(MAX_CAPACITY, static_cast<size_t>(m_capacity * CAPACITY_UP));
     NFD_LOG_TRACE("adjustCapacity UP capacity=" << m_capacity);
   }
 
diff --git a/daemon/table/dead-nonce-list.hpp b/daemon/table/dead-nonce-list.hpp
index 050da35..ccbf5a1 100644
--- a/daemon/table/dead-nonce-list.hpp
+++ b/daemon/table/dead-nonce-list.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-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -27,14 +27,15 @@
 #define NFD_DAEMON_TABLE_DEAD_NONCE_LIST_HPP
 
 #include "core/common.hpp"
-#include <boost/multi_index_container.hpp>
-#include <boost/multi_index/sequenced_index.hpp>
-#include <boost/multi_index/hashed_index.hpp>
 #include "core/scheduler.hpp"
 
+#include <boost/multi_index_container.hpp>
+#include <boost/multi_index/hashed_index.hpp>
+#include <boost/multi_index/sequenced_index.hpp>
+
 namespace nfd {
 
-/** \brief represents the Dead Nonce list
+/** \brief Represents the Dead Nonce List
  *
  *  The Dead Nonce List is a global table that supplements PIT for loop detection.
  *  When a Nonce is erased (dead) from PIT entry, the Nonce and the Interest Name is added to
@@ -54,7 +55,7 @@
 class DeadNonceList : noncopyable
 {
 public:
-  /** \brief constructs the Dead Nonce List
+  /** \brief Constructs the Dead Nonce List
    *  \param lifetime duration of the expected lifetime of each nonce,
    *         must be no less than MIN_LIFETIME.
    *         This should be set to the duration in which most loops would have occured.
@@ -62,17 +63,17 @@
    *  \throw std::invalid_argument if lifetime is less than MIN_LIFETIME
    */
   explicit
-  DeadNonceList(const time::nanoseconds& lifetime = DEFAULT_LIFETIME);
+  DeadNonceList(time::nanoseconds lifetime = DEFAULT_LIFETIME);
 
   ~DeadNonceList();
 
-  /** \brief determines if name+nonce exists
+  /** \brief Determines if name+nonce exists
    *  \return true if name+nonce exists
    */
   bool
   has(const Name& name, uint32_t nonce) const;
 
-  /** \brief records name+nonce
+  /** \brief Records name+nonce
    */
   void
   add(const Name& name, uint32_t nonce);
@@ -85,8 +86,11 @@
 
   /** \return expected lifetime
    */
-  const time::nanoseconds&
-  getLifetime() const;
+  time::nanoseconds
+  getLifetime() const
+  {
+    return m_lifetime;
+  }
 
 private: // Entry and Index
   typedef uint64_t Entry;
@@ -108,17 +112,17 @@
   typedef Index::nth_index<1>::type Hashtable;
 
 private: // actual lifetime estimation and capacity control
-  /** \return number of MARKs in the index
+  /** \brief Return the number of MARKs in the index
    */
   size_t
   countMarks() const;
 
-  /** \brief add a MARK, then record number of MARKs in m_actualMarkCounts
+  /** \brief Add a MARK, then record number of MARKs in m_actualMarkCounts
    */
   void
   mark();
 
-  /** \brief adjust capacity according to m_actualMarkCounts
+  /** \brief Adjust capacity according to m_actualMarkCounts
    *
    *  If all counts are above EXPECTED_MARK_COUNT, reduce capacity to m_capacity * CAPACITY_DOWN.
    *  If all counts are below EXPECTED_MARK_COUNT, increase capacity to m_capacity * CAPACITY_UP.
@@ -126,16 +130,15 @@
   void
   adjustCapacity();
 
-  /** \brief evict some entries if index is over capacity
+  /** \brief Evict some entries if index is over capacity
    */
   void
   evictEntries();
 
 public:
-  /// default entry lifetime
+  /// Default entry lifetime
   static const time::nanoseconds DEFAULT_LIFETIME;
-
-  /// minimum entry lifetime
+  /// Minimum entry lifetime
   static const time::nanoseconds MIN_LIFETIME;
 
 private:
@@ -148,7 +151,7 @@
 
   // ---- current capacity and hard limits
 
-  /** \brief current capacity of index
+  /** \brief Current capacity of index
    *
    *  The index size is maintained to be near this capacity.
    *
@@ -159,13 +162,13 @@
 
   static const size_t INITIAL_CAPACITY;
 
-  /** \brief minimum capacity
+  /** \brief Minimum capacity
    *
    *  This is to ensure correct algorithm operations.
    */
   static const size_t MIN_CAPACITY;
 
-  /** \brief maximum capacity
+  /** \brief Maximum capacity
    *
    *  This is to limit memory usage.
    */
@@ -173,7 +176,7 @@
 
   // ---- actual entry lifetime estimation
 
-  /** \brief the MARK for capacity
+  /** \brief The MARK for capacity
    *
    *  The MARK doesn't have a distinct type.
    *  Entry is a hash. The hash function should have non-invertible property,
@@ -181,42 +184,31 @@
    */
   static const Entry MARK;
 
-  /** \brief expected number of MARKs in the index
+  /** \brief Expected number of MARKs in the index
    */
   static const size_t EXPECTED_MARK_COUNT;
 
-  /** \brief number of MARKs in the index after each MARK insertion
+  /** \brief Number of MARKs in the index after each MARK insertion
    *
-   *  adjustCapacity uses this to determine whether and how to adjust capcity,
+   *  adjustCapacity() uses this to determine whether and how to adjust capcity,
    *  and then clears this list.
    */
   std::multiset<size_t> m_actualMarkCounts;
 
   time::nanoseconds m_markInterval;
-
   scheduler::EventId m_markEvent;
 
   // ---- capacity adjustments
 
   static const double CAPACITY_UP;
-
   static const double CAPACITY_DOWN;
-
   time::nanoseconds m_adjustCapacityInterval;
-
   scheduler::EventId m_adjustCapacityEvent;
 
-  /** \brief maximum number of entries to evict at each operation if index is over capacity
-   */
+  /// Maximum number of entries to evict at each operation if index is over capacity
   static const size_t EVICT_LIMIT;
 };
 
-inline const time::nanoseconds&
-DeadNonceList::getLifetime() const
-{
-  return m_lifetime;
-}
-
 } // namespace nfd
 
 #endif // NFD_DAEMON_TABLE_DEAD_NONCE_LIST_HPP
diff --git a/daemon/table/fib-entry.cpp b/daemon/table/fib-entry.cpp
index 53dd584..bb49979 100644
--- a/daemon/table/fib-entry.cpp
+++ b/daemon/table/fib-entry.cpp
@@ -30,7 +30,6 @@
 
 Entry::Entry(const Name& prefix)
   : m_prefix(prefix)
-  , m_nameTreeEntry(nullptr)
 {
 }
 
diff --git a/daemon/table/fib-entry.hpp b/daemon/table/fib-entry.hpp
index 5571da3..e0edcc0 100644
--- a/daemon/table/fib-entry.hpp
+++ b/daemon/table/fib-entry.hpp
@@ -112,7 +112,7 @@
   Name m_prefix;
   NextHopList m_nextHops;
 
-  name_tree::Entry* m_nameTreeEntry;
+  name_tree::Entry* m_nameTreeEntry = nullptr;
 
   friend class name_tree::Entry;
 };
diff --git a/daemon/table/fib-nexthop.cpp b/daemon/table/fib-nexthop.cpp
deleted file mode 100644
index 2b946c5..0000000
--- a/daemon/table/fib-nexthop.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2014-2019,  Regents of the University of California,
- *                           Arizona Board of Regents,
- *                           Colorado State University,
- *                           University Pierre & Marie Curie, Sorbonne University,
- *                           Washington University in St. Louis,
- *                           Beijing Institute of Technology,
- *                           The University of Memphis.
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "fib-nexthop.hpp"
-
-namespace nfd {
-namespace fib {
-
-NextHop::NextHop(Face& face, EndpointId endpointId)
-  : m_face(&face)
-  , m_endpointId(endpointId)
-  , m_cost(0)
-{
-}
-
-} // namespace fib
-} // namespace nfd
diff --git a/daemon/table/fib-nexthop.hpp b/daemon/table/fib-nexthop.hpp
index e0cf599..80609ba 100644
--- a/daemon/table/fib-nexthop.hpp
+++ b/daemon/table/fib-nexthop.hpp
@@ -32,14 +32,16 @@
 namespace nfd {
 namespace fib {
 
-/** \class NextHop
- *  \brief represents a nexthop record in FIB entry
+/** \brief Represents a nexthop record in a FIB entry
  */
 class NextHop
 {
 public:
-  explicit
-  NextHop(Face& face, EndpointId endpointId);
+  NextHop(Face& face, EndpointId endpointId)
+    : m_face(&face)
+    , m_endpointId(endpointId)
+  {
+  }
 
   Face&
   getFace() const
@@ -66,9 +68,9 @@
   }
 
 private:
-  Face* m_face;
+  Face* m_face; // pointer instead of reference so that NextHop is movable
   EndpointId m_endpointId;
-  uint64_t m_cost;
+  uint64_t m_cost = 0;
 };
 
 } // namespace fib
diff --git a/daemon/table/fib.cpp b/daemon/table/fib.cpp
index 4c74e3f..2f3deab 100644
--- a/daemon/table/fib.cpp
+++ b/daemon/table/fib.cpp
@@ -44,7 +44,6 @@
 
 Fib::Fib(NameTree& nameTree)
   : m_nameTree(nameTree)
-  , m_nItems(0)
 {
 }
 
diff --git a/daemon/table/fib.hpp b/daemon/table/fib.hpp
index c7fb9cc..fc73a7d 100644
--- a/daemon/table/fib.hpp
+++ b/daemon/table/fib.hpp
@@ -44,7 +44,7 @@
 
 namespace fib {
 
-/** \brief represents the Forwarding Information Base (FIB)
+/** \brief Represents the Forwarding Information Base (FIB)
  */
 class Fib : noncopyable
 {
@@ -59,26 +59,26 @@
   }
 
 public: // lookup
-  /** \brief performs a longest prefix match
+  /** \brief Performs a longest prefix match
    */
   const Entry&
   findLongestPrefixMatch(const Name& prefix) const;
 
-  /** \brief performs a longest prefix match
+  /** \brief Performs a longest prefix match
    *
-   *  This is equivalent to .findLongestPrefixMatch(pitEntry.getName())
+   *  This is equivalent to `findLongestPrefixMatch(pitEntry.getName())`
    */
   const Entry&
   findLongestPrefixMatch(const pit::Entry& pitEntry) const;
 
-  /** \brief performs a longest prefix match
+  /** \brief Performs a longest prefix match
    *
-   *  This is equivalent to .findLongestPrefixMatch(measurementsEntry.getName())
+   *  This is equivalent to `findLongestPrefixMatch(measurementsEntry.getName())`
    */
   const Entry&
   findLongestPrefixMatch(const measurements::Entry& measurementsEntry) const;
 
-  /** \brief performs an exact match lookup
+  /** \brief Performs an exact match lookup
    */
   Entry*
   findExactMatch(const Name& prefix);
@@ -92,8 +92,8 @@
     return FIB_MAX_DEPTH;
   }
 
-  /** \brief find or insert a FIB entry
-   *  \param prefix FIB entry name; it must have no more than \c getMaxDepth() components.
+  /** \brief Find or insert a FIB entry
+   *  \param prefix FIB entry name; it must not have more than \c getMaxDepth() components.
    *  \return the entry, and true for new entry or false for existing entry
    */
   std::pair<Entry*, bool>
@@ -105,12 +105,12 @@
   void
   erase(const Entry& entry);
 
-  /** \brief removes the NextHop record for \p face with a given \p endpointId
+  /** \brief Remove the NextHop record for the given \p face and \p endpointId
    */
   void
   removeNextHop(Entry& entry, const Face& face, EndpointId endpointId);
 
-  /** \brief removes the NextHop record for \p face for any \p endpointId
+  /** \brief Remove all NextHop records for \p face
    */
   void
   removeNextHopByFace(Entry& entry, const Face& face);
@@ -120,9 +120,9 @@
   typedef boost::range_iterator<Range>::type const_iterator;
 
   /** \return an iterator to the beginning
-   *  \note Iteration order is implementation-defined.
+   *  \note The iteration order is implementation-defined.
    *  \warning Undefined behavior may occur if a FIB/PIT/Measurements/StrategyChoice entry
-   *           is inserted or erased during enumeration.
+   *           is inserted or erased during iteration.
    */
   const_iterator
   begin() const
@@ -149,7 +149,7 @@
   void
   erase(name_tree::Entry* nte, bool canDeleteNte = true);
 
-  /** \brief erase \p entry if it contains no nexthop record
+  /** \brief Erase \p entry if it contains no nexthop records
    */
   void
   eraseIfEmpty(Entry& entry);
@@ -159,9 +159,9 @@
 
 private:
   NameTree& m_nameTree;
-  size_t m_nItems;
+  size_t m_nItems = 0;
 
-  /** \brief the empty FIB entry.
+  /** \brief The empty FIB entry.
    *
    *  This entry has no nexthops.
    *  It is returned by findLongestPrefixMatch if nothing is matched.
diff --git a/daemon/table/measurements-entry.cpp b/daemon/table/measurements-entry.cpp
deleted file mode 100644
index 60138af..0000000
--- a/daemon/table/measurements-entry.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016,  Regents of the University of California,
- *                           Arizona Board of Regents,
- *                           Colorado State University,
- *                           University Pierre & Marie Curie, Sorbonne University,
- *                           Washington University in St. Louis,
- *                           Beijing Institute of Technology,
- *                           The University of Memphis.
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "measurements-entry.hpp"
-
-namespace nfd {
-namespace measurements {
-
-Entry::Entry(const Name& name)
-  : m_name(name)
-  , m_expiry(time::steady_clock::TimePoint::min())
-  , m_nameTreeEntry(nullptr)
-{
-}
-
-} // namespace measurements
-} // namespace nfd
diff --git a/daemon/table/measurements-entry.hpp b/daemon/table/measurements-entry.hpp
index 53f1a05..039fe54 100644
--- a/daemon/table/measurements-entry.hpp
+++ b/daemon/table/measurements-entry.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-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -37,13 +37,16 @@
 
 namespace measurements {
 
-/** \brief represents a Measurements entry
+/** \brief Represents a Measurements entry
  */
 class Entry : public StrategyInfoHost, noncopyable
 {
 public:
   explicit
-  Entry(const Name& name);
+  Entry(const Name& name)
+    : m_name(name)
+  {
+  }
 
   const Name&
   getName() const
@@ -53,10 +56,10 @@
 
 private:
   Name m_name;
-  time::steady_clock::TimePoint m_expiry;
+  time::steady_clock::TimePoint m_expiry = time::steady_clock::TimePoint::min();
   scheduler::EventId m_cleanup;
 
-  name_tree::Entry* m_nameTreeEntry;
+  name_tree::Entry* m_nameTreeEntry = nullptr;
 
   friend class Measurements;
   friend class name_tree::Entry;
diff --git a/daemon/table/measurements.cpp b/daemon/table/measurements.cpp
index 651a83b..8ab89cc 100644
--- a/daemon/table/measurements.cpp
+++ b/daemon/table/measurements.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-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -33,7 +33,6 @@
 
 Measurements::Measurements(NameTree& nameTree)
   : m_nameTree(nameTree)
-  , m_nItems(0)
 {
 }
 
@@ -128,7 +127,7 @@
 {
   BOOST_ASSERT(m_nameTree.getEntry(entry) != nullptr);
 
-  time::steady_clock::TimePoint expiry = time::steady_clock::now() + lifetime;
+  auto expiry = time::steady_clock::now() + lifetime;
   if (entry.m_expiry >= expiry) {
     // has longer lifetime, not extending
     return;
diff --git a/daemon/table/measurements.hpp b/daemon/table/measurements.hpp
index c72ba28..342d753 100644
--- a/daemon/table/measurements.hpp
+++ b/daemon/table/measurements.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-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -41,23 +41,23 @@
 
 namespace measurements {
 
-/** \brief a predicate that accepts or rejects an entry
+/** \brief A predicate that accepts or rejects an entry
  */
-typedef std::function<bool(const Entry&)> EntryPredicate;
+using EntryPredicate = std::function<bool(const Entry&)>;
 
-/** \brief an \c EntryPredicate that accepts any entry
+/** \brief An \c EntryPredicate that accepts any entry
  */
 class AnyEntry
 {
 public:
   bool
-  operator()(const Entry& entry) const
+  operator()(const Entry&) const
   {
     return true;
   }
 };
 
-/** \brief an \c EntryPredicate that accepts an entry if it has StrategyInfo of type T
+/** \brief An \c EntryPredicate that accepts an entry if it has StrategyInfo of type T
  */
 template<typename T>
 class EntryWithStrategyInfo
@@ -70,7 +70,7 @@
   }
 };
 
-/** \brief the Measurements table
+/** \brief The Measurements table
  *
  *  The Measurements table is a data structure for forwarding strategies to store per name prefix
  *  measurements. A strategy can access this table via \c Strategy::getMeasurements(), and then
@@ -90,7 +90,7 @@
     return NameTree::getMaxDepth();
   }
 
-  /** \brief find or insert an entry by name
+  /** \brief Find or insert an entry by name
    *
    *  An entry name can have at most \c getMaxDepth() components. If \p name exceeds this limit,
    *  it is truncated to the first \c getMaxDepth() components.
@@ -98,45 +98,47 @@
   Entry&
   get(const Name& name);
 
-  /** \brief equivalent to `get(fibEntry.getPrefix())`
+  /** \brief Equivalent to `get(fibEntry.getPrefix())`
    */
   Entry&
   get(const fib::Entry& fibEntry);
 
-  /** \brief equivalent to
-   *         `get(pitEntry.getName(), std::min(pitEntry.getName().size(), getMaxDepth()))`
+  /** \brief Equivalent to `get(pitEntry.getName(), std::min(pitEntry.getName().size(), getMaxDepth()))`
    */
   Entry&
   get(const pit::Entry& pitEntry);
 
-  /** \brief find or insert a parent entry
+  /** \brief Find or insert a parent entry
    *  \retval nullptr child is the root entry
    *  \return get(child.getName().getPrefix(-1))
    */
   Entry*
   getParent(const Entry& child);
 
-  /** \brief perform a longest prefix match for \p name
+  /** \brief Perform a longest prefix match for \p name
    */
   Entry*
   findLongestPrefixMatch(const Name& name,
                          const EntryPredicate& pred = AnyEntry()) const;
 
-  /** \brief perform a longest prefix match for `pitEntry.getName()`
+  /** \brief Perform a longest prefix match for `pitEntry.getName()`
    */
   Entry*
   findLongestPrefixMatch(const pit::Entry& pitEntry,
                          const EntryPredicate& pred = AnyEntry()) const;
 
-  /** \brief perform an exact match
+  /** \brief Perform an exact match
    */
   Entry*
   findExactMatch(const Name& name) const;
 
   static time::nanoseconds
-  getInitialLifetime();
+  getInitialLifetime()
+  {
+    return 4_s;
+  }
 
-  /** \brief extend lifetime of an entry
+  /** \brief Extend lifetime of an entry
    *
    *  The entry will be kept until at least now()+lifetime.
    */
@@ -144,7 +146,10 @@
   extendLifetime(Entry& entry, const time::nanoseconds& lifetime);
 
   size_t
-  size() const;
+  size() const
+  {
+    return m_nItems;
+  }
 
 private:
   void
@@ -161,21 +166,9 @@
 
 private:
   NameTree& m_nameTree;
-  size_t m_nItems;
+  size_t m_nItems = 0;
 };
 
-inline time::nanoseconds
-Measurements::getInitialLifetime()
-{
-  return 4_s;
-}
-
-inline size_t
-Measurements::size() const
-{
-  return m_nItems;
-}
-
 } // namespace measurements
 
 using measurements::Measurements;
diff --git a/daemon/table/name-tree-entry.cpp b/daemon/table/name-tree-entry.cpp
index 889d84f..c145129 100644
--- a/daemon/table/name-tree-entry.cpp
+++ b/daemon/table/name-tree-entry.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-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -32,7 +32,6 @@
 Entry::Entry(const Name& name, Node* node)
   : m_name(name)
   , m_node(node)
-  , m_parent(nullptr)
 {
   BOOST_ASSERT(node != nullptr);
   BOOST_ASSERT(name.size() <= NameTree::getMaxDepth());
@@ -46,7 +45,6 @@
   BOOST_ASSERT(entry.getName() == this->getName().getPrefix(-1));
 
   m_parent = &entry;
-
   m_parent->m_children.push_back(this);
 }
 
@@ -103,7 +101,7 @@
   BOOST_ASSERT(pitEntry->m_nameTreeEntry == this);
 
   auto it = std::find_if(m_pitEntries.begin(), m_pitEntries.end(),
-    [pitEntry] (const shared_ptr<pit::Entry>& pitEntry2) { return pitEntry2.get() == pitEntry; });
+                         [pitEntry] (const auto& pitEntry2) { return pitEntry2.get() == pitEntry; });
   BOOST_ASSERT(it != m_pitEntries.end());
 
   pitEntry->m_nameTreeEntry = nullptr; // must be done before pitEntry is deallocated
diff --git a/daemon/table/name-tree-entry.hpp b/daemon/table/name-tree-entry.hpp
index 2fa0806..9c101ff 100644
--- a/daemon/table/name-tree-entry.hpp
+++ b/daemon/table/name-tree-entry.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-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -36,7 +36,7 @@
 
 class Node;
 
-/** \brief an entry in the name tree
+/** \brief An entry in the name tree
  */
 class Entry : noncopyable
 {
@@ -58,7 +58,7 @@
     return m_parent;
   }
 
-  /** \brief set parent of this entry
+  /** \brief Set parent of this entry
    *  \param entry entry of getName().getPrefix(-1)
    *  \pre getParent() == nullptr
    *  \post getParent() == &entry
@@ -67,20 +67,19 @@
   void
   setParent(Entry& entry);
 
-  /** \brief unset parent of this entry
+  /** \brief Unset parent of this entry
    *  \post getParent() == nullptr
    *  \post parent.getChildren() does not contain this
    */
   void
   unsetParent();
 
-  /** \retval true this entry has at least one child
-   *  \retval false this entry has no children
+  /** \brief Check whether this entry has any children
    */
   bool
   hasChildren() const
   {
-    return !this->getChildren().empty();
+    return !m_children.empty();
   }
 
   /** \return children of this entry
@@ -167,7 +166,7 @@
 private:
   Name m_name;
   Node* m_node;
-  Entry* m_parent;
+  Entry* m_parent = nullptr;
   std::vector<Entry*> m_children;
 
   unique_ptr<fib::Entry> m_fibEntry;
@@ -185,7 +184,7 @@
 class GetTableEntry
 {
 public:
-  /** \brief a function pointer to the getter on Entry class that returns ENTRY
+  /** \brief A function pointer to the getter on Entry class that returns ENTRY
    */
   using Getter = ENTRY* (Entry::*)() const;
 
diff --git a/daemon/table/name-tree.cpp b/daemon/table/name-tree.cpp
index 93bed3a..3eca24f 100644
--- a/daemon/table/name-tree.cpp
+++ b/daemon/table/name-tree.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-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -91,9 +91,9 @@
   Entry* nte = this->getEntry(pitEntry);
   BOOST_ASSERT(nte != nullptr);
   BOOST_ASSERT(std::count_if(nte->getPitEntries().begin(), nte->getPitEntries().end(),
-    [&pitEntry] (const shared_ptr<pit::Entry>& pitEntry1) {
-      return pitEntry1.get() == &pitEntry;
-    }) == 1);
+                             [&pitEntry] (const auto& pitEntry1) {
+                               return pitEntry1.get() == &pitEntry;
+                             }) == 1);
   return *nte;
 }
 
diff --git a/daemon/table/name-tree.hpp b/daemon/table/name-tree.hpp
index 4ecca80..1cb5f31 100644
--- a/daemon/table/name-tree.hpp
+++ b/daemon/table/name-tree.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-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -33,7 +33,7 @@
 namespace nfd {
 namespace name_tree {
 
-/** \brief a common index structure for FIB, PIT, StrategyChoice, and Measurements
+/** \brief A common index structure for FIB, PIT, StrategyChoice, and Measurements
  */
 class NameTree : noncopyable
 {
@@ -42,7 +42,7 @@
   NameTree(size_t nBuckets = 1024);
 
 public: // information
-  /** \brief maximum depth of the name tree
+  /** \brief Maximum depth of the name tree
    *
    *  Calling \c NameTree::lookup with a name with many components would cause the creation of many
    *  NameTree entries, which could take very long time. This constant limits the maximum number of
@@ -82,7 +82,7 @@
   }
 
 public: // mutation
-  /** \brief find or insert an entry by name
+  /** \brief Find or insert an entry by name
    *
    *  This method seeks a name tree entry of name \c name.getPrefix(prefixLen).
    *  If the entry does not exist, it is created along with all ancestors.
@@ -94,7 +94,7 @@
   Entry&
   lookup(const Name& name, size_t prefixLen);
 
-  /** \brief equivalent to `lookup(name, name.size())`
+  /** \brief Equivalent to `lookup(name, name.size())`
    */
   Entry&
   lookup(const Name& name)
@@ -102,36 +102,35 @@
     return this->lookup(name, name.size());
   }
 
-  /** \brief equivalent to `lookup(fibEntry.getPrefix())`
+  /** \brief Equivalent to `lookup(fibEntry.getPrefix())`
    *  \param fibEntry a FIB entry attached to this name tree, or \c Fib::s_emptyEntry
    *  \note This overload is more efficient than `lookup(const Name&)` in common cases.
    */
   Entry&
   lookup(const fib::Entry& fibEntry);
 
-  /** \brief equivalent to
-   *         `lookup(pitEntry.getName(), std::min(pitEntry.getName().size(), getMaxDepth()))`
+  /** \brief Equivalent to `lookup(pitEntry.getName(), std::min(pitEntry.getName().size(), getMaxDepth()))`
    *  \param pitEntry a PIT entry attached to this name tree
    *  \note This overload is more efficient than `lookup(const Name&)` in common cases.
    */
   Entry&
   lookup(const pit::Entry& pitEntry);
 
-  /** \brief equivalent to `lookup(measurementsEntry.getName())`
+  /** \brief Equivalent to `lookup(measurementsEntry.getName())`
    *  \param measurementsEntry a Measurements entry attached to this name tree
    *  \note This overload is more efficient than `lookup(const Name&)` in common cases.
    */
   Entry&
   lookup(const measurements::Entry& measurementsEntry);
 
-  /** \brief equivalent to `lookup(strategyChoiceEntry.getPrefix())`
+  /** \brief Equivalent to `lookup(strategyChoiceEntry.getPrefix())`
    *  \param strategyChoiceEntry a StrategyChoice entry attached to this name tree
    *  \note This overload is more efficient than `lookup(const Name&)` in common cases.
    */
   Entry&
   lookup(const strategy_choice::Entry& strategyChoiceEntry);
 
-  /** \brief delete the entry if it is empty
+  /** \brief Delete the entry if it is empty
    *  \param entry a valid entry
    *  \param canEraseAncestors whether ancestors should be deleted if they become empty
    *  \return number of deleted entries
@@ -145,13 +144,13 @@
   eraseIfEmpty(Entry* entry, bool canEraseAncestors = true);
 
 public: // matching
-  /** \brief exact match lookup
+  /** \brief Exact match lookup
    *  \return entry with \c name.getPrefix(prefixLen), or nullptr if it does not exist
    */
   Entry*
   findExactMatch(const Name& name, size_t prefixLen = std::numeric_limits<size_t>::max()) const;
 
-  /** \brief longest prefix matching
+  /** \brief Longest prefix matching
    *  \return entry whose name is a prefix of \p name and passes \p entrySelector,
    *          where no other entry with a longer name satisfies those requirements;
    *          or nullptr if no entry satisfying those requirements exists
@@ -160,7 +159,7 @@
   findLongestPrefixMatch(const Name& name,
                          const EntrySelector& entrySelector = AnyEntry()) const;
 
-  /** \brief equivalent to `findLongestPrefixMatch(entry.getName(), entrySelector)`
+  /** \brief Equivalent to `findLongestPrefixMatch(entry.getName(), entrySelector)`
    *  \note This overload is more efficient than
    *        `findLongestPrefixMatch(const Name&, const EntrySelector&)` in common cases.
    */
@@ -168,7 +167,7 @@
   findLongestPrefixMatch(const Entry& entry,
                          const EntrySelector& entrySelector = AnyEntry()) const;
 
-  /** \brief equivalent to `findLongestPrefixMatch(getEntry(tableEntry)->getName(), entrySelector)`
+  /** \brief Equivalent to `findLongestPrefixMatch(getEntry(tableEntry)->getName(), entrySelector)`
    *  \tparam EntryT \c fib::Entry or \c measurements::Entry or \c strategy_choice::Entry
    *  \note This overload is more efficient than
    *        `findLongestPrefixMatch(const Name&, const EntrySelector&)` in common cases.
@@ -184,7 +183,7 @@
     return this->findLongestPrefixMatch(*nte, entrySelector);
   }
 
-  /** \brief equivalent to `findLongestPrefixMatch(pitEntry.getName(), entrySelector)`
+  /** \brief Equivalent to `findLongestPrefixMatch(pitEntry.getName(), entrySelector)`
    *  \note This overload is more efficient than
    *        `findLongestPrefixMatch(const Name&, const EntrySelector&)` in common cases.
    *  \warning Undefined behavior may occur if \p pitEntry is not attached to this name tree.
@@ -193,7 +192,7 @@
   findLongestPrefixMatch(const pit::Entry& pitEntry,
                          const EntrySelector& entrySelector = AnyEntry()) const;
 
-  /** \brief all-prefixes match lookup
+  /** \brief All-prefixes match lookup
    *  \return a range where every entry has a name that is a prefix of \p name ,
    *          and matches \p entrySelector.
    *
@@ -219,7 +218,7 @@
 public: // enumeration
   using const_iterator = Iterator;
 
-  /** \brief enumerate all entries
+  /** \brief Enumerate all entries
    *  \return a range where every entry matches \p entrySelector
    *
    *  Example:
@@ -236,7 +235,7 @@
   Range
   fullEnumerate(const EntrySelector& entrySelector = AnyEntry()) const;
 
-  /** \brief enumerate all entries under a prefix
+  /** \brief Enumerate all entries under a prefix
    *  \return a range where every entry has a name that starts with \p prefix,
    *          and matches \p entrySubTreeSelector.
    *
diff --git a/daemon/table/network-region-table.cpp b/daemon/table/network-region-table.cpp
index 828a35b..c7e9cea 100644
--- a/daemon/table/network-region-table.cpp
+++ b/daemon/table/network-region-table.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-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -24,7 +24,6 @@
  */
 
 #include "network-region-table.hpp"
-#include <boost/range/adaptor/map.hpp>
 
 namespace nfd {
 
diff --git a/daemon/table/pit-entry.cpp b/daemon/table/pit-entry.cpp
index 53929e6..4f6f3f4 100644
--- a/daemon/table/pit-entry.cpp
+++ b/daemon/table/pit-entry.cpp
@@ -24,16 +24,14 @@
  */
 
 #include "pit-entry.hpp"
+
 #include <algorithm>
 
 namespace nfd {
 namespace pit {
 
 Entry::Entry(const Interest& interest)
-  : isSatisfied(false)
-  , dataFreshnessPeriod(0_ms)
-  , m_interest(interest.shared_from_this())
-  , m_nameTreeEntry(nullptr)
+  : m_interest(interest.shared_from_this())
 {
 }
 
diff --git a/daemon/table/pit-entry.hpp b/daemon/table/pit-entry.hpp
index 5a814bd..42334f0 100644
--- a/daemon/table/pit-entry.hpp
+++ b/daemon/table/pit-entry.hpp
@@ -40,15 +40,15 @@
 
 namespace pit {
 
-/** \brief an unordered collection of in-records
+/** \brief An unordered collection of in-records
  */
 typedef std::list<InRecord> InRecordCollection;
 
-/** \brief an unordered collection of out-records
+/** \brief An unordered collection of out-records
  */
 typedef std::list<OutRecord> OutRecordCollection;
 
-/** \brief an Interest table entry
+/** \brief An Interest table entry
  *
  *  An Interest table entry represents either a pending Interest or a recently satisfied Interest.
  *  Each entry contains a collection of in-records, a collection of out-records,
@@ -133,7 +133,7 @@
   }
 
   /** \brief get the in-record for \p face and \p endpointId
-   *  \return an iterator to the in-record, or .in_end() if it does not exist
+   *  \return an iterator to the in-record, or in_end() if it does not exist
    */
   InRecordCollection::iterator
   getInRecord(const Face& face, EndpointId endpointId);
@@ -200,7 +200,7 @@
   }
 
   /** \brief get the out-record for \p face and \p endpointId
-   *  \return an iterator to the out-record, or .out_end() if it does not exist
+   *  \return an iterator to the out-record, or out_end() if it does not exist
    */
   OutRecordCollection::iterator
   getOutRecord(const Face& face, EndpointId endpointId);
@@ -223,27 +223,27 @@
   deleteInOutRecordsByFace(const Face& face);
 
 public:
-  /** \brief expiry timer
+  /** \brief Expiry timer
    *
    *  This timer is used in forwarding pipelines to delete the entry
    */
   scheduler::EventId expiryTimer;
 
-  /** \brief indicate if PIT entry is satisfied
+  /** \brief Indicates whether this PIT entry is satisfied
    */
-  bool isSatisfied;
+  bool isSatisfied = false;
 
   /** \brief Data freshness period
    *  \note This field is meaningful only if isSatisfied is true
    */
-  time::milliseconds dataFreshnessPeriod;
+  time::milliseconds dataFreshnessPeriod = 0_ms;
 
 private:
   shared_ptr<const Interest> m_interest;
   InRecordCollection m_inRecords;
   OutRecordCollection m_outRecords;
 
-  name_tree::Entry* m_nameTreeEntry;
+  name_tree::Entry* m_nameTreeEntry = nullptr;
 
   friend class name_tree::Entry;
 };
diff --git a/daemon/table/pit-face-record.cpp b/daemon/table/pit-face-record.cpp
index 212ad23..d58ec96 100644
--- a/daemon/table/pit-face-record.cpp
+++ b/daemon/table/pit-face-record.cpp
@@ -28,28 +28,18 @@
 namespace nfd {
 namespace pit {
 
-FaceRecord::FaceRecord(Face& face, EndpointId endpointId)
-  : m_face(face)
-  , m_endpointId(endpointId)
-  , m_lastNonce(0)
-  , m_lastRenewed(time::steady_clock::TimePoint::min())
-  , m_expiry(time::steady_clock::TimePoint::min())
-{
-}
-
 void
 FaceRecord::update(const Interest& interest)
 {
   m_lastNonce = interest.getNonce();
   m_lastRenewed = time::steady_clock::now();
 
-  time::milliseconds lifetime = interest.getInterestLifetime();
-  if (lifetime < time::milliseconds::zero()) {
+  auto lifetime = interest.getInterestLifetime();
+  if (lifetime < 0_ms) {
     lifetime = ndn::DEFAULT_INTEREST_LIFETIME;
   }
   m_expiry = m_lastRenewed + lifetime;
 }
 
-
 } // namespace pit
 } // namespace nfd
diff --git a/daemon/table/pit-face-record.hpp b/daemon/table/pit-face-record.hpp
index 8f4132c..0c76530 100644
--- a/daemon/table/pit-face-record.hpp
+++ b/daemon/table/pit-face-record.hpp
@@ -32,33 +32,51 @@
 namespace nfd {
 namespace pit {
 
-/** \brief contains information about an Interest
- *         on an incoming or outgoing face
+/** \brief Contains information about an Interest on an incoming or outgoing face
  *  \note This is an implementation detail to extract common functionality
  *        of InRecord and OutRecord
  */
 class FaceRecord : public StrategyInfoHost
 {
 public:
-  FaceRecord(Face& face, EndpointId endpointId);
+  FaceRecord(Face& face, EndpointId endpointId)
+    : m_face(face)
+    , m_endpointId(endpointId)
+  {
+  }
 
   Face&
-  getFace() const;
+  getFace() const
+  {
+    return m_face;
+  }
 
   EndpointId
-  getEndpointId() const;
+  getEndpointId() const
+  {
+    return m_endpointId;
+  }
 
   uint32_t
-  getLastNonce() const;
+  getLastNonce() const
+  {
+    return m_lastNonce;
+  }
 
   time::steady_clock::TimePoint
-  getLastRenewed() const;
+  getLastRenewed() const
+  {
+    return m_lastRenewed;
+  }
 
-  /** \brief gives the time point this record expires
+  /** \brief Returns the time point at which this record expires
    *  \return getLastRenewed() + InterestLifetime
    */
   time::steady_clock::TimePoint
-  getExpiry() const;
+  getExpiry() const
+  {
+    return m_expiry;
+  }
 
   /** \brief updates lastNonce, lastRenewed, expiry fields
    */
@@ -68,41 +86,11 @@
 private:
   Face& m_face;
   EndpointId m_endpointId;
-  uint32_t m_lastNonce;
-  time::steady_clock::TimePoint m_lastRenewed;
-  time::steady_clock::TimePoint m_expiry;
+  uint32_t m_lastNonce = 0;
+  time::steady_clock::TimePoint m_lastRenewed = time::steady_clock::TimePoint::min();
+  time::steady_clock::TimePoint m_expiry = time::steady_clock::TimePoint::min();
 };
 
-inline Face&
-FaceRecord::getFace() const
-{
-  return m_face;
-}
-
-inline EndpointId
-FaceRecord::getEndpointId() const
-{
-  return m_endpointId;
-}
-
-inline uint32_t
-FaceRecord::getLastNonce() const
-{
-  return m_lastNonce;
-}
-
-inline time::steady_clock::TimePoint
-FaceRecord::getLastRenewed() const
-{
-  return m_lastRenewed;
-}
-
-inline time::steady_clock::TimePoint
-FaceRecord::getExpiry() const
-{
-  return m_expiry;
-}
-
 } // namespace pit
 } // namespace nfd
 
diff --git a/daemon/table/pit-in-record.cpp b/daemon/table/pit-in-record.cpp
index e26e767..15131da 100644
--- a/daemon/table/pit-in-record.cpp
+++ b/daemon/table/pit-in-record.cpp
@@ -28,16 +28,11 @@
 namespace nfd {
 namespace pit {
 
-InRecord::InRecord(Face& face, EndpointId endpointId)
-  : FaceRecord(face, endpointId)
-{
-}
-
 void
 InRecord::update(const Interest& interest)
 {
-  this->FaceRecord::update(interest);
-  m_interest = const_cast<Interest&>(interest).shared_from_this();
+  FaceRecord::update(interest);
+  m_interest = interest.shared_from_this();
 }
 
 } // namespace pit
diff --git a/daemon/table/pit-in-record.hpp b/daemon/table/pit-in-record.hpp
index f03c608..002537b 100644
--- a/daemon/table/pit-in-record.hpp
+++ b/daemon/table/pit-in-record.hpp
@@ -31,30 +31,27 @@
 namespace nfd {
 namespace pit {
 
-/** \brief contains information about an Interest from an incoming face
+/** \brief Contains information about an Interest from an incoming face
  */
 class InRecord : public FaceRecord
 {
 public:
-  InRecord(Face& face, EndpointId endpointId);
+  using FaceRecord::FaceRecord;
+
+  const Interest&
+  getInterest() const
+  {
+    BOOST_ASSERT(m_interest != nullptr);
+    return *m_interest;
+  }
 
   void
   update(const Interest& interest);
 
-  const Interest&
-  getInterest() const;
-
 private:
   shared_ptr<const Interest> m_interest;
 };
 
-inline const Interest&
-InRecord::getInterest() const
-{
-  BOOST_ASSERT(static_cast<bool>(m_interest));
-  return *m_interest;
-}
-
 } // namespace pit
 } // namespace nfd
 
diff --git a/daemon/table/pit-out-record.cpp b/daemon/table/pit-out-record.cpp
index 5a42151..e86f440 100644
--- a/daemon/table/pit-out-record.cpp
+++ b/daemon/table/pit-out-record.cpp
@@ -28,11 +28,6 @@
 namespace nfd {
 namespace pit {
 
-OutRecord::OutRecord(Face& face, EndpointId endpointId)
-  : FaceRecord(face, endpointId)
-{
-}
-
 bool
 OutRecord::setIncomingNack(const lp::Nack& nack)
 {
@@ -40,7 +35,7 @@
     return false;
   }
 
-  m_incomingNack.reset(new lp::NackHeader(nack.getHeader()));
+  m_incomingNack = make_unique<lp::NackHeader>(nack.getHeader());
   return true;
 }
 
diff --git a/daemon/table/pit-out-record.hpp b/daemon/table/pit-out-record.hpp
index 985a129..383e0c8 100644
--- a/daemon/table/pit-out-record.hpp
+++ b/daemon/table/pit-out-record.hpp
@@ -31,12 +31,12 @@
 namespace nfd {
 namespace pit {
 
-/** \brief contains information about an Interest toward an outgoing face
+/** \brief Contains information about an Interest toward an outgoing face
  */
 class OutRecord : public FaceRecord
 {
 public:
-  OutRecord(Face& face, EndpointId endpointId);
+  using FaceRecord::FaceRecord;
 
   /** \return last NACK returned by \p getFace()
    *
diff --git a/daemon/table/pit.cpp b/daemon/table/pit.cpp
index 5e26fc0..c626c3a 100644
--- a/daemon/table/pit.cpp
+++ b/daemon/table/pit.cpp
@@ -36,7 +36,6 @@
 
 Pit::Pit(NameTree& nameTree)
   : m_nameTree(nameTree)
-  , m_nItems(0)
 {
 }
 
@@ -89,8 +88,8 @@
   auto&& ntMatches = m_nameTree.findAllMatches(data.getName(), &nteHasPitEntries);
 
   DataMatchResult matches;
-  for (const name_tree::Entry& nte : ntMatches) {
-    for (const shared_ptr<Entry>& pitEntry : nte.getPitEntries()) {
+  for (const auto& nte : ntMatches) {
+    for (const auto& pitEntry : nte.getPitEntries()) {
       if (pitEntry->getInterest().matchesData(data))
         matches.emplace_back(pitEntry);
     }
diff --git a/daemon/table/pit.hpp b/daemon/table/pit.hpp
index eb2438b..5464e00 100644
--- a/daemon/table/pit.hpp
+++ b/daemon/table/pit.hpp
@@ -42,7 +42,7 @@
  */
 using DataMatchResult = std::vector<shared_ptr<Entry>>;
 
-/** \brief represents the Interest Table
+/** \brief Represents the Interest Table
  */
 class Pit : noncopyable
 {
@@ -58,7 +58,7 @@
     return m_nItems;
   }
 
-  /** \brief finds a PIT entry for Interest
+  /** \brief Finds a PIT entry for \p interest
    *  \param interest the Interest
    *  \return an existing entry with same Name and Selectors; otherwise nullptr
    */
@@ -68,7 +68,7 @@
     return const_cast<Pit*>(this)->findOrInsert(interest, false).first;
   }
 
-  /** \brief inserts a PIT entry for Interest
+  /** \brief Inserts a PIT entry for \p interest
    *  \param interest the Interest; must be created with make_shared
    *  \return a new or existing entry with same Name and Selectors,
    *          and true for new entry, false for existing entry
@@ -79,13 +79,13 @@
     return this->findOrInsert(interest, true);
   }
 
-  /** \brief performs a Data match
-   *  \return an iterable of all PIT entries matching data
+  /** \brief Performs a Data match
+   *  \return an iterable of all PIT entries matching \p data
    */
   DataMatchResult
   findAllDataMatches(const Data& data) const;
 
-  /** \brief deletes an entry
+  /** \brief Deletes an entry
    */
   void
   erase(Entry* entry)
@@ -93,7 +93,7 @@
     this->erase(entry, true);
   }
 
-  /** \brief deletes all in-records and out-records for \p face
+  /** \brief Deletes all in-records and out-records for \p face
    */
   void
   deleteInOutRecordsByFace(Entry* entry, const Face& face);
@@ -104,7 +104,7 @@
   /** \return an iterator to the beginning
    *  \note Iteration order is implementation-defined.
    *  \warning Undefined behavior may occur if a FIB/PIT/Measurements/StrategyChoice entry
-   *           is inserted or erased during enumeration.
+   *           is inserted or erased during iteration.
    */
   const_iterator
   begin() const;
@@ -122,20 +122,20 @@
   void
   erase(Entry* pitEntry, bool canDeleteNte);
 
-  /** \brief finds or inserts a PIT entry for Interest
+  /** \brief Finds or inserts a PIT entry for \p interest
    *  \param interest the Interest; must be created with make_shared if allowInsert
-   *  \param allowInsert whether inserting new entry is allowed.
+   *  \param allowInsert whether inserting a new entry is allowed
    *  \return if allowInsert, a new or existing entry with same Name+Selectors,
    *          and true for new entry, false for existing entry;
    *          if not allowInsert, an existing entry with same Name+Selectors and false,
-   *          or {nullptr, true} if there's no existing entry
+   *          or `{nullptr, true}` if there's no existing entry
    */
   std::pair<shared_ptr<Entry>, bool>
   findOrInsert(const Interest& interest, bool allowInsert);
 
 private:
   NameTree& m_nameTree;
-  size_t m_nItems;
+  size_t m_nItems = 0;
 };
 
 } // namespace pit
diff --git a/daemon/table/strategy-choice-entry.cpp b/daemon/table/strategy-choice-entry.cpp
index 77302f7..1a1ea8e 100644
--- a/daemon/table/strategy-choice-entry.cpp
+++ b/daemon/table/strategy-choice-entry.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-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -31,7 +31,6 @@
 
 Entry::Entry(const Name& prefix)
   : m_prefix(prefix)
-  , m_nameTreeEntry(nullptr)
 {
 }
 
diff --git a/daemon/table/strategy-choice-entry.hpp b/daemon/table/strategy-choice-entry.hpp
index e1f1eb3..f64d332 100644
--- a/daemon/table/strategy-choice-entry.hpp
+++ b/daemon/table/strategy-choice-entry.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-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -40,11 +40,12 @@
 
 namespace strategy_choice {
 
-/** \brief represents a Strategy Choice entry
+/** \brief Represents a Strategy Choice entry
  */
 class Entry : noncopyable
 {
 public:
+  explicit
   Entry(const Name& prefix);
 
   ~Entry();
@@ -78,7 +79,7 @@
   Name m_prefix;
   unique_ptr<fw::Strategy> m_strategy;
 
-  name_tree::Entry* m_nameTreeEntry;
+  name_tree::Entry* m_nameTreeEntry = nullptr;
   friend class name_tree::Entry;
 };
 
diff --git a/daemon/table/strategy-choice.cpp b/daemon/table/strategy-choice.cpp
index 233f367..b6cb0f7 100644
--- a/daemon/table/strategy-choice.cpp
+++ b/daemon/table/strategy-choice.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-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -50,7 +50,6 @@
 StrategyChoice::StrategyChoice(Forwarder& forwarder)
   : m_forwarder(forwarder)
   , m_nameTree(m_forwarder.getNameTree())
-  , m_nItems(0)
 {
 }
 
@@ -168,12 +167,12 @@
 {
   name_tree::Entry* nte = m_nameTree.findExactMatch(prefix);
   if (nte == nullptr) {
-    return {false, Name()};
+    return {false, {}};
   }
 
   Entry* entry = nte->getStrategyChoiceEntry();
   if (entry == nullptr) {
-    return {false, Name()};
+    return {false, {}};
   }
 
   return {true, entry->getStrategyInstanceName()};
@@ -211,12 +210,12 @@
 {
   NFD_LOG_TRACE("clearStrategyInfo " << nte.getName());
 
-  for (const shared_ptr<pit::Entry>& pitEntry : nte.getPitEntries()) {
+  for (const auto& pitEntry : nte.getPitEntries()) {
     pitEntry->clearStrategyInfo();
-    for (const pit::InRecord& inRecord : pitEntry->getInRecords()) {
+    for (const auto& inRecord : pitEntry->getInRecords()) {
       const_cast<pit::InRecord&>(inRecord).clearStrategyInfo();
     }
-    for (const pit::OutRecord& outRecord : pitEntry->getOutRecords()) {
+    for (const auto& outRecord : pitEntry->getOutRecords()) {
       const_cast<pit::OutRecord&>(outRecord).clearStrategyInfo();
     }
   }
@@ -233,8 +232,7 @@
   if (Strategy::areSameType(oldInstanceName, newInstanceName)) {
     // same Strategy subclass type: no need to clear StrategyInfo
     NFD_LOG_INFO("changeStrategy(" << entry.getPrefix() << ") "
-                 << oldInstanceName << " -> " << newInstanceName
-                 << " same-type");
+                 << oldInstanceName << " -> " << newInstanceName << " same-type");
     return;
   }
 
@@ -245,7 +243,7 @@
   // where entry's effective strategy is covered by the changing StrategyChoice entry
   const name_tree::Entry* rootNte = m_nameTree.getEntry(entry);
   BOOST_ASSERT(rootNte != nullptr);
-  auto&& ntChanged = m_nameTree.partialEnumerate(entry.getPrefix(),
+  const auto& ntChanged = m_nameTree.partialEnumerate(entry.getPrefix(),
     [&rootNte] (const name_tree::Entry& nte) -> std::pair<bool, bool> {
       if (&nte == rootNte) {
         return {true, true};
@@ -255,7 +253,7 @@
       }
       return {true, true};
     });
-  for (const name_tree::Entry& nte : ntChanged) {
+  for (const auto& nte : ntChanged) {
     clearStrategyInfo(nte);
   }
 }
diff --git a/daemon/table/strategy-choice.hpp b/daemon/table/strategy-choice.hpp
index 5965ddc..4b1548e 100644
--- a/daemon/table/strategy-choice.hpp
+++ b/daemon/table/strategy-choice.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-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -37,7 +37,7 @@
 
 namespace strategy_choice {
 
-/** \brief represents the Strategy Choice table
+/** \brief Represents the Strategy Choice table
  *
  *  The Strategy Choice table maintains available Strategy types,
  *  and associates Name prefixes with Strategy types.
@@ -60,7 +60,7 @@
     return m_nItems;
   }
 
-  /** \brief set the default strategy
+  /** \brief Set the default strategy
    *
    *  This must be called by forwarder constructor.
    */
@@ -83,7 +83,7 @@
       return m_status == OK || m_status == EXCEPTION;
     }
 
-    /** \brief get a status code for use in management command response
+    /** \brief Get a status code for use in management command response
      */
     int
     getStatusCode() const
@@ -110,7 +110,7 @@
     friend std::ostream& operator<<(std::ostream&, const InsertResult&);
   };
 
-  /** \brief set strategy of \p prefix to be \p strategyName
+  /** \brief Set strategy of \p prefix to be \p strategyName
    *  \param prefix the name prefix to change strategy
    *  \param strategyName strategy instance name, may contain version and parameters;
    *                      strategy must have been registered
@@ -119,35 +119,34 @@
   InsertResult
   insert(const Name& prefix, const Name& strategyName);
 
-  /** \brief make prefix to inherit strategy from its parent
-   *
-   *  not allowed for root prefix (ndn:/)
+  /** \brief Make prefix to inherit strategy from its parent
+   *  \note Not allowed for root prefix (ndn:/)
    */
   void
   erase(const Name& prefix);
 
-  /** \brief get strategy Name of prefix
+  /** \brief Get strategy Name of prefix
    *  \return true and strategyName at exact match, or false
    */
   std::pair<bool, Name>
   get(const Name& prefix) const;
 
 public: // effective strategy
-  /** \brief get effective strategy for prefix
+  /** \brief Get effective strategy for \p prefix
    */
   fw::Strategy&
   findEffectiveStrategy(const Name& prefix) const;
 
-  /** \brief get effective strategy for pitEntry
+  /** \brief Get effective strategy for \p pitEntry
    *
-   *  This is equivalent to .findEffectiveStrategy(pitEntry.getName())
+   *  This is equivalent to `findEffectiveStrategy(pitEntry.getName())`
    */
   fw::Strategy&
   findEffectiveStrategy(const pit::Entry& pitEntry) const;
 
-  /** \brief get effective strategy for measurementsEntry
+  /** \brief Get effective strategy for \p measurementsEntry
    *
-   *  This is equivalent to .findEffectiveStrategy(measurementsEntry.getName())
+   *  This is equivalent to `findEffectiveStrategy(measurementsEntry.getName())`
    */
   fw::Strategy&
   findEffectiveStrategy(const measurements::Entry& measurementsEntry) const;
@@ -194,7 +193,7 @@
 private:
   Forwarder& m_forwarder;
   NameTree& m_nameTree;
-  size_t m_nItems;
+  size_t m_nItems = 0;
 };
 
 std::ostream&
diff --git a/daemon/table/strategy-info-host.cpp b/daemon/table/strategy-info-host.cpp
deleted file mode 100644
index 4961c68..0000000
--- a/daemon/table/strategy-info-host.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014,  Regents of the University of California,
- *                      Arizona Board of Regents,
- *                      Colorado State University,
- *                      University Pierre & Marie Curie, Sorbonne University,
- *                      Washington University in St. Louis,
- *                      Beijing Institute of Technology,
- *                      The University of Memphis
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "strategy-info-host.hpp"
-
-namespace nfd {
-
-void
-StrategyInfoHost::clearStrategyInfo()
-{
-  m_items.clear();
-}
-
-} // namespace nfd
diff --git a/daemon/table/strategy-info-host.hpp b/daemon/table/strategy-info-host.hpp
index db88558..03f42f4 100644
--- a/daemon/table/strategy-info-host.hpp
+++ b/daemon/table/strategy-info-host.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-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -30,12 +30,12 @@
 
 namespace nfd {
 
-/** \brief base class for an entity onto which StrategyInfo items may be placed
+/** \brief Base class for an entity onto which StrategyInfo items may be placed
  */
 class StrategyInfoHost
 {
 public:
-  /** \brief get a StrategyInfo item
+  /** \brief Get a StrategyInfo item
    *  \tparam T type of StrategyInfo, must be a subclass of fw::StrategyInfo
    *  \return an existing StrategyInfo item of type T, or nullptr if it does not exist
    */
@@ -53,7 +53,7 @@
     return static_cast<T*>(it->second.get());
   }
 
-  /** \brief insert a StrategyInfo item
+  /** \brief Insert a StrategyInfo item
    *  \tparam T type of StrategyInfo, must be a subclass of fw::StrategyInfo
    *  \return a new or existing StrategyInfo item of type T,
    *          and true for new item, false for existing item
@@ -65,15 +65,15 @@
     static_assert(std::is_base_of<fw::StrategyInfo, T>::value,
                   "T must inherit from StrategyInfo");
 
-    unique_ptr<fw::StrategyInfo>& item = m_items[T::getTypeId()];
-    bool isNew = (item == nullptr);
+    auto& item = m_items[T::getTypeId()];
+    bool isNew = item == nullptr;
     if (isNew) {
-      item.reset(new T(std::forward<A>(args)...));
+      item = make_unique<T>(std::forward<A>(args)...);
     }
     return {static_cast<T*>(item.get()), isNew};
   }
 
-  /** \brief erase a StrategyInfo item
+  /** \brief Erase a StrategyInfo item
    *  \tparam T type of StrategyInfo, must be a subclass of fw::StrategyInfo
    *  \return number of items erased
    */
@@ -87,10 +87,13 @@
     return m_items.erase(T::getTypeId());
   }
 
-  /** \brief clear all StrategyInfo items
+  /** \brief Clear all StrategyInfo items
    */
   void
-  clearStrategyInfo();
+  clearStrategyInfo()
+  {
+    m_items.clear();
+  }
 
 private:
   std::unordered_map<int, unique_ptr<fw::StrategyInfo>> m_items;
