diff --git a/daemon/table/cleanup.hpp b/daemon/table/cleanup.hpp
index 3c84482..b1e95b1 100644
--- a/daemon/table/cleanup.hpp
+++ b/daemon/table/cleanup.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-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -32,10 +32,10 @@
 
 namespace nfd {
 
-/** \brief cleanup tables when a face is destroyed
+/** \brief Cleanup tables when a face is destroyed.
  *
- *  This function enumerates the NameTree, calls Fib::removeNextHop for each FIB entry,
- *  calls Pit::deleteInOutRecords for each PIT entry, and finally
+ *  This function enumerates the NameTree, calls Fib::removeNextHop() for each FIB entry,
+ *  calls Pit::deleteInOutRecords() for each PIT entry, and finally
  *  deletes any name tree entries that have become empty.
  *
  *  \note It's a design choice to let Fib and Pit classes decide what to do with each entry.
diff --git a/daemon/table/cs-entry.hpp b/daemon/table/cs-entry.hpp
index a04f9f7..89f71f1 100644
--- a/daemon/table/cs-entry.hpp
+++ b/daemon/table/cs-entry.hpp
@@ -30,12 +30,12 @@
 
 namespace nfd::cs {
 
-/** \brief a ContentStore entry
+/** \brief A ContentStore entry.
  */
 class Entry
 {
 public: // exposed through ContentStore enumeration
-  /** \brief return the stored Data
+  /** \brief Return the stored Data.
    */
   const Data&
   getData() const
@@ -43,7 +43,7 @@
     return *m_data;
   }
 
-  /** \brief return stored Data name
+  /** \brief Return stored Data name.
    */
   const Name&
   getName() const
@@ -51,7 +51,7 @@
     return m_data->getName();
   }
 
-  /** \brief return full name (including implicit digest) of the stored Data
+  /** \brief Return full name (including implicit digest) of the stored Data.
    */
   const Name&
   getFullName() const
@@ -59,7 +59,7 @@
     return m_data->getFullName();
   }
 
-  /** \brief return whether the stored Data is unsolicited
+  /** \brief Return whether the stored Data is unsolicited.
    */
   bool
   isUnsolicited() const
@@ -67,12 +67,12 @@
     return m_isUnsolicited;
   }
 
-  /** \brief check if the stored Data is fresh now
+  /** \brief Check if the stored Data is fresh now.
    */
   bool
   isFresh() const;
 
-  /** \brief determine whether Interest can be satisified by the stored Data
+  /** \brief Determine whether Interest can be satisified by the stored Data.
    */
   bool
   canSatisfy(const Interest& interest) const;
@@ -80,12 +80,12 @@
 public: // used by ContentStore implementation
   Entry(shared_ptr<const Data> data, bool isUnsolicited);
 
-  /** \brief recalculate when the entry would become non-fresh, relative to current time
+  /** \brief Recalculate when the entry would become non-fresh, relative to current time.
    */
   void
   updateFreshUntil();
 
-  /** \brief clear 'unsolicited' flag
+  /** \brief Clear 'unsolicited' flag.
    */
   void
   clearUnsolicited()
@@ -96,7 +96,7 @@
 private:
   shared_ptr<const Data> m_data;
   bool m_isUnsolicited;
-  time::steady_clock::TimePoint m_freshUntil;
+  time::steady_clock::time_point m_freshUntil;
 };
 
 bool
@@ -108,7 +108,7 @@
 bool
 operator<(const Entry& lhs, const Entry& rhs);
 
-/** \brief an ordered container of ContentStore entries
+/** \brief An ordered container of ContentStore entries.
  *
  *  This container uses std::less<> comparator to enable lookup with queryName.
  */
diff --git a/daemon/table/cs-policy-lru.hpp b/daemon/table/cs-policy-lru.hpp
index 8d7c814..9a62c6c 100644
--- a/daemon/table/cs-policy-lru.hpp
+++ b/daemon/table/cs-policy-lru.hpp
@@ -43,7 +43,7 @@
                 >
               >;
 
-/** \brief Least-Recently-Used (LRU) replacement policy
+/** \brief Least-Recently-Used (LRU) replacement policy.
  */
 class LruPolicy final : public Policy
 {
@@ -70,7 +70,7 @@
   evictEntries() final;
 
 private:
-  /** \brief moves an entry to the end of queue
+  /** \brief Moves an entry to the end of queue.
    */
   void
   insertToQueue(EntryRef i, bool isNewEntry);
diff --git a/daemon/table/cs-policy-priority-fifo.hpp b/daemon/table/cs-policy-priority-fifo.hpp
index 48d1d66..eaa4c81 100644
--- a/daemon/table/cs-policy-priority-fifo.hpp
+++ b/daemon/table/cs-policy-priority-fifo.hpp
@@ -49,7 +49,7 @@
   scheduler::EventId moveStaleEventId;
 };
 
-/** \brief Priority FIFO replacement policy
+/** \brief Priority First-In-First-Out (FIFO) replacement policy.
  *
  *  This policy maintains a set of cleanup queues to decide the eviction order of CS entries.
  *  The cleanup queues are three doubly linked lists that store EntryRefs.
@@ -88,25 +88,25 @@
   evictEntries() final;
 
 private:
-  /** \brief evicts one entry
+  /** \brief Evicts one entry.
    *  \pre CS is not empty
    */
   void
   evictOne();
 
-  /** \brief attaches the entry to an appropriate queue
+  /** \brief Attaches the entry to an appropriate queue.
    *  \pre the entry is not in any queue
    */
   void
   attachQueue(EntryRef i);
 
-  /** \brief detaches the entry from its current queue
+  /** \brief Detaches the entry from its current queue.
    *  \post the entry is not in any queue
    */
   void
   detachQueue(EntryRef i);
 
-  /** \brief moves an entry from FIFO queue to STALE queue
+  /** \brief Moves an entry from FIFO queue to STALE queue.
    */
   void
   moveToStaleQueue(EntryRef i);
diff --git a/daemon/table/cs-policy.hpp b/daemon/table/cs-policy.hpp
index de4c89c..748a45b 100644
--- a/daemon/table/cs-policy.hpp
+++ b/daemon/table/cs-policy.hpp
@@ -33,7 +33,7 @@
 class Cs;
 
 /**
- * \brief Represents a CS replacement policy
+ * \brief Represents a CS replacement policy.
  */
 class Policy : noncopyable
 {
@@ -47,13 +47,15 @@
     BOOST_VERIFY(r.second);
   }
 
-  /** \return a cs::Policy identified by \p policyName,
-   *          or nullptr if \p policyName is unknown
+  /**
+   * \brief Returns a cs::Policy identified by \p policyName,
+   *        or nullptr if \p policyName is unknown.
    */
   static unique_ptr<Policy>
   create(const std::string& policyName);
 
-  /** \return a list of available policy names
+  /**
+   * \brief Returns a list of available policy names.
    */
   static std::set<std::string>
   getPolicyNames();
@@ -63,36 +65,39 @@
   ~Policy() = default;
 
   const std::string&
-  getName() const
+  getName() const noexcept
   {
     return m_policyName;
   }
 
-  /** \brief gets cs
+  /**
+   * \brief Returns a pointer to the associated CS instance.
    */
   Cs*
-  getCs() const
+  getCs() const noexcept
   {
     return m_cs;
   }
 
-  /** \brief sets cs
+  /**
+   * \brief Sets the associated CS instance.
    */
   void
-  setCs(Cs* cs)
+  setCs(Cs* cs) noexcept
   {
     m_cs = cs;
   }
 
-  /** \brief gets hard limit (in number of entries)
+  /**
+   * \brief Gets hard limit (in number of entries).
    */
   size_t
-  getLimit() const
+  getLimit() const noexcept
   {
     return m_limit;
   }
 
-  /** \brief sets hard limit (in number of entries)
+  /** \brief Sets hard limit (in number of entries).
    *  \post getLimit() == nMaxEntries
    *  \post cs.size() <= getLimit()
    *
@@ -102,19 +107,19 @@
   setLimit(size_t nMaxEntries);
 
 public:
-  /** \brief a reference to an CS entry
-   *  \note operator< of EntryRef compares the Data name enclosed in the Entry.
+  /** \brief A reference to a CS entry.
+   *  \note `operator<` of EntryRef compares the Data name enclosed in the Entry.
    */
   using EntryRef = Table::const_iterator;
 
-  /** \brief emits when an entry is being evicted
+  /** \brief %Signal emitted when an entry is being evicted.
    *
    *  A policy implementation should emit this signal to cause CS to erase an entry from its index.
    *  CS should connect to this signal and erase the entry upon signal emission.
    */
   signal::Signal<Policy, EntryRef> beforeEvict;
 
-  /** \brief invoked by CS after a new entry is inserted
+  /** \brief Invoked by CS after a new entry is inserted.
    *  \post cs.size() <= getLimit()
    *
    *  The policy may evict entries if necessary.
@@ -123,20 +128,20 @@
   void
   afterInsert(EntryRef i);
 
-  /** \brief invoked by CS after an existing entry is refreshed by same Data
+  /** \brief Invoked by CS after an existing entry is refreshed by same Data.
    *
    *  The policy may witness this refresh to make better eviction decisions in the future.
    */
   void
   afterRefresh(EntryRef i);
 
-  /** \brief invoked by CS before an entry is erased due to management command
+  /** \brief Invoked by CS before an entry is erased due to management command.
    *  \warning CS must not invoke this method if an entry is erased due to eviction.
    */
   void
   beforeErase(EntryRef i);
 
-  /** \brief invoked by CS before an entry is used to match a lookup
+  /** \brief Invoked by CS before an entry is used to match a lookup.
    *
    *  The policy may witness this usage to make better eviction decisions in the future.
    */
@@ -144,7 +149,7 @@
   beforeUse(EntryRef i);
 
 protected:
-  /** \brief invoked after a new entry is created in CS
+  /** \brief Invoked after a new entry is created in CS.
    *
    *  When overridden in a subclass, a policy implementation should decide whether to accept \p i.
    *  If \p i is accepted, it should be inserted into a cleanup index.
@@ -155,7 +160,7 @@
   virtual void
   doAfterInsert(EntryRef i) = 0;
 
-  /** \brief invoked after an existing entry is refreshed by same Data
+  /** \brief Invoked after an existing entry is refreshed by same Data.
    *
    *  When overridden in a subclass, a policy implementation may witness this operation
    *  and adjust its cleanup index.
@@ -163,7 +168,7 @@
   virtual void
   doAfterRefresh(EntryRef i) = 0;
 
-  /** \brief invoked before an entry is erased due to management command
+  /** \brief Invoked before an entry is erased due to management command.
    *  \note This will not be invoked for an entry being evicted by policy.
    *
    *  When overridden in a subclass, a policy implementation should erase \p i
@@ -172,7 +177,7 @@
   virtual void
   doBeforeErase(EntryRef i) = 0;
 
-  /** \brief invoked before an entry is used to match a lookup
+  /** \brief Invoked before an entry is used to match a lookup.
    *
    *  When overridden in a subclass, a policy implementation may witness this operation
    *  and adjust its cleanup index.
@@ -180,7 +185,7 @@
   virtual void
   doBeforeUse(EntryRef i) = 0;
 
-  /** \brief evicts zero or more entries
+  /** \brief Evicts zero or more entries.
    *  \post CS size does not exceed hard limit
    */
   virtual void
@@ -207,7 +212,7 @@
 
 } // namespace nfd::cs
 
-/** \brief registers a CS policy
+/** \brief Registers a CS policy.
  *  \param P a subclass of nfd::cs::Policy
  */
 #define NFD_REGISTER_CS_POLICY(P)                      \
diff --git a/daemon/table/cs.cpp b/daemon/table/cs.cpp
index 18d8fe2..3ad8bc9 100644
--- a/daemon/table/cs.cpp
+++ b/daemon/table/cs.cpp
@@ -157,7 +157,7 @@
 }
 
 void
-Cs::enableAdmit(bool shouldAdmit)
+Cs::enableAdmit(bool shouldAdmit) noexcept
 {
   if (m_shouldAdmit == shouldAdmit) {
     return;
@@ -167,7 +167,7 @@
 }
 
 void
-Cs::enableServe(bool shouldServe)
+Cs::enableServe(bool shouldServe) noexcept
 {
   if (m_shouldServe == shouldServe) {
     return;
diff --git a/daemon/table/cs.hpp b/daemon/table/cs.hpp
index cf91e17..a0bcbf6 100644
--- a/daemon/table/cs.hpp
+++ b/daemon/table/cs.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -31,7 +31,7 @@
 namespace nfd {
 namespace cs {
 
-/** \brief implements the Content Store
+/** \brief Implements the Content Store.
  *
  *  This Content Store implementation consists of a Table and a replacement policy.
  *
@@ -47,12 +47,12 @@
   explicit
   Cs(size_t nMaxPackets = 10);
 
-  /** \brief inserts a Data packet
+  /** \brief Inserts a Data packet.
    */
   void
   insert(const Data& data, bool isUnsolicited = false);
 
-  /** \brief asynchronously erases entries under \p prefix
+  /** \brief Asynchronously erases entries under \p prefix.
    *  \tparam AfterEraseCallback `void f(size_t nErased)`
    *  \param prefix name prefix of entries
    *  \param limit max number of entries to erase
@@ -67,7 +67,7 @@
     cb(nErased);
   }
 
-  /** \brief finds the best matching Data packet
+  /** \brief Finds the best matching Data packet.
    *  \tparam HitCallback `void f(const Interest&, const Data&)`
    *  \tparam MissCallback `void f(const Interest&)`
    *  \param interest the Interest for lookup
@@ -88,7 +88,7 @@
     hit(interest, match->getData());
   }
 
-  /** \brief get number of stored packets
+  /** \brief Get number of stored packets.
    */
   size_t
   size() const
@@ -97,15 +97,15 @@
   }
 
 public: // configuration
-  /** \brief get capacity (in number of packets)
+  /** \brief Get capacity (in number of packets).
    */
   size_t
-  getLimit() const
+  getLimit() const noexcept
   {
     return m_policy->getLimit();
   }
 
-  /** \brief change capacity (in number of packets)
+  /** \brief Change capacity (in number of packets).
    */
   void
   setLimit(size_t nMaxPackets)
@@ -113,49 +113,49 @@
     return m_policy->setLimit(nMaxPackets);
   }
 
-  /** \brief get replacement policy
+  /** \brief Get replacement policy.
    */
   Policy*
-  getPolicy() const
+  getPolicy() const noexcept
   {
     return m_policy.get();
   }
 
-  /** \brief change replacement policy
+  /** \brief Change replacement policy.
    *  \pre size() == 0
    */
   void
   setPolicy(unique_ptr<Policy> policy);
 
-  /** \brief get CS_ENABLE_ADMIT flag
+  /** \brief Get CS_ENABLE_ADMIT flag.
    *  \sa https://redmine.named-data.net/projects/nfd/wiki/CsMgmt#Update-config
    */
   bool
-  shouldAdmit() const
+  shouldAdmit() const noexcept
   {
     return m_shouldAdmit;
   }
 
-  /** \brief set CS_ENABLE_ADMIT flag
+  /** \brief Set CS_ENABLE_ADMIT flag.
    *  \sa https://redmine.named-data.net/projects/nfd/wiki/CsMgmt#Update-config
    */
   void
-  enableAdmit(bool shouldAdmit);
+  enableAdmit(bool shouldAdmit) noexcept;
 
-  /** \brief get CS_ENABLE_SERVE flag
+  /** \brief Get CS_ENABLE_SERVE flag.
    *  \sa https://redmine.named-data.net/projects/nfd/wiki/CsMgmt#Update-config
    */
   bool
-  shouldServe() const
+  shouldServe() const noexcept
   {
     return m_shouldServe;
   }
 
-  /** \brief set CS_ENABLE_SERVE flag
+  /** \brief Set CS_ENABLE_SERVE flag.
    *  \sa https://redmine.named-data.net/projects/nfd/wiki/CsMgmt#Update-config
    */
   void
-  enableServe(bool shouldServe);
+  enableServe(bool shouldServe) noexcept;
 
 public: // enumeration
   using const_iterator = Table::const_iterator;
diff --git a/daemon/table/fib-entry.hpp b/daemon/table/fib-entry.hpp
index c300208..03a2c2e 100644
--- a/daemon/table/fib-entry.hpp
+++ b/daemon/table/fib-entry.hpp
@@ -82,7 +82,7 @@
   hasNextHop(const Face& face) const;
 
 private:
-  /** \brief adds a NextHop record to the entry
+  /** \brief Adds a NextHop record to the entry.
    *
    *  If a NextHop record for \p face already exists in the entry, its cost is set to \p cost.
    *
@@ -92,7 +92,7 @@
   std::pair<NextHopList::iterator, bool>
   addOrUpdateNextHop(Face& face, uint64_t cost);
 
-  /** \brief removes a NextHop record
+  /** \brief Removes a NextHop record.
    *
    *  If no NextHop record for face exists, do nothing.
    */
@@ -104,7 +104,7 @@
   NextHopList::iterator
   findNextHop(const Face& face);
 
-  /** \brief sorts the nexthop list
+  /** \brief Sorts the nexthop list.
    */
   void
   sortNextHops();
diff --git a/daemon/table/fib.hpp b/daemon/table/fib.hpp
index 6073533..bfeedf8 100644
--- a/daemon/table/fib.hpp
+++ b/daemon/table/fib.hpp
@@ -43,7 +43,9 @@
 
 namespace fib {
 
-/** \brief Represents the Forwarding Information Base (FIB)
+/**
+ * \brief Represents the Forwarding Information Base (FIB).
+ * \sa fib::Entry
  */
 class Fib : noncopyable
 {
@@ -52,32 +54,32 @@
   Fib(NameTree& nameTree);
 
   size_t
-  size() const
+  size() const noexcept
   {
     return m_nItems;
   }
 
 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())`
    */
   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())`
    */
   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);
@@ -91,7 +93,7 @@
     return NameTree::getMaxDepth();
   }
 
-  /** \brief Find or insert a FIB entry
+  /** \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
    */
@@ -104,7 +106,7 @@
   void
   erase(const Entry& entry);
 
-  /** \brief Add a NextHop record
+  /** \brief Add a NextHop record.
    *
    *  If a NextHop record for \p face already exists in \p entry, its cost is set to \p cost.
    */
@@ -117,7 +119,7 @@
     FIB_ENTRY_REMOVED ///< the nexthop is removed and the fib entry is removed
   };
 
-  /** \brief Remove the NextHop record for \p face from \p entry
+  /** \brief Remove the NextHop record for \p face from \p entry.
    */
   RemoveNextHopResult
   removeNextHop(Entry& entry, const Face& face);
@@ -147,7 +149,7 @@
   }
 
 public: // signal
-  /** \brief signals on Fib entry nexthop creation
+  /** \brief Signals on Fib entry nexthop creation.
    */
   signal::Signal<Fib, Name, NextHop> afterNewNextHop;
 
diff --git a/daemon/table/measurements-accessor.hpp b/daemon/table/measurements-accessor.hpp
index 244897b..9895beb 100644
--- a/daemon/table/measurements-accessor.hpp
+++ b/daemon/table/measurements-accessor.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-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -37,10 +37,11 @@
 
 namespace measurements {
 
-/** \brief allows Strategy to access portion of Measurements table under its namespace
+/**
+ * \brief Allows fw::Strategy to access the portion of Measurements table under its namespace.
  *
- *  All public methods have the same semantics as the same method on \p Measurements,
- *  but would return nullptr if the entry falls out of the strategy's authority.
+ * All public methods have the same semantics as the corresponding methods on Measurements,
+ * but will return nullptr if the entry falls out of the strategy's authority.
  */
 class MeasurementsAccessor : noncopyable
 {
@@ -50,46 +51,44 @@
 
   ~MeasurementsAccessor();
 
-  /** \brief find or insert a Measurements entry for \p name
+  /** \brief Find or insert a Measurements entry for \p name.
    */
   Entry*
   get(const Name& name);
 
-  /** \brief find or insert a Measurements entry for \p fibEntry->getPrefix()
+  /** \brief Find or insert a Measurements entry for \p fibEntry->getPrefix().
    */
   Entry*
   get(const fib::Entry& fibEntry);
 
-  /** \brief find or insert a Measurements entry for \p pitEntry->getName()
+  /** \brief Find or insert a Measurements entry for \p pitEntry->getName().
    */
   Entry*
   get(const pit::Entry& pitEntry);
 
-  /** \brief find or insert a Measurements entry for child's parent
+  /** \brief Find or insert a Measurements entry for child's parent.
    */
   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;
+                         const EntryPredicate& pred = AnyEntry()) const;
 
-  /** \brief perform a longest prefix match for \p pitEntry.getName()
+  /** \brief Perform a longest prefix match for \p pitEntry.getName().
    */
   Entry*
   findLongestPrefixMatch(const pit::Entry& pitEntry,
-                         const EntryPredicate& pred =
-                             AnyEntry()) const;
+                         const EntryPredicate& pred = AnyEntry()) const;
 
-  /** \brief perform an exact match
+  /** \brief Perform an exact match.
    */
   Entry*
   findExactMatch(const Name& name) const;
 
-  /** \brief extend lifetime of an entry
+  /** \brief Extend lifetime of an entry.
    *
    *  The entry will be kept until at least now()+lifetime.
    */
@@ -97,7 +96,7 @@
   extendLifetime(Entry& entry, const time::nanoseconds& lifetime);
 
 private:
-  /** \brief perform access control to Measurements entry
+  /** \brief Perform access control to Measurements entry.
    *  \return entry if strategy has access to namespace, otherwise nullptr
    */
   Entry*
diff --git a/daemon/table/measurements-entry.hpp b/daemon/table/measurements-entry.hpp
index a3983ae..84624a2 100644
--- a/daemon/table/measurements-entry.hpp
+++ b/daemon/table/measurements-entry.hpp
@@ -50,14 +50,14 @@
   }
 
   const Name&
-  getName() const
+  getName() const noexcept
   {
     return m_name;
   }
 
 private:
   Name m_name;
-  time::steady_clock::TimePoint m_expiry = time::steady_clock::TimePoint::min();
+  time::steady_clock::time_point m_expiry = time::steady_clock::time_point::min();
   scheduler::EventId m_cleanup;
 
   name_tree::Entry* m_nameTreeEntry = nullptr;
diff --git a/daemon/table/measurements.hpp b/daemon/table/measurements.hpp
index 342d753..1bd0eb7 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-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -41,23 +41,26 @@
 
 namespace measurements {
 
-/** \brief A predicate that accepts or rejects an entry
+/**
+ * \brief A predicate that accepts or rejects an entry.
  */
 using EntryPredicate = std::function<bool(const Entry&)>;
 
-/** \brief An \c EntryPredicate that accepts any entry
+/**
+ * \brief An #EntryPredicate that accepts any entry.
  */
 class AnyEntry
 {
 public:
-  bool
-  operator()(const Entry&) const
+  constexpr bool
+  operator()(const Entry&) const noexcept
   {
     return true;
   }
 };
 
-/** \brief An \c EntryPredicate that accepts an entry if it has StrategyInfo of type T
+/**
+ * \brief An #EntryPredicate that accepts an entry if it has StrategyInfo of type T.
  */
 template<typename T>
 class EntryWithStrategyInfo
@@ -70,11 +73,12 @@
   }
 };
 
-/** \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
- *  place any object that derive from \c StrategyInfo type onto Measurements entries.
+ * The %Measurements table is a data structure for forwarding strategies to store per name prefix
+ * measurements. A strategy can access this table via fw::Strategy::getMeasurements(), and then
+ * place any object that derive from StrategyInfo type onto %Measurements entries.
  */
 class Measurements : noncopyable
 {
@@ -82,7 +86,7 @@
   explicit
   Measurements(NameTree& nameTree);
 
-  /** \brief maximum depth of a Measurements entry
+  /** \brief Maximum depth of a %Measurements entry.
    */
   static constexpr size_t
   getMaxDepth()
@@ -90,44 +94,44 @@
     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.
+   *  An entry name can have at most getMaxDepth() components. If \p name exceeds this limit,
+   *  it is truncated to the first getMaxDepth() components.
    */
   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;
@@ -138,7 +142,7 @@
     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.
    */
@@ -158,7 +162,7 @@
   Entry&
   get(name_tree::Entry& nte);
 
-  /** \tparam K a parameter acceptable to \c NameTree::findLongestPrefixMatch
+  /** \tparam K a parameter acceptable to NameTree::findLongestPrefixMatch()
    */
   template<typename K>
   Entry*
diff --git a/daemon/table/name-tree-entry.hpp b/daemon/table/name-tree-entry.hpp
index 644d86b..8923d9c 100644
--- a/daemon/table/name-tree-entry.hpp
+++ b/daemon/table/name-tree-entry.hpp
@@ -35,7 +35,8 @@
 
 class Node;
 
-/** \brief An entry in the name tree
+/**
+ * \brief An entry in the name tree.
  */
 class Entry : noncopyable
 {
@@ -43,7 +44,7 @@
   Entry(const Name& prefix, Node* node);
 
   const Name&
-  getName() const
+  getName() const noexcept
   {
     return m_name;
   }
@@ -52,12 +53,12 @@
    *  \retval nullptr this entry is the root entry, i.e. getName() == Name()
    */
   Entry*
-  getParent() const
+  getParent() const noexcept
   {
     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
@@ -66,14 +67,15 @@
   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();
 
-  /** \brief Check whether this entry has any children
+  /**
+   * \brief Check whether this entry has any children.
    */
   bool
   hasChildren() const
@@ -81,10 +83,11 @@
     return !m_children.empty();
   }
 
-  /** \return children of this entry
+  /**
+   * \brief Returns the children of this entry.
    */
   const std::vector<Entry*>&
-  getChildren() const
+  getChildren() const noexcept
   {
     return m_children;
   }
@@ -176,14 +179,14 @@
   friend Node* getNode(const Entry& entry);
 };
 
-/** \brief a functor to get a table entry from a name tree entry
+/** \brief A functor to get a table entry from a name tree entry.
  *  \tparam ENTRY type of single table entry attached to name tree entry, such as fib::Entry
  */
 template<typename ENTRY>
 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-hashtable.hpp b/daemon/table/name-tree-hashtable.hpp
index de96d0a..1328c2e 100644
--- a/daemon/table/name-tree-hashtable.hpp
+++ b/daemon/table/name-tree-hashtable.hpp
@@ -32,27 +32,27 @@
 
 class Entry;
 
-/** \brief a single hash value
+/** \brief A single hash value.
  */
 using HashValue = size_t;
 
-/** \brief a sequence of hash values
+/** \brief A sequence of hash values.
  *  \sa computeHashes
  */
 using HashSequence = std::vector<HashValue>;
 
-/** \brief computes hash value of \p name.getPrefix(prefixLen)
+/** \brief Computes hash value of \p name.getPrefix(prefixLen).
  */
 HashValue
 computeHash(const Name& name, size_t prefixLen = std::numeric_limits<size_t>::max());
 
-/** \brief computes hash values for each prefix of \p name.getPrefix(prefixLen)
+/** \brief Computes hash values for each prefix of \p name.getPrefix(prefixLen).
  *  \return a hash sequence, where the i-th hash value equals computeHash(name, i)
  */
 HashSequence
 computeHashes(const Name& name, size_t prefixLen = std::numeric_limits<size_t>::max());
 
-/** \brief a hashtable node
+/** \brief A hashtable node.
  *
  *  Zero or more nodes can be added to a hashtable bucket. They are organized as
  *  a doubly linked list through prev and next pointers.
@@ -83,7 +83,7 @@
 Node*
 getNode(const Entry& entry);
 
-/** \brief invoke a function for each node in a doubly linked list
+/** \brief Invoke a function for each node in a doubly linked list.
  *  \tparam N either Node or const Node
  *  \tparam F a functor with signature void F(N*)
  *  \note It's safe to delete the node in the function.
@@ -100,50 +100,50 @@
   }
 }
 
-/** \brief provides options for Hashtable
+/**
+ * \brief Provides options for Hashtable.
  */
-class HashtableOptions
+struct HashtableOptions
 {
-public:
-  /** \brief constructor
+  /** \brief Constructor.
    *  \post initialSize == size
    *  \post minSize == size
    */
   explicit
   HashtableOptions(size_t size = 16);
 
-public:
-  /** \brief initial number of buckets
+  /** \brief Initial number of buckets.
    */
   size_t initialSize;
 
-  /** \brief minimal number of buckets
+  /** \brief Minimal number of buckets.
    */
   size_t minSize;
 
-  /** \brief if hashtable has more than nBuckets*expandLoadFactor nodes, it will be expanded
+  /** \brief If the hashtable has more than `nBuckets*expandLoadFactor` nodes, it will be expanded.
    */
   float expandLoadFactor = 0.5f;
 
-  /** \brief when hashtable is expanded, its new size is nBuckets*expandFactor
+  /** \brief When the hashtable is expanded, its new size will be `nBuckets*expandFactor`.
    */
   float expandFactor = 2.0f;
 
-  /** \brief if hashtable has less than nBuckets*shrinkLoadFactor nodes, it will be shrunk
+  /** \brief If the hashtable has less than `nBuckets*shrinkLoadFactor` nodes, it will be shrunk.
    */
   float shrinkLoadFactor = 0.1f;
 
-  /** \brief when hashtable is shrunk, its new size is max(nBuckets*shrinkFactor, minSize)
+  /** \brief When the hashtable is shrunk, its new size will be `max(nBuckets*shrinkFactor, minSize)`.
    */
   float shrinkFactor = 0.5f;
 };
 
-/** \brief a hashtable for fast exact name lookup
+/**
+ * \brief A hashtable for fast exact name lookup.
  *
- *  The Hashtable contains a number of buckets.
- *  Each node is placed into a bucket determined by a hash value computed from its name.
- *  Hash collision is resolved through a doubly linked list in each bucket.
- *  The number of buckets is adjusted according to how many nodes are stored.
+ * The Hashtable contains a number of buckets.
+ * Each node is placed into a bucket determined by a hash value computed from its name.
+ * Hash collision is resolved through a doubly linked list in each bucket.
+ * The number of buckets is adjusted according to how many nodes are stored.
  */
 class Hashtable
 {
@@ -153,7 +153,7 @@
   explicit
   Hashtable(const Options& options);
 
-  /** \brief deallocates all nodes
+  /** \brief Deallocates all nodes.
    */
   ~Hashtable();
 
@@ -191,39 +191,39 @@
     return m_buckets[bucket]; // don't use m_bucket.at() for better performance
   }
 
-  /** \brief find node for name.getPrefix(prefixLen)
+  /** \brief Find node for name.getPrefix(prefixLen).
    *  \pre name.size() > prefixLen
    */
   const Node*
   find(const Name& name, size_t prefixLen) const;
 
-  /** \brief find node for name.getPrefix(prefixLen)
+  /** \brief Find node for name.getPrefix(prefixLen).
    *  \pre name.size() > prefixLen
    *  \pre hashes == computeHashes(name)
    */
   const Node*
   find(const Name& name, size_t prefixLen, const HashSequence& hashes) const;
 
-  /** \brief find or insert node for name.getPrefix(prefixLen)
+  /** \brief Find or insert node for name.getPrefix(prefixLen).
    *  \pre name.size() > prefixLen
    *  \pre hashes == computeHashes(name)
    */
   std::pair<const Node*, bool>
   insert(const Name& name, size_t prefixLen, const HashSequence& hashes);
 
-  /** \brief delete node
+  /** \brief Delete node.
    *  \pre node exists in this hashtable
    */
   void
   erase(Node* node);
 
 private:
-  /** \brief attach node to bucket
+  /** \brief Attach node to bucket.
    */
   void
   attach(size_t bucket, Node* node);
 
-  /** \brief detach node from bucket
+  /** \brief Detach node from bucket.
    */
   void
   detach(size_t bucket, Node* node);
diff --git a/daemon/table/name-tree-iterator.cpp b/daemon/table/name-tree-iterator.cpp
index 001bb06..ecfe40d 100644
--- a/daemon/table/name-tree-iterator.cpp
+++ b/daemon/table/name-tree-iterator.cpp
@@ -37,18 +37,11 @@
 
 NFD_LOG_INIT(NameTreeIterator);
 
-Iterator::Iterator()
-  : m_entry(nullptr)
-  , m_ref(nullptr)
-  , m_state(0)
-{
-}
+Iterator::Iterator() = default;
 
 Iterator::Iterator(shared_ptr<EnumerationImpl> impl, const Entry* ref)
   : m_impl(std::move(impl))
-  , m_entry(nullptr)
   , m_ref(ref)
-  , m_state(0)
 {
   m_impl->advance(*this);
   NFD_LOG_TRACE("initialized " << *this);
diff --git a/daemon/table/name-tree-iterator.hpp b/daemon/table/name-tree-iterator.hpp
index 4a76a53..4458a3e 100644
--- a/daemon/table/name-tree-iterator.hpp
+++ b/daemon/table/name-tree-iterator.hpp
@@ -34,33 +34,36 @@
 
 class NameTree;
 
-/** \brief a predicate to accept or reject an Entry in find operations
+/**
+ * \brief A predicate to accept or reject an Entry in find operations.
  */
 using EntrySelector = std::function<bool(const Entry&)>;
 
-/** \brief an EntrySelector that accepts every Entry
+/**
+ * \brief An #EntrySelector that accepts every Entry.
  */
 struct AnyEntry
 {
-  bool
-  operator()(const Entry&) const
+  constexpr bool
+  operator()(const Entry&) const noexcept
   {
     return true;
   }
 };
 
-/** \brief a predicate to accept or reject an Entry and its children
+/** \brief A predicate to accept or reject an Entry and its children.
  *  \return `.first` indicates whether entry should be accepted;
  *          `.second` indicates whether entry's children should be visited
  */
 using EntrySubTreeSelector = std::function<std::pair<bool, bool>(const Entry&)>;
 
-/** \brief an EntrySubTreeSelector that accepts every Entry and its children
+/**
+ * \brief An #EntrySubTreeSelector that accepts every Entry and its children.
  */
 struct AnyEntrySubTree
 {
-  std::pair<bool, bool>
-  operator()(const Entry&) const
+  constexpr std::pair<bool, bool>
+  operator()(const Entry&) const noexcept
   {
     return {true, true};
   }
@@ -68,7 +71,8 @@
 
 class EnumerationImpl;
 
-/** \brief NameTree iterator
+/**
+ * \brief NameTree iterator.
  */
 class Iterator
 {
@@ -113,21 +117,21 @@
   }
 
 private:
-  /** \brief enumeration implementation; nullptr for end iterator
+  /** \brief Enumeration implementation; nullptr for end iterator.
    */
   shared_ptr<EnumerationImpl> m_impl;
 
-  /** \brief current entry; nullptr for uninitialized iterator
+  /** \brief Current entry; nullptr for uninitialized iterator.
    */
-  const Entry* m_entry;
+  const Entry* m_entry = nullptr;
 
-  /** \brief reference entry used by enumeration implementation
+  /** \brief Reference entry used by enumeration implementation.
    */
-  const Entry* m_ref;
+  const Entry* m_ref = nullptr;
 
-  /** \brief state used by enumeration implementation
+  /** \brief State used by enumeration implementation.
    */
-  int m_state;
+  int m_state = 0;
 
   friend std::ostream& operator<<(std::ostream&, const Iterator&);
   friend class FullEnumerationImpl;
@@ -138,7 +142,7 @@
 std::ostream&
 operator<<(std::ostream& os, const Iterator& i);
 
-/** \brief enumeration operation implementation
+/** \brief Enumeration operation implementation.
  */
 class EnumerationImpl
 {
@@ -157,7 +161,7 @@
   const Hashtable& ht;
 };
 
-/** \brief full enumeration implementation
+/** \brief Full enumeration implementation.
  */
 class FullEnumerationImpl final : public EnumerationImpl
 {
@@ -171,7 +175,7 @@
   EntrySelector m_pred;
 };
 
-/** \brief partial enumeration implementation
+/** \brief Partial enumeration implementation.
  *
  *  Iterator::m_ref should be initialized to subtree root.
  *  Iterator::m_state LSB indicates whether to visit children of m_entry.
@@ -188,7 +192,7 @@
   EntrySubTreeSelector m_pred;
 };
 
-/** \brief partial enumeration implementation
+/** \brief Partial enumeration implementation.
  *
  *  Iterator::m_ref should be initialized to longest prefix matched entry.
  */
@@ -205,7 +209,7 @@
   EntrySelector m_pred;
 };
 
-/** \brief a Forward Range of name tree entries
+/** \brief A Forward Range of name tree entries.
  *
  *  This type has .begin() and .end() methods which return Iterator.
  *  This type is usable with range-based for.
diff --git a/daemon/table/network-region-table.hpp b/daemon/table/network-region-table.hpp
index 96acf87..b4ee652 100644
--- a/daemon/table/network-region-table.hpp
+++ b/daemon/table/network-region-table.hpp
@@ -30,7 +30,7 @@
 
 namespace nfd {
 
-/** \brief stores a collection of producer region names
+/** \brief Stores a collection of producer region names.
  *
  *  This table is used in forwarding to process Interests with Link objects.
  *
@@ -40,7 +40,7 @@
 class NetworkRegionTable : public std::set<Name>
 {
 public:
-  /** \brief determines whether an Interest has reached a producer region
+  /** \brief Determines whether an Interest has reached a producer region.
    *  \param forwardingHint forwarding hint of an Interest
    *  \retval true the Interest has reached a producer region
    *  \retval false the Interest has not reached a producer region
diff --git a/daemon/table/pit-entry.hpp b/daemon/table/pit-entry.hpp
index bc4f1d3..f612512 100644
--- a/daemon/table/pit-entry.hpp
+++ b/daemon/table/pit-entry.hpp
@@ -38,12 +38,12 @@
 namespace nfd::pit {
 
 /**
- * \brief An unordered collection of in-records
+ * \brief An unordered collection of in-records.
  */
 using InRecordCollection = std::list<InRecord>;
 
 /**
- * \brief An unordered collection of out-records
+ * \brief An unordered collection of out-records.
  */
 using OutRecordCollection = std::list<OutRecord>;
 
@@ -134,24 +134,24 @@
     return m_inRecords.end();
   }
 
-  /** \brief get the in-record for \p face
+  /** \brief Get the in-record for \p face.
    *  \return an iterator to the in-record, or in_end() if it does not exist
    */
   InRecordCollection::iterator
   getInRecord(const Face& face);
 
-  /** \brief insert or update an in-record
+  /** \brief Insert or update an in-record.
    *  \return an iterator to the new or updated in-record
    */
   InRecordCollection::iterator
   insertOrUpdateInRecord(Face& face, const Interest& interest);
 
-  /** \brief delete the in-record for \p face if it exists
+  /** \brief Delete the in-record for \p face if it exists.
    */
   void
   deleteInRecord(const Face& face);
 
-  /** \brief delete all in-records
+  /** \brief Delete all in-records.
    */
   void
   clearInRecords();
@@ -201,35 +201,35 @@
     return m_outRecords.end();
   }
 
-  /** \brief get the out-record for \p face
+  /** \brief Get the out-record for \p face.
    *  \return an iterator to the out-record, or out_end() if it does not exist
    */
   OutRecordCollection::iterator
   getOutRecord(const Face& face);
 
-  /** \brief insert or update an out-record
+  /** \brief Insert or update an out-record.
    *  \return an iterator to the new or updated out-record
    */
   OutRecordCollection::iterator
   insertOrUpdateOutRecord(Face& face, const Interest& interest);
 
-  /** \brief delete the out-record for \p face if it exists
+  /** \brief Delete the out-record for \p face if it exists.
    */
   void
   deleteOutRecord(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 Indicates whether this PIT entry is satisfied
+  /** \brief Indicates whether this PIT entry is satisfied.
    */
   bool isSatisfied = false;
 
-  /** \brief Data freshness period
+  /** \brief Data freshness period.
    *  \note This field is meaningful only if isSatisfied is true
    */
   time::milliseconds dataFreshnessPeriod = 0_ms;
diff --git a/daemon/table/pit-face-record.hpp b/daemon/table/pit-face-record.hpp
index edb0783..830316e 100644
--- a/daemon/table/pit-face-record.hpp
+++ b/daemon/table/pit-face-record.hpp
@@ -31,9 +31,10 @@
 
 namespace nfd::pit {
 
-/** \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
+/**
+ * \brief Contains information about an Interest on an incoming or outgoing face.
+ * \note This class is an implementation detail to extract common functionality
+ *       of InRecord and OutRecord.
  */
 class FaceRecord : public StrategyInfoHost
 {
@@ -45,33 +46,33 @@
   }
 
   Face&
-  getFace() const
+  getFace() const noexcept
   {
     return m_face;
   }
 
   Interest::Nonce
-  getLastNonce() const
+  getLastNonce() const noexcept
   {
     return m_lastNonce;
   }
 
-  time::steady_clock::TimePoint
-  getLastRenewed() const
+  time::steady_clock::time_point
+  getLastRenewed() const noexcept
   {
     return m_lastRenewed;
   }
 
-  /** \brief Returns the time point at which this record expires
+  /** \brief Returns the time point at which this record expires.
    *  \return getLastRenewed() + InterestLifetime
    */
-  time::steady_clock::TimePoint
-  getExpiry() const
+  time::steady_clock::time_point
+  getExpiry() const noexcept
   {
     return m_expiry;
   }
 
-  /** \brief updates lastNonce, lastRenewed, expiry fields
+  /** \brief Updates lastNonce, lastRenewed, expiry fields.
    */
   void
   update(const Interest& interest);
@@ -79,8 +80,8 @@
 private:
   Face& m_face;
   Interest::Nonce m_lastNonce{0, 0, 0, 0};
-  time::steady_clock::TimePoint m_lastRenewed = time::steady_clock::TimePoint::min();
-  time::steady_clock::TimePoint m_expiry = time::steady_clock::TimePoint::min();
+  time::steady_clock::time_point m_lastRenewed = time::steady_clock::time_point::min();
+  time::steady_clock::time_point m_expiry = time::steady_clock::time_point::min();
 };
 
 } // namespace nfd::pit
diff --git a/daemon/table/pit-in-record.hpp b/daemon/table/pit-in-record.hpp
index c61f61d..95dc710 100644
--- a/daemon/table/pit-in-record.hpp
+++ b/daemon/table/pit-in-record.hpp
@@ -30,7 +30,8 @@
 
 namespace nfd::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
 {
@@ -38,7 +39,7 @@
   using FaceRecord::FaceRecord;
 
   const Interest&
-  getInterest() const
+  getInterest() const noexcept
   {
     BOOST_ASSERT(m_interest != nullptr);
     return *m_interest;
diff --git a/daemon/table/pit-iterator.hpp b/daemon/table/pit-iterator.hpp
index 014ddc1..2138b77 100644
--- a/daemon/table/pit-iterator.hpp
+++ b/daemon/table/pit-iterator.hpp
@@ -31,7 +31,8 @@
 
 namespace nfd::pit {
 
-/** \brief PIT iterator
+/**
+ * \brief PIT iterator.
  */
 class Iterator
 {
@@ -42,7 +43,7 @@
   using pointer           = value_type*;
   using reference         = value_type&;
 
-  /** \brief constructor
+  /** \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
    */
diff --git a/daemon/table/pit-out-record.hpp b/daemon/table/pit-out-record.hpp
index aeb7523..f165370 100644
--- a/daemon/table/pit-out-record.hpp
+++ b/daemon/table/pit-out-record.hpp
@@ -30,42 +30,43 @@
 
 namespace nfd::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:
   using FaceRecord::FaceRecord;
 
-  /** \return last NACK returned by \p getFace()
+  /** \brief Returns the last NACK returned by getFace().
    *
    *  A nullptr return value means the Interest is still pending or has timed out.
    *  A non-null return value means the last outgoing Interest has been NACKed.
    */
   const lp::NackHeader*
-  getIncomingNack() const
+  getIncomingNack() const noexcept
   {
     return m_incomingNack.get();
   }
 
-  /** \brief sets a NACK received from \p getFace()
+  /** \brief Sets a NACK received from getFace().
    *  \return whether incoming NACK is accepted
    *
    *  This is invoked in incoming NACK pipeline.
-   *  An incoming NACK is accepted if its Nonce matches \p getLastNonce().
-   *  If accepted, \p nack.getHeader() will be copied,
-   *  and any pointer previously returned by \p .getIncomingNack() .
+   *  An incoming NACK is accepted if its Nonce matches getLastNonce().
+   *  If accepted, `nack.getHeader()` will be copied,
+   *  and any pointer previously returned by getIncomingNack().
    */
   bool
   setIncomingNack(const lp::Nack& nack);
 
-  /** \brief clears last NACK
+  /** \brief Clears last NACK.
    *
    *  This is invoked in outgoing Interest pipeline.
-   *  This invalidates any pointer previously returned by \p .getIncomingNack() .
+   *  This invalidates any pointer previously returned by getIncomingNack().
    */
   void
-  clearIncomingNack()
+  clearIncomingNack() noexcept
   {
     m_incomingNack.reset();
   }
