diff --git a/src/lsdb.cpp b/src/lsdb.cpp
index 9173b89..99cd285 100644
--- a/src/lsdb.cpp
+++ b/src/lsdb.cpp
@@ -196,7 +196,7 @@
                                 const ndn::time::seconds& expTime)
 {
   return m_scheduler.scheduleEvent(expTime + GRACE_PERIOD,
-                                   std::bind(&Lsdb::exprireOrRefreshNameLsa, this, key, seqNo));
+                                   std::bind(&Lsdb::expireOrRefreshNameLsa, this, key, seqNo));
 }
 
 bool
@@ -438,7 +438,7 @@
                                       const ndn::time::seconds& expTime)
 {
   return m_scheduler.scheduleEvent(expTime + GRACE_PERIOD,
-                                   std::bind(&Lsdb::exprireOrRefreshCoordinateLsa,
+                                   std::bind(&Lsdb::expireOrRefreshCoordinateLsa,
                                              this, key, seqNo));
 }
 
@@ -696,7 +696,7 @@
                                const ndn::time::seconds& expTime)
 {
   return m_scheduler.scheduleEvent(expTime + GRACE_PERIOD,
-                                   std::bind(&Lsdb::exprireOrRefreshAdjLsa, this, key, seqNo));
+                                   std::bind(&Lsdb::expireOrRefreshAdjLsa, this, key, seqNo));
 }
 
 bool
@@ -826,9 +826,9 @@
   // lsaKey is the key of the LSA's publishing router.
   // seqNo is the seq. no. of the candidate LSA.
 void
-Lsdb::exprireOrRefreshNameLsa(const ndn::Name& lsaKey, uint64_t seqNo)
+Lsdb::expireOrRefreshNameLsa(const ndn::Name& lsaKey, uint64_t seqNo)
 {
-  _LOG_DEBUG("Lsdb::exprireOrRefreshNameLsa Called");
+  _LOG_DEBUG("Lsdb::expireOrRefreshNameLsa Called");
   _LOG_DEBUG("LSA Key : " << lsaKey << " Seq No: " << seqNo);
   NameLsa* chkNameLsa = findNameLsa(lsaKey);
   // If this name LSA exists in the LSDB
@@ -869,9 +869,9 @@
   // lsaKey is the key of the LSA's publishing router.
   // seqNo is the seq. no. of the candidate LSA.
 void
-Lsdb::exprireOrRefreshAdjLsa(const ndn::Name& lsaKey, uint64_t seqNo)
+Lsdb::expireOrRefreshAdjLsa(const ndn::Name& lsaKey, uint64_t seqNo)
 {
-  _LOG_DEBUG("Lsdb::exprireOrRefreshAdjLsa Called");
+  _LOG_DEBUG("Lsdb::expireOrRefreshAdjLsa Called");
   _LOG_DEBUG("LSA Key: " << lsaKey << " Seq No: " << seqNo);
   AdjLsa* chkAdjLsa = findAdjLsa(lsaKey);
   // If this is a valid LSA
@@ -916,10 +916,10 @@
   // lsaKey is the key of the LSA's publishing router.
   // seqNo is the seq. no. of the candidate LSA.
 void
-Lsdb::exprireOrRefreshCoordinateLsa(const ndn::Name& lsaKey,
+Lsdb::expireOrRefreshCoordinateLsa(const ndn::Name& lsaKey,
                                     uint64_t seqNo)
 {
-  _LOG_DEBUG("Lsdb::exprireOrRefreshCorLsa Called ");
+  _LOG_DEBUG("Lsdb::expireOrRefreshCorLsa Called ");
   _LOG_DEBUG("LSA Key : " << lsaKey << " Seq No: " << seqNo);
   CoordinateLsa* chkCorLsa = findCoordinateLsa(lsaKey);
   // Whether the LSA is in the LSDB or not.
diff --git a/src/lsdb.hpp b/src/lsdb.hpp
index 1ac25f2..2b182bd 100644
--- a/src/lsdb.hpp
+++ b/src/lsdb.hpp
@@ -22,18 +22,18 @@
 #ifndef NLSR_LSDB_HPP
 #define NLSR_LSDB_HPP
 
-#include <utility>
-#include <boost/cstdint.hpp>
-
-#include <ndn-cxx/security/key-chain.hpp>
-#include <ndn-cxx/util/time.hpp>
-
 #include "conf-parameter.hpp"
 #include "lsa.hpp"
 #include "sequencing-manager.hpp"
 #include "test-access-control.hpp"
 #include "communication/sync-logic-handler.hpp"
 
+#include <utility>
+#include <boost/cstdint.hpp>
+
+#include <ndn-cxx/security/key-chain.hpp>
+#include <ndn-cxx/util/time.hpp>
+
 namespace nlsr {
 
 using namespace ndn::time;
@@ -271,7 +271,7 @@
     \param seqNo The seq. no. of the LSA to check.
   */
   void
-  exprireOrRefreshNameLsa(const ndn::Name& lsaKey, uint64_t seqNo);
+  expireOrRefreshNameLsa(const ndn::Name& lsaKey, uint64_t seqNo);
 
 PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   /*! \brief Schedules an expire/refresh event in the LSA.
@@ -286,14 +286,14 @@
 private:
 
   void
-  exprireOrRefreshAdjLsa(const ndn::Name& lsaKey, uint64_t seqNo);
+  expireOrRefreshAdjLsa(const ndn::Name& lsaKey, uint64_t seqNo);
 
   ndn::EventId
   scheduleCoordinateLsaExpiration(const ndn::Name& key, int seqNo,
                                   const seconds& expTime);
 
   void
-  exprireOrRefreshCoordinateLsa(const ndn::Name& lsaKey,
+  expireOrRefreshCoordinateLsa(const ndn::Name& lsaKey,
                                 uint64_t seqNo);
 
 private:
diff --git a/src/publisher/lsdb-dataset-interest-handler.cpp b/src/publisher/lsdb-dataset-interest-handler.cpp
index e3cfa1f..acd5c92 100644
--- a/src/publisher/lsdb-dataset-interest-handler.cpp
+++ b/src/publisher/lsdb-dataset-interest-handler.cpp
@@ -27,24 +27,22 @@
  */
 
 #include "lsdb-dataset-interest-handler.hpp"
-
 #include "logger.hpp"
 #include "nlsr.hpp"
+#include "tlv/lsdb-status.hpp"
 
 #include <ndn-cxx/face.hpp>
 #include <ndn-cxx/mgmt/nfd/control-response.hpp>
 #include <ndn-cxx/util/regex.hpp>
-#include "tlv/lsdb-status.hpp"
 
 namespace nlsr {
 
 INIT_LOGGER("LsdbDatasetInterestHandler");
+
 const ndn::PartialName ADJACENCIES_DATASET = ndn::PartialName("lsdb/adjacencies");
 const ndn::PartialName COORDINATES_DATASET = ndn::PartialName("lsdb/coordinates");
 const ndn::PartialName NAMES_DATASET = ndn::PartialName("lsdb/names");
 const ndn::PartialName LISTS_DATASET = ndn::PartialName("lsdb/list");
-const ndn::PartialName LsdbDatasetInterestHandler::LOCALHOST_COMMAND_PREFIX =
-      ndn::Name(Nlsr::LOCALHOST_PREFIX).append(Lsdb::NAME_COMPONENT);
 
 LsdbDatasetInterestHandler::LsdbDatasetInterestHandler(Lsdb& lsdb,
                                                        ndn::mgmt::Dispatcher& localHostDispatcher,
diff --git a/src/publisher/lsdb-dataset-interest-handler.hpp b/src/publisher/lsdb-dataset-interest-handler.hpp
index f16075f..f8aa025 100644
--- a/src/publisher/lsdb-dataset-interest-handler.hpp
+++ b/src/publisher/lsdb-dataset-interest-handler.hpp
@@ -23,13 +23,13 @@
 #define NLSR_PUBLISHER_LSDB_DATASET_INTEREST_HANDLER_HPP
 
 #include "lsa-publisher.hpp"
+#include "tlv/adjacency-lsa.hpp"
+#include "tlv/coordinate-lsa.hpp"
+#include "tlv/name-lsa.hpp"
 
 #include <ndn-cxx/mgmt/dispatcher.hpp>
 #include <ndn-cxx/face.hpp>
 #include <boost/noncopyable.hpp>
-#include "tlv/adjacency-lsa.hpp"
-#include "tlv/coordinate-lsa.hpp"
-#include "tlv/name-lsa.hpp"
 
 namespace nlsr {
 
@@ -56,12 +56,6 @@
                              ndn::Face& face,
                              ndn::KeyChain& keyChain);
 
-  const ndn::Name&
-  getLocalhostCommandPrefix()
-  {
-    return LOCALHOST_COMMAND_PREFIX;
-  }
-
   ndn::Name&
   getRouterNameCommandPrefix()
   {
@@ -105,7 +99,6 @@
                    ndn::mgmt::StatusDatasetContext& context);
 
 private:
-  static const ndn::Name LOCALHOST_COMMAND_PREFIX;
   ndn::Name m_routerNamePrefix;
 
   ndn::mgmt::Dispatcher& m_localhostDispatcher;
diff --git a/src/route/name-prefix-table-entry.cpp b/src/route/name-prefix-table-entry.cpp
index 1abc87b..d9f8c65 100644
--- a/src/route/name-prefix-table-entry.cpp
+++ b/src/route/name-prefix-table-entry.cpp
@@ -33,9 +33,9 @@
 NamePrefixTableEntry::generateNhlfromRteList()
 {
   m_nexthopList.reset();
-  for (auto rtpeItr = m_rteList.begin(); rtpeItr != m_rteList.end(); ++rtpeItr) {
-    for (auto nhItr = (*rtpeItr)->getNexthopList().getNextHops().begin();
-         nhItr != (*rtpeItr)->getNexthopList().getNextHops().end();
+  for (auto iterator = m_rteList.begin(); iterator != m_rteList.end(); ++iterator) {
+    for (auto nhItr = (*iterator)->getNexthopList().getNextHops().begin();
+         nhItr != (*iterator)->getNexthopList().getNextHops().end();
          ++nhItr) {
       m_nexthopList.addNextHop((*nhItr));
     }
@@ -44,32 +44,32 @@
 
 uint64_t
 NamePrefixTableEntry::removeRoutingTableEntry(std::shared_ptr<RoutingTablePoolEntry>
-                                              rtpePtr)
+                                              entryPtr)
 {
-  auto rtpeItr = std::find(m_rteList.begin(), m_rteList.end(), rtpePtr);
+  auto iterator = std::find(m_rteList.begin(), m_rteList.end(), entryPtr);
 
-  if (rtpeItr != m_rteList.end()) {
-    (*rtpeItr)->decrementUseCount();
-    m_rteList.erase(rtpeItr);
+  if (iterator != m_rteList.end()) {
+    (*iterator)->decrementUseCount();
+    m_rteList.erase(iterator);
   }
   else {
-    _LOG_ERROR("Routing entry for: " << rtpePtr->getDestination()
+    _LOG_ERROR("Routing entry for: " << entryPtr->getDestination()
                << " not found in NPT entry: " << getNamePrefix());
   }
-  return (*rtpeItr)->getUseCount();
+  return entryPtr->getUseCount();
 }
 
 void
 NamePrefixTableEntry::addRoutingTableEntry(std::shared_ptr<RoutingTablePoolEntry>
-                                           rtpePtr)
+                                           entryPtr)
 {
-  auto rtpeItr = std::find(m_rteList.begin(), m_rteList.end(), rtpePtr);
+  auto iterator = std::find(m_rteList.begin(), m_rteList.end(), entryPtr);
 
   // Ensure that this is a new entry
-  if (rtpeItr == m_rteList.end()) {
+  if (iterator == m_rteList.end()) {
     // Adding a new routing entry to the NPT entry
-    rtpePtr->incrementUseCount();
-    m_rteList.push_back(rtpePtr);
+    entryPtr->incrementUseCount();
+    m_rteList.push_back(entryPtr);
   }
   // Note: we don't need to update in the else case because these are
   // pointers, and they are centrally-located in the NPT and will all
@@ -105,8 +105,8 @@
 {
   os << "Name: " << entry.getNamePrefix() << "\n";
 
-  for (const std::shared_ptr<RoutingTablePoolEntry> rtpePtr : entry.getRteList()) {
-    os << "Destination: " << rtpePtr->getDestination() << "\n";
+  for (const std::shared_ptr<RoutingTablePoolEntry> entryPtr : entry.getRteList()) {
+    os << "Destination: " << entryPtr->getDestination() << "\n";
   }
 
   return os;
diff --git a/src/route/name-prefix-table.cpp b/src/route/name-prefix-table.cpp
index 6467790..251bfc5 100644
--- a/src/route/name-prefix-table.cpp
+++ b/src/route/name-prefix-table.cpp
@@ -45,8 +45,8 @@
 
   // Check if the advertised name prefix is in the table already.
   NptEntryList::iterator nameItr = std::find(m_table.begin(),
-                                           m_table.end(),
-                                           name);
+                                             m_table.end(),
+                                             name);
 
   // Attempt to find a routing table pool entry (RTPE) we can use.
   RtpEntryMap::iterator rtpeItr = m_rtpool.find(destRouter);
@@ -139,9 +139,8 @@
   std::shared_ptr<RoutingTablePoolEntry> rtpePtr = rtpeItr->second;
 
   // Ensure that the entry exists
-  NptEntryList::iterator nameItr = std::find_if(m_table.begin(),
-                                           m_table.end(),
-                                           std::bind(&npteCompare, _1, name));
+  NptEntryList::iterator nameItr = std::find_if(m_table.begin(), m_table.end(),
+                                                std::bind(&npteCompare, _1, name));
   if (nameItr != m_table.end()) {
     _LOG_TRACE("Removing origin: " << rtpePtr->getDestination()
                << " from prefix: " << *nameItr);
@@ -182,7 +181,7 @@
   }
   else {
     _LOG_DEBUG("Attempted to remove origin: " << rtpePtr->getDestination()
-               << " from non-existant prefix: " << name);
+               << " from non-existent prefix: " << name);
   }
 }
 
@@ -239,7 +238,7 @@
 NamePrefixTable::deleteRtpeFromPool(std::shared_ptr<RoutingTablePoolEntry> rtpePtr)
 {
   if (m_rtpool.erase(rtpePtr->getDestination()) != 1) {
-    _LOG_DEBUG("Attempted to delete non-existant origin: "
+    _LOG_DEBUG("Attempted to delete non-existent origin: "
                << rtpePtr->getDestination()
                << " from NPT routing table entry storage pool.");
   }
