diff --git a/src/common.hpp b/src/common.hpp
index a0db086..2076cae 100644
--- a/src/common.hpp
+++ b/src/common.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-2024,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -39,21 +39,6 @@
 
 constexpr ndn::time::seconds TIME_ALLOWED_FOR_CANONIZATION = 4_s;
 
-template<typename T, typename = void>
-struct is_iterator
-{
-  static constexpr bool value = false;
-};
-
-/*! Use C++11 iterator_traits to check if some type is an iterator
- */
-template<typename T>
-struct is_iterator<T, std::enable_if_t<!std::is_same_v<
-  typename std::iterator_traits<T>::value_type, void>>>
-{
-  static constexpr bool value = true;
-};
-
 } // namespace nlsr
 
 #endif // NLSR_COMMON_HPP
diff --git a/src/route/map.hpp b/src/route/map.hpp
deleted file mode 100644
index c43a777..0000000
--- a/src/route/map.hpp
+++ /dev/null
@@ -1,111 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2014-2024,  The University of Memphis,
- *                           Regents of the University of California
- *
- * This file is part of NLSR (Named-data Link State Routing).
- * See AUTHORS.md for complete list of NLSR authors and contributors.
- *
- * NLSR 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.
- *
- * NLSR 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
- * NLSR, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef NLSR_MAP_HPP
-#define NLSR_MAP_HPP
-
-#include "common.hpp"
-#include "lsa/adj-lsa.hpp"
-
-#include <boost/bimap.hpp>
-#include <boost/bimap/unordered_set_of.hpp>
-
-#include <optional>
-
-namespace nlsr {
-
-class Map
-{
-public:
-  /*! \brief Add a map entry to this map.
-    \param rtrName The name of the router.
-
-    Adds a router to this map. Each entry is also given an arbitrary,
-    ascending mappingNo (mapping number).
-  */
-  void
-  addEntry(const ndn::Name& rtrName);
-
-  /*! Populates the Map with AdjacencyLsas.
-
-    \note IteratorType must an iterator type, and begin to end must represent a valid range.
-  */
-  template<typename IteratorType>
-  void
-  createFromAdjLsdb(IteratorType begin, IteratorType end)
-  {
-    BOOST_STATIC_ASSERT_MSG(is_iterator<IteratorType>::value, "IteratorType must be an iterator!");
-    for (auto lsa = begin; lsa != end; lsa++) {
-      auto adjLsa = std::static_pointer_cast<AdjLsa>(*lsa);
-      addEntry(adjLsa->getOriginRouter());
-      for (const auto& adjacent : adjLsa->getAdl().getAdjList()) {
-        addEntry(adjacent.getName());
-      }
-    }
-  }
-
-  /*! Populates the Map with CoordinateLsas.
-
-    \note IteratorType must an iterator type, and begin to end must represent a valid range.
-  */
-  template<typename IteratorType>
-  void
-  createFromCoordinateLsdb(IteratorType begin, IteratorType end)
-  {
-    BOOST_STATIC_ASSERT_MSG(is_iterator<IteratorType>::value, "IteratorType must be an iterator!");
-    for (auto lsa = begin; lsa != end; lsa++) {
-      addEntry((*lsa)->getOriginRouter());
-    }
-  }
-
-  std::optional<ndn::Name>
-  getRouterNameByMappingNo(int32_t mn) const;
-
-  std::optional<int32_t>
-  getMappingNoByRouterName(const ndn::Name& rName);
-
-  size_t
-  size() const
-  {
-    return m_bimap.size();
-  }
-
-private:
-  struct MappingNo;
-  boost::bimap<
-    boost::bimaps::unordered_set_of<
-      boost::bimaps::tagged<ndn::Name, ndn::Name>,
-      std::hash<ndn::Name>
-    >,
-    boost::bimaps::unordered_set_of<
-      boost::bimaps::tagged<int32_t, MappingNo>
-    >
-  > m_bimap;
-
-  friend std::ostream&
-  operator<<(std::ostream& os, const Map& map);
-};
-
-std::ostream&
-operator<<(std::ostream& os, const Map& map);
-
-} // namespace nlsr
-
-#endif // NLSR_MAP_HPP
diff --git a/src/route/map.cpp b/src/route/name-map.cpp
similarity index 79%
rename from src/route/map.cpp
rename to src/route/name-map.cpp
index 17b7113..3bc9de5 100644
--- a/src/route/map.cpp
+++ b/src/route/name-map.cpp
@@ -18,7 +18,7 @@
  * NLSR, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "map.hpp"
+#include "name-map.hpp"
 #include "nlsr.hpp"
 #include "adjacent.hpp"
 #include "lsa/lsa.hpp"
@@ -27,14 +27,14 @@
 namespace nlsr {
 
 void
-Map::addEntry(const ndn::Name& rtrName)
+NameMap::addEntry(const ndn::Name& rtrName)
 {
   int32_t mappingNo = static_cast<int32_t>(m_bimap.size());
   m_bimap.by<ndn::Name>().insert({rtrName, mappingNo});
 }
 
 std::optional<ndn::Name>
-Map::getRouterNameByMappingNo(int32_t mn) const
+NameMap::getRouterNameByMappingNo(int32_t mn) const
 {
   auto it = m_bimap.by<MappingNo>().find(mn);
   if (it == m_bimap.by<MappingNo>().end()) {
@@ -44,22 +44,22 @@
 }
 
 std::optional<int32_t>
-Map::getMappingNoByRouterName(const ndn::Name& rName)
+NameMap::getMappingNoByRouterName(const ndn::Name& rtrName) const
 {
-  auto it = m_bimap.by<ndn::Name>().find(rName);
+  auto it = m_bimap.by<ndn::Name>().find(rtrName);
   if (it == m_bimap.by<ndn::Name>().end()) {
     return std::nullopt;
   }
-  return it->get<Map::MappingNo>();
+  return it->get<MappingNo>();
 }
 
 std::ostream&
-operator<<(std::ostream& os, const Map& map)
+operator<<(std::ostream& os, const NameMap& map)
 {
-  os << "---------------Map----------------------";
+  os << "---------------NameMap---------------";
   for (const auto& entry : map.m_bimap) {
     os << "\nMapEntry: ( Router: " << entry.get<ndn::Name>()
-       << " Mapping No: " << entry.get<Map::MappingNo>() << " )";
+       << " Mapping No: " << entry.get<NameMap::MappingNo>() << " )";
   }
   return os;
 }
diff --git a/src/route/name-map.hpp b/src/route/name-map.hpp
new file mode 100644
index 0000000..00585a5
--- /dev/null
+++ b/src/route/name-map.hpp
@@ -0,0 +1,146 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2014-2024,  The University of Memphis,
+ *                           Regents of the University of California
+ *
+ * This file is part of NLSR (Named-data Link State Routing).
+ * See AUTHORS.md for complete list of NLSR authors and contributors.
+ *
+ * NLSR 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.
+ *
+ * NLSR 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
+ * NLSR, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NLSR_NAME_MAP_HPP
+#define NLSR_NAME_MAP_HPP
+
+#include "common.hpp"
+#include "lsa/adj-lsa.hpp"
+
+#include <boost/bimap.hpp>
+#include <boost/bimap/unordered_set_of.hpp>
+#include <boost/concept_check.hpp>
+
+#include <optional>
+
+namespace nlsr {
+
+/**
+ * @brief Assigning numbers to router names.
+ *
+ * NameMap assigns a "mapping number" to each inserted router name. It then provides bidirectional
+ * lookups between router names and their mapping numbers.
+ *
+ * These numbers are non-negative integers assigned sequentially, starting from zero. They can
+ * support constructing a matrix of routers, where the mapping numbers are used as row and column
+ * indices in place of router names.
+ */
+class NameMap
+{
+public:
+  /**
+   * @brief Create a NameMap populated with router names in Adjacency LSAs.
+   * @tparam IteratorType A *LegacyInputIterator* whose value type is convertible to
+   *                      `std::shared_ptr<AdjLsa>`.
+   * @param first Range begin iterator.
+   * @param last Range past-end iterator. It must be reachable by incrementing @p first .
+   * @returns NameMap populated with origin and adjacent router names.
+   */
+  template<typename IteratorType>
+  static NameMap
+  createFromAdjLsdb(IteratorType first, IteratorType last)
+  {
+    BOOST_CONCEPT_ASSERT((boost::InputIterator<IteratorType>));
+    NameMap map;
+    for (auto it = first; it != last; ++it) {
+      // *it has type std::shared_ptr<Lsa> ; it->get() has type Lsa*
+      auto lsa = static_cast<const AdjLsa*>(it->get());
+      map.addEntry(lsa->getOriginRouter());
+      for (const auto& adjacent : lsa->getAdl().getAdjList()) {
+        map.addEntry(adjacent.getName());
+      }
+    }
+    return map;
+  }
+
+  /**
+   * @brief Create a NameMap populated with router names in Coordinate LSAs.
+   * @tparam IteratorType A *LegacyInputIterator* whose value type is `std::shared_ptr<Lsa>`.
+   * @param first Range begin iterator.
+   * @param last Range past-end iterator. It must be reachable by incrementing @p first .
+   * @returns NameMap populated with origin router names.
+   */
+  template<typename IteratorType>
+  static NameMap
+  createFromCoordinateLsdb(IteratorType first, IteratorType last)
+  {
+    BOOST_CONCEPT_ASSERT((boost::InputIterator<IteratorType>));
+    NameMap map;
+    for (auto it = first; it != last; ++it) {
+      map.addEntry((*it)->getOriginRouter());
+    }
+    return map;
+  }
+
+  /**
+   * @brief Insert a router name.
+   * @param rtrName Router name.
+   */
+  void
+  addEntry(const ndn::Name& rtrName);
+
+  /**
+   * @brief Find router name by its mapping number.
+   * @param mn Mapping number.
+   * @returns Router name, or @c std::nullopt if it does not exist.
+   */
+  std::optional<ndn::Name>
+  getRouterNameByMappingNo(int32_t mn) const;
+
+  /**
+   * @brief Find mapping number of a router name.
+   * @param rtrName Router name.
+   * @returns Mapping number, or @c std::nullopt if it does not exist.
+   */
+  std::optional<int32_t>
+  getMappingNoByRouterName(const ndn::Name& rtrName) const;
+
+  /**
+   * @brief Return number of entries in this container.
+   * @returns Number of entries in this container.
+   */
+  size_t
+  size() const
+  {
+    return m_bimap.size();
+  }
+
+private:
+  struct MappingNo;
+  boost::bimap<
+    boost::bimaps::unordered_set_of<
+      boost::bimaps::tagged<ndn::Name, ndn::Name>,
+      std::hash<ndn::Name>
+    >,
+    boost::bimaps::unordered_set_of<
+      boost::bimaps::tagged<int32_t, MappingNo>
+    >
+  > m_bimap;
+
+  friend std::ostream&
+  operator<<(std::ostream& os, const NameMap& map);
+};
+
+std::ostream&
+operator<<(std::ostream& os, const NameMap& map);
+
+} // namespace nlsr
+
+#endif // NLSR_NAME_MAP_HPP
diff --git a/src/route/routing-table-calculator.cpp b/src/route/routing-table-calculator.cpp
index e65f5c0..061e151 100644
--- a/src/route/routing-table-calculator.cpp
+++ b/src/route/routing-table-calculator.cpp
@@ -21,7 +21,7 @@
 
 #include "routing-table-calculator.hpp"
 #include "lsdb.hpp"
-#include "map.hpp"
+#include "name-map.hpp"
 #include "nexthop.hpp"
 #include "nlsr.hpp"
 #include "logger.hpp"
@@ -63,7 +63,7 @@
 }
 
 void
-RoutingTableCalculator::makeAdjMatrix(const Lsdb& lsdb, Map& pMap)
+RoutingTableCalculator::makeAdjMatrix(const Lsdb& lsdb, NameMap& pMap)
 {
   // For each LSA represented in the map
   auto lsaRange = lsdb.getLsdbIterator<AdjLsa>();
@@ -120,7 +120,7 @@
 }
 
 void
-RoutingTableCalculator::writeAdjMatrixLog(const Map& map) const
+RoutingTableCalculator::writeAdjMatrixLog(const NameMap& map) const
 {
   if (!ndn_cxx_getLogger().isLevelEnabled(ndn::util::LogLevel::DEBUG)) {
     return;
@@ -232,7 +232,7 @@
 }
 
 void
-LinkStateRoutingTableCalculator::calculatePath(Map& pMap, RoutingTable& rt,
+LinkStateRoutingTableCalculator::calculatePath(NameMap& pMap, RoutingTable& rt,
                                                ConfParameter& confParam,
                                                const Lsdb& lsdb)
 {
@@ -327,7 +327,7 @@
 
 void
 LinkStateRoutingTableCalculator::addAllLsNextHopsToRoutingTable(AdjacencyList& adjacencies,
-                                                                RoutingTable& rt, Map& pMap,
+                                                                RoutingTable& rt, NameMap& pMap,
                                                                 uint32_t sourceRouter)
 {
   NLSR_LOG_DEBUG("LinkStateRoutingTableCalculator::addAllNextHopsToRoutingTable Called");
@@ -426,7 +426,7 @@
 }
 
 void
-HyperbolicRoutingCalculator::calculatePath(Map& map, RoutingTable& rt,
+HyperbolicRoutingCalculator::calculatePath(NameMap& map, RoutingTable& rt,
                                            Lsdb& lsdb, AdjacencyList& adjacencies)
 {
   NLSR_LOG_TRACE("Calculating hyperbolic paths");
diff --git a/src/route/routing-table-calculator.hpp b/src/route/routing-table-calculator.hpp
index 45af713..35e08eb 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-2023,  The University of Memphis,
+ * Copyright (c) 2014-2024,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -29,7 +29,7 @@
 
 namespace nlsr {
 
-class Map;
+class NameMap;
 class RoutingTable;
 
 class RoutingTableCalculator
@@ -55,13 +55,13 @@
     \param pMap The map to populate with the adj. data.
   */
   void
-  makeAdjMatrix(const Lsdb& lsdb, Map& pMap);
+  makeAdjMatrix(const Lsdb& lsdb, NameMap& pMap);
 
   /*! \brief Writes a formated adjacent matrix to DEBUG log
     \param map The map containing adjacent matrix data
   */
   void
-  writeAdjMatrixLog(const Map& map) const;
+  writeAdjMatrixLog(const NameMap& map) const;
 
   /*! \brief Returns how many links a router in the matrix has.
     \param sRouter The router to count the links of.
@@ -131,7 +131,7 @@
   }
 
   void
-  calculatePath(Map& pMap, RoutingTable& rt, ConfParameter& confParam,
+  calculatePath(NameMap& pMap, RoutingTable& rt, ConfParameter& confParam,
                 const Lsdb& lsdb);
 
 private:
@@ -167,7 +167,7 @@
 
   void
   addAllLsNextHopsToRoutingTable(AdjacencyList& adjacencies, RoutingTable& rt,
-                                 Map& pMap, uint32_t sourceRouter);
+                                 NameMap& pMap, uint32_t sourceRouter);
 
   /*! \brief Determines a destination's next hop.
     \param dest The router whose next hop we want to determine.
@@ -207,7 +207,7 @@
   }
 
   void
-  calculatePath(Map& map, RoutingTable& rt, Lsdb& lsdb, AdjacencyList& adjacencies);
+  calculatePath(NameMap& map, RoutingTable& rt, Lsdb& lsdb, AdjacencyList& adjacencies);
 
 private:
   double
diff --git a/src/route/routing-table.cpp b/src/route/routing-table.cpp
index fa7dee7..16bf2df 100644
--- a/src/route/routing-table.cpp
+++ b/src/route/routing-table.cpp
@@ -20,7 +20,7 @@
 
 #include "routing-table.hpp"
 #include "nlsr.hpp"
-#include "map.hpp"
+#include "name-map.hpp"
 #include "conf-parameter.hpp"
 #include "routing-table-calculator.hpp"
 #include "routing-table-entry.hpp"
@@ -127,9 +127,8 @@
 
   clearRoutingTable();
 
-  Map map;
   auto lsaRange = m_lsdb.getLsdbIterator<AdjLsa>();
-  map.createFromAdjLsdb(lsaRange.first, lsaRange.second);
+  auto map = NameMap::createFromAdjLsdb(lsaRange.first, lsaRange.second);
   NLSR_LOG_DEBUG(map);
 
   size_t nRouters = map.size();
@@ -153,9 +152,8 @@
     clearRoutingTable();
   }
 
-  Map map;
   auto lsaRange = m_lsdb.getLsdbIterator<CoordinateLsa>();
-  map.createFromCoordinateLsdb(lsaRange.first, lsaRange.second);
+  auto map = NameMap::createFromCoordinateLsdb(lsaRange.first, lsaRange.second);
   NLSR_LOG_DEBUG(map);
 
   size_t nRouters = map.size();
diff --git a/tests/route/test-hyperbolic-calculator.cpp b/tests/route/test-hyperbolic-calculator.cpp
index 5f22a53..7d50298 100644
--- a/tests/route/test-hyperbolic-calculator.cpp
+++ b/tests/route/test-hyperbolic-calculator.cpp
@@ -24,7 +24,7 @@
 #include "adjacency-list.hpp"
 #include "lsdb.hpp"
 #include "nlsr.hpp"
-#include "route/map.hpp"
+#include "route/name-map.hpp"
 #include "route/routing-table.hpp"
 
 #include "tests/io-key-chain-fixture.hpp"
@@ -100,7 +100,7 @@
     lsdb.installLsa(std::make_shared<CoordinateLsa>(coordC));
 
     auto lsaRange = lsdb.getLsdbIterator<CoordinateLsa>();
-    map.createFromCoordinateLsdb(lsaRange.first, lsaRange.second);
+    map = NameMap::createFromCoordinateLsdb(lsaRange.first, lsaRange.second);
   }
 
   void runTest(const double& expectedCost)
@@ -150,7 +150,7 @@
   ndn::DummyClientFace face;
   ConfParameter conf;
   Nlsr nlsr;
-  Map map;
+  NameMap map;
 
   RoutingTable& routingTable;
   AdjacencyList& adjacencies;
diff --git a/tests/route/test-link-state-calculator.cpp b/tests/route/test-link-state-calculator.cpp
index de1327f..40ed32f 100644
--- a/tests/route/test-link-state-calculator.cpp
+++ b/tests/route/test-link-state-calculator.cpp
@@ -25,7 +25,7 @@
 #include "adjacent.hpp"
 #include "lsdb.hpp"
 #include "nlsr.hpp"
-#include "route/map.hpp"
+#include "route/name-map.hpp"
 #include "route/routing-table.hpp"
 
 #include "tests/io-key-chain-fixture.hpp"
@@ -99,7 +99,7 @@
     lsdb.installLsa(std::make_shared<AdjLsa>(adjC));
 
     auto lsaRange = lsdb.getLsdbIterator<AdjLsa>();
-    map.createFromAdjLsdb(lsaRange.first, lsaRange.second);
+    map = NameMap::createFromAdjLsdb(lsaRange.first, lsaRange.second);
   }
 
 public:
@@ -107,7 +107,7 @@
   ConfParameter conf;
   DummyConfFileProcessor confProcessor;
   Nlsr nlsr;
-  Map map;
+  NameMap map;
 
   RoutingTable& routingTable;
   Lsdb& lsdb;
diff --git a/tests/route/test-map.cpp b/tests/route/test-name-map.cpp
similarity index 97%
rename from tests/route/test-map.cpp
rename to tests/route/test-name-map.cpp
index aabf055..e48f1aa 100644
--- a/tests/route/test-map.cpp
+++ b/tests/route/test-name-map.cpp
@@ -20,7 +20,7 @@
  * \author Ashlesh Gawande <agawande@memphis.edu>
  */
 
-#include "route/map.hpp"
+#include "route/name-map.hpp"
 
 #include "tests/boost-test.hpp"
 
@@ -30,7 +30,7 @@
 
 BOOST_AUTO_TEST_CASE(Basic)
 {
-  Map map1;
+  NameMap map1;
 
   ndn::Name name1("/r1");
   ndn::Name name2("/r2");
