diff --git a/src/route/routing-table-calculator.cpp b/src/route/routing-table-calculator.cpp
index eeaf4d2..492c39b 100644
--- a/src/route/routing-table-calculator.cpp
+++ b/src/route/routing-table-calculator.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2018,  The University of Memphis,
+ * Copyright (c) 2014-2019,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -425,8 +425,8 @@
 const double HyperbolicRoutingCalculator::UNKNOWN_RADIUS   = -1.0;
 
 void
-HyperbolicRoutingCalculator::calculatePaths(Map& map, RoutingTable& rt,
-                                            Lsdb& lsdb, AdjacencyList& adjacencies)
+HyperbolicRoutingCalculator::calculatePath(Map& map, RoutingTable& rt,
+                                           Lsdb& lsdb, AdjacencyList& adjacencies)
 {
   NLSR_LOG_TRACE("Calculating hyperbolic paths");
 
@@ -468,12 +468,12 @@
 
         ndn::optional<ndn::Name> destRouterName = map.getRouterNameByMappingNo(dest);
         if (destRouterName) {
-          double distance = getHyperbolicDistance(map, lsdb, srcRouterName, *destRouterName);
+          double distance = getHyperbolicDistance(lsdb, srcRouterName, *destRouterName);
 
           // Could not compute distance
           if (distance == UNKNOWN_DISTANCE) {
             NLSR_LOG_WARN("Could not calculate hyperbolic distance from " << srcRouterName << " to " <<
-                      *destRouterName);
+                          *destRouterName);
             continue;
           }
 
@@ -485,8 +485,7 @@
 }
 
 double
-HyperbolicRoutingCalculator::getHyperbolicDistance(Map& map, Lsdb& lsdb,
-                                                   ndn::Name src, ndn::Name dest)
+HyperbolicRoutingCalculator::getHyperbolicDistance(Lsdb& lsdb, ndn::Name src, ndn::Name dest)
 {
   NLSR_LOG_TRACE("Calculating hyperbolic distance from " << src << " to " << dest);
 
diff --git a/src/route/routing-table-calculator.hpp b/src/route/routing-table-calculator.hpp
index 6024fbd..0812aad 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-2018,  The University of Memphis,
+ * Copyright (c) 2014-2019,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -215,11 +215,11 @@
   }
 
   void
-  calculatePaths(Map& map, RoutingTable& rt, Lsdb& lsdb, AdjacencyList& adjacencies);
+  calculatePath(Map& map, RoutingTable& rt, Lsdb& lsdb, AdjacencyList& adjacencies);
 
 private:
   double
-  getHyperbolicDistance(Map& map, Lsdb& lsdb, ndn::Name src, ndn::Name dest);
+  getHyperbolicDistance(Lsdb& lsdb, ndn::Name src, ndn::Name dest);
 
   void
   addNextHop(ndn::Name destinationRouter, std::string faceUri, double cost, RoutingTable& rt);
diff --git a/src/route/routing-table.cpp b/src/route/routing-table.cpp
index 9c4ea77..48ef422 100644
--- a/src/route/routing-table.cpp
+++ b/src/route/routing-table.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2018,  The University of Memphis,
+ * Copyright (c) 2014-2019,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -80,13 +80,13 @@
             || (pnlsr.getConfParameter().getHyperbolicState() == HYPERBOLIC_STATE_DRY_RUN)) {
           calculateLsRoutingTable(pnlsr);
         }
-        //calculate hyperbolic routing
+        // calculate hyperbolic
         if (pnlsr.getConfParameter().getHyperbolicState() == HYPERBOLIC_STATE_ON) {
-          calculateHypRoutingTable(pnlsr);
+          calculateHypRoutingTable(pnlsr, false);
         }
         //calculate dry hyperbolic routing
         if (pnlsr.getConfParameter().getHyperbolicState() == HYPERBOLIC_STATE_DRY_RUN) {
-          calculateHypDryRoutingTable(pnlsr);
+          calculateHypRoutingTable(pnlsr, true);
         }
         // Inform the NPT that updates have been made
         NLSR_LOG_DEBUG("Calling Update NPT With new Route");
@@ -134,11 +134,11 @@
 
   LinkStateRoutingTableCalculator calculator(nRouters);
 
-  calculator.calculatePath(map, std::ref(*this), nlsr);
+  calculator.calculatePath(map, *this, nlsr);
 }
 
 void
-RoutingTable::calculateHypRoutingTable(Nlsr& nlsr)
+RoutingTable::calculateHypRoutingTable(Nlsr& nlsr, bool isDryRun)
 {
   Map map;
   map.createFromCoordinateLsdb(nlsr.getLsdb().getCoordinateLsdb().begin(),
@@ -147,27 +147,10 @@
 
   size_t nRouters = map.getMapSize();
 
-  HyperbolicRoutingCalculator calculator(nRouters, false,
+  HyperbolicRoutingCalculator calculator(nRouters, isDryRun,
                                          nlsr.getConfParameter().getRouterPrefix());
 
-  calculator.calculatePaths(map, std::ref(*this),
-                            nlsr.getLsdb(), nlsr.getAdjacencyList());
-}
-
-void
-RoutingTable::calculateHypDryRoutingTable(Nlsr& nlsr)
-{
-  Map map;
-  map.createFromAdjLsdb(nlsr.getLsdb().getAdjLsdb().begin(), nlsr.getLsdb().getAdjLsdb().end());
-  map.writeLog();
-
-  size_t nRouters = map.getMapSize();
-
-  HyperbolicRoutingCalculator calculator(nRouters, true,
-                                         nlsr.getConfParameter().getRouterPrefix());
-
-  calculator.calculatePaths(map, std::ref(*this),
-                            nlsr.getLsdb(), nlsr.getAdjacencyList());
+  calculator.calculatePath(map, *this, nlsr.getLsdb(), nlsr.getAdjacencyList());
 }
 
 void
diff --git a/src/route/routing-table.hpp b/src/route/routing-table.hpp
index cd7b5f5..5572aed 100644
--- a/src/route/routing-table.hpp
+++ b/src/route/routing-table.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2018,  The University of Memphis,
+ * Copyright (c) 2014-2019,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -118,11 +118,7 @@
 
   /*! \brief Calculates a HR routing table. */
   void
-  calculateHypRoutingTable(Nlsr& pnlsr);
-
-  /*! \brief Calculates a dry-run HR routing table. */
-  void
-  calculateHypDryRoutingTable(Nlsr& pnlsr);
+  calculateHypRoutingTable(Nlsr& pnlsr, bool isDryRun);
 
   void
   clearRoutingTable();
diff --git a/tests/test-hyperbolic-calculator.cpp b/tests/test-hyperbolic-calculator.cpp
index 4b8cce7..c4f39e2 100644
--- a/tests/test-hyperbolic-calculator.cpp
+++ b/tests/test-hyperbolic-calculator.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2018,  The University of Memphis,
+ * Copyright (c) 2014-2019,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -106,7 +106,7 @@
   void runTest(const double& expectedCost)
   {
     HyperbolicRoutingCalculator calculator(map.getMapSize(), false, ROUTER_A_NAME);
-    calculator.calculatePaths(map, routingTable, lsdb, adjacencies);
+    calculator.calculatePath(map, routingTable, lsdb, adjacencies);
 
     RoutingTableEntry* entryB = routingTable.findRoutingTableEntry(ROUTER_B_NAME);
 
