diff --git a/src/route/fib.cpp b/src/route/fib.cpp
index 0975c20..d47d880 100644
--- a/src/route/fib.cpp
+++ b/src/route/fib.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  The University of Memphis,
+ * Copyright (c) 2014-2023,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -242,10 +242,10 @@
 }
 
 void
-Fib::unregisterPrefix(const ndn::Name& namePrefix, const std::string& faceUri)
+Fib::unregisterPrefix(const ndn::Name& namePrefix, const ndn::FaceUri& faceUri)
 {
   uint64_t faceId = 0;
-  auto adjacent = m_adjacencyList.findAdjacent(ndn::FaceUri(faceUri));
+  auto adjacent = m_adjacencyList.findAdjacent(faceUri);
   if (adjacent != m_adjacencyList.end()) {
     faceId = adjacent->getFaceId();
   }
diff --git a/src/route/fib.hpp b/src/route/fib.hpp
index 1a9b75f..8c53125 100644
--- a/src/route/fib.hpp
+++ b/src/route/fib.hpp
@@ -165,7 +165,7 @@
    *
    */
   void
-  unregisterPrefix(const ndn::Name& namePrefix, const std::string& faceUri);
+  unregisterPrefix(const ndn::Name& namePrefix, const ndn::FaceUri& faceUri);
 
   /*! \brief Log registration success, and update the Face ID associated with a URI.
    */
diff --git a/src/route/nexthop-list.hpp b/src/route/nexthop-list.hpp
index 98e5760..1ed1a5a 100644
--- a/src/route/nexthop-list.hpp
+++ b/src/route/nexthop-list.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  The University of Memphis,
+ * Copyright (c) 2014-2023,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -31,42 +31,16 @@
 
 namespace nlsr {
 
-struct NextHopComparator {
+struct NextHopUriSortedComparator
+{
   bool
-  operator() (const NextHop& nh1, const NextHop& nh2) const {
-    if (nh1.getRouteCostAsAdjustedInteger() < nh2.getRouteCostAsAdjustedInteger()) {
-      return true;
-    }
-    else if (nh1.getRouteCostAsAdjustedInteger() == nh2.getRouteCostAsAdjustedInteger()) {
-      return nh1.getConnectingFaceUri() < nh2.getConnectingFaceUri();
-    }
-    else {
-      return false;
-    }
+  operator()(const NextHop& lhs, const NextHop& rhs) const
+  {
+    return lhs.getConnectingFaceUri() < rhs.getConnectingFaceUri();
   }
 };
 
-struct NextHopUriSortedComparator {
-  bool
-  operator() (const NextHop& nh1, const NextHop& nh2) const {
-    return nh1.getConnectingFaceUri() < nh2.getConnectingFaceUri();
-  }
-};
-
-static inline bool
-nexthopAddCompare(const NextHop& nh1, const NextHop& nh2)
-{
-  return nh1.getConnectingFaceUri() == nh2.getConnectingFaceUri();
-}
-
-static inline bool
-nexthopRemoveCompare(const NextHop& nh1, const NextHop& nh2)
-{
-  return (nh1.getConnectingFaceUri() == nh2.getConnectingFaceUri() &&
-          nh1.getRouteCostAsAdjustedInteger() == nh2.getRouteCostAsAdjustedInteger()) ;
-}
-
-template<typename T = NextHopComparator>
+template<typename T = std::less<NextHop>>
 class NexthopListT
 {
 public:
@@ -76,19 +50,21 @@
     \param nh The next hop.
 
     Adds a next hop to this object. If the next hop is new it is
-    added. If the next hop already exists in the list then that next
-    hop's route cost is updated.
+    added. If the next hop already exists but has a higher cost then
+    its route cost is updated.
   */
   void
   addNextHop(const NextHop& nh)
   {
     auto it = std::find_if(m_nexthopList.begin(), m_nexthopList.end(),
-                           std::bind(&nexthopAddCompare, _1, nh));
+      [&nh] (const auto& item) {
+        return item.getConnectingFaceUri() == nh.getConnectingFaceUri();
+      });
     if (it == m_nexthopList.end()) {
       m_nexthopList.insert(nh);
     }
     else if (it->getRouteCost() > nh.getRouteCost()) {
-      removeNextHop(*it);
+      m_nexthopList.erase(it);
       m_nexthopList.insert(nh);
     }
   }
@@ -101,8 +77,7 @@
   void
   removeNextHop(const NextHop& nh)
   {
-    auto it = std::find_if(m_nexthopList.begin(), m_nexthopList.end(),
-                           std::bind(&nexthopRemoveCompare, _1, nh));
+    auto it = std::find(m_nexthopList.begin(), m_nexthopList.end(), nh);
     if (it != m_nexthopList.end()) {
       m_nexthopList.erase(it);
     }
diff --git a/src/route/nexthop.cpp b/src/route/nexthop.cpp
index a5f10ba..aeeb641 100644
--- a/src/route/nexthop.cpp
+++ b/src/route/nexthop.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  The University of Memphis,
+ * Copyright (c) 2014-2023,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -32,7 +32,7 @@
   size_t totalLength = 0;
 
   totalLength += ndn::encoding::prependDoubleBlock(block, nlsr::tlv::CostDouble, m_routeCost);
-  totalLength += ndn::encoding::prependStringBlock(block, nlsr::tlv::Uri, m_connectingFaceUri);
+  totalLength += ndn::encoding::prependStringBlock(block, nlsr::tlv::Uri, m_connectingFaceUri.toString());
 
   totalLength += block.prependVarNumber(totalLength);
   totalLength += block.prependVarNumber(nlsr::tlv::NextHop);
@@ -63,7 +63,7 @@
 void
 NextHop::wireDecode(const ndn::Block& wire)
 {
-  m_connectingFaceUri = "";
+  m_connectingFaceUri = {};
   m_routeCost = 0;
 
   m_wire = wire;
@@ -77,7 +77,12 @@
   auto val = m_wire.elements_begin();
 
   if (val != m_wire.elements_end() && val->type() == nlsr::tlv::Uri) {
-    m_connectingFaceUri = ndn::encoding::readString(*val);
+    try {
+      m_connectingFaceUri = ndn::FaceUri(ndn::encoding::readString(*val));
+    }
+    catch (const ndn::FaceUri::Error& e) {
+      NDN_THROW_NESTED(Error("Invalid Uri"));
+    }
     ++val;
   }
   else {
@@ -93,13 +98,6 @@
   }
 }
 
-bool
-operator==(const NextHop& lhs, const NextHop& rhs)
-{
-  return (lhs.getRouteCostAsAdjustedInteger() == rhs.getRouteCostAsAdjustedInteger()) &&
-         (lhs.getConnectingFaceUri() == rhs.getConnectingFaceUri());
-}
-
 std::ostream&
 operator<<(std::ostream& os, const NextHop& hop)
 {
diff --git a/src/route/nexthop.hpp b/src/route/nexthop.hpp
index 77bc8b1..6629d89 100644
--- a/src/route/nexthop.hpp
+++ b/src/route/nexthop.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  The University of Memphis,
+ * Copyright (c) 2014-2023,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -26,6 +26,9 @@
 #include <ndn-cxx/encoding/block.hpp>
 #include <ndn-cxx/encoding/encoding-buffer.hpp>
 #include <ndn-cxx/encoding/tlv.hpp>
+#include <ndn-cxx/net/face-uri.hpp>
+
+#include <boost/operators.hpp>
 
 #include <cmath>
 #include <ostream>
@@ -40,38 +43,33 @@
  *
  * \sa https://redmine.named-data.net/projects/nlsr/wiki/Routing_Table_Dataset
  */
-class NextHop
+class NextHop : private boost::totally_ordered<NextHop>
 {
 public:
   using Error = ndn::tlv::Error;
 
-  NextHop()
-    : m_connectingFaceUri()
-    , m_routeCost(0)
-    , m_isHyperbolic(false)
-  {
-  }
+  NextHop() = default;
 
-  NextHop(const std::string& cfu, double rc)
+  NextHop(const ndn::FaceUri& cfu, double rc)
     : m_connectingFaceUri(cfu)
     , m_routeCost(rc)
-    , m_isHyperbolic(false)
   {
   }
 
+  explicit
   NextHop(const ndn::Block& block)
   {
     wireDecode(block);
   }
 
-  const std::string&
+  const ndn::FaceUri&
   getConnectingFaceUri() const
   {
     return m_connectingFaceUri;
   }
 
   void
-  setConnectingFaceUri(const std::string& cfu)
+  setConnectingFaceUri(const ndn::FaceUri& cfu)
   {
     m_connectingFaceUri = cfu;
   }
@@ -124,10 +122,29 @@
   void
   wireDecode(const ndn::Block& wire);
 
+private: // non-member operators
+  // NOTE: the following "hidden friend" operators are available via
+  //       argument-dependent lookup only and must be defined inline.
+  // boost::totally_ordered provides !=, <=, >=, and > operators.
+
+  friend bool
+  operator==(const NextHop& lhs, const NextHop& rhs)
+  {
+    return lhs.getRouteCostAsAdjustedInteger() == rhs.getRouteCostAsAdjustedInteger() &&
+           lhs.getConnectingFaceUri() == rhs.getConnectingFaceUri();
+  }
+
+  friend bool
+  operator<(const NextHop& lhs, const NextHop& rhs)
+  {
+    return std::forward_as_tuple(lhs.getRouteCostAsAdjustedInteger(), lhs.getConnectingFaceUri()) <
+           std::forward_as_tuple(rhs.getRouteCostAsAdjustedInteger(), rhs.getConnectingFaceUri());
+  }
+
 private:
-  std::string m_connectingFaceUri;
-  double m_routeCost;
-  bool m_isHyperbolic;
+  ndn::FaceUri m_connectingFaceUri;
+  double m_routeCost = 0.0;
+  bool m_isHyperbolic = false;
 
   mutable ndn::Block m_wire;
 
@@ -147,9 +164,6 @@
 
 NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(NextHop);
 
-bool
-operator==(const NextHop& lhs, const NextHop& rhs);
-
 std::ostream&
 operator<<(std::ostream& os, const NextHop& hop);
 
diff --git a/src/route/routing-table-calculator.cpp b/src/route/routing-table-calculator.cpp
index a7419ce..54c8a47 100644
--- a/src/route/routing-table-calculator.cpp
+++ b/src/route/routing-table-calculator.cpp
@@ -348,8 +348,7 @@
         // Fetch its actual name
         auto nextHopRouterName = pMap.getRouterNameByMappingNo(nextHopRouter);
         if (nextHopRouterName) {
-          std::string nextHopFace =
-            adjacencies.getAdjacent(*nextHopRouterName).getFaceUri().toString();
+          auto nextHopFace = adjacencies.getAdjacent(*nextHopRouterName).getFaceUri();
           // Add next hop to routing table
           NextHop nh(nextHopFace, routeCost);
           rt.addNextHop(*(pMap.getRouterNameByMappingNo(i)), nh);
@@ -451,10 +450,8 @@
       continue;
     }
 
-    std::string srcFaceUri = adj->getFaceUri().toString();
-
     // Install nexthops for this router to the neighbor; direct neighbors have a 0 cost link
-    addNextHop(srcRouterName, srcFaceUri, 0, rt);
+    addNextHop(srcRouterName, adj->getFaceUri(), 0, rt);
 
     auto src = map.getMappingNoByRouterName(srcRouterName);
     if (!src) {
@@ -477,7 +474,7 @@
                            << " to " << *destRouterName);
             continue;
           }
-          addNextHop(*destRouterName, srcFaceUri, distance, rt);
+          addNextHop(*destRouterName, adj->getFaceUri(), distance, rt);
         }
       }
     }
@@ -618,7 +615,7 @@
 }
 
 void
-HyperbolicRoutingCalculator::addNextHop(ndn::Name dest, std::string faceUri,
+HyperbolicRoutingCalculator::addNextHop(const ndn::Name& dest, const ndn::FaceUri& faceUri,
                                         double cost, RoutingTable& rt)
 {
   NextHop hop(faceUri, cost);
diff --git a/src/route/routing-table-calculator.hpp b/src/route/routing-table-calculator.hpp
index 749c5b8..45af713 100644
--- a/src/route/routing-table-calculator.hpp
+++ b/src/route/routing-table-calculator.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  The University of Memphis,
+ * Copyright (c) 2014-2023,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -214,7 +214,7 @@
   getHyperbolicDistance(Lsdb& lsdb, ndn::Name src, ndn::Name dest);
 
   void
-  addNextHop(ndn::Name destinationRouter, std::string faceUri, double cost, RoutingTable& rt);
+  addNextHop(const ndn::Name& destinationRouter, const ndn::FaceUri& faceUri, double cost, RoutingTable& rt);
 
   double
   calculateHyperbolicDistance(double rI, double rJ, double deltaTheta);
