diff --git a/src/conf-file-processor.cpp b/src/conf-file-processor.cpp
index b893bf8..69a7881 100644
--- a/src/conf-file-processor.cpp
+++ b/src/conf-file-processor.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2014-2020,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
@@ -24,8 +24,6 @@
 #include "utility/name-helper.hpp"
 #include "update/prefix-update-processor.hpp"
 
-#include <boost/cstdint.hpp>
-
 #include <ndn-cxx/name.hpp>
 #include <ndn-cxx/net/face-uri.hpp>
 
@@ -473,19 +471,19 @@
         std::string uriString = CommandAttriTree.get<std::string>("face-uri");
 
         ndn::FaceUri faceUri;
-        if (! faceUri.parse(uriString)) {
-          std::cerr << "Parsing failed!" << std::endl;
+        if (!faceUri.parse(uriString)) {
+          std::cerr << "face-uri parsing failed" << std::endl;
           return false;
         }
 
         bool failedToCanonize = false;
-        faceUri.canonize([&faceUri] (ndn::FaceUri canonicalUri) {
+        faceUri.canonize([&faceUri] (const auto& canonicalUri) {
                            faceUri = canonicalUri;
                          },
-                         [&faceUri, &failedToCanonize] (const std::string& reason) {
+                         [&faceUri, &failedToCanonize] (const auto& reason) {
                            failedToCanonize = true;
-                           std::cerr << "Could not canonize URI: " << faceUri
-                                     << "because: " << reason << std::endl;
+                           std::cerr << "Could not canonize URI: '" << faceUri
+                                     << "' because: " << reason << std::endl;
                          },
                          m_io,
                          TIME_ALLOWED_FOR_CANONIZATION);
@@ -496,8 +494,7 @@
           return false;
         }
 
-        double linkCost = CommandAttriTree.get<double>("link-cost",
-                                                       Adjacent::DEFAULT_LINK_COST);
+        double linkCost = CommandAttriTree.get<double>("link-cost", Adjacent::DEFAULT_LINK_COST);
         ndn::Name neighborName(name);
         if (!neighborName.empty()) {
           Adjacent adj(name, faceUri, linkCost, Adjacent::STATUS_INACTIVE, 0, 0);
diff --git a/src/route/name-prefix-table-entry.cpp b/src/route/name-prefix-table-entry.cpp
index ac4c3ec..9890101 100644
--- a/src/route/name-prefix-table-entry.cpp
+++ b/src/route/name-prefix-table-entry.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-2020,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -43,8 +43,7 @@
 }
 
 uint64_t
-NamePrefixTableEntry::removeRoutingTableEntry(std::shared_ptr<RoutingTablePoolEntry>
-                                              entryPtr)
+NamePrefixTableEntry::removeRoutingTableEntry(std::shared_ptr<RoutingTablePoolEntry> entryPtr)
 {
   auto iterator = std::find(m_rteList.begin(), m_rteList.end(), entryPtr);
 
@@ -62,8 +61,7 @@
 }
 
 void
-NamePrefixTableEntry::addRoutingTableEntry(std::shared_ptr<RoutingTablePoolEntry>
-                                           entryPtr)
+NamePrefixTableEntry::addRoutingTableEntry(std::shared_ptr<RoutingTablePoolEntry> entryPtr)
 {
   auto iterator = std::find(m_rteList.begin(), m_rteList.end(), entryPtr);
 
@@ -93,24 +91,22 @@
 bool
 operator==(const NamePrefixTableEntry& lhs, const NamePrefixTableEntry& rhs)
 {
-  return (lhs.getNamePrefix() == rhs.getNamePrefix());
+  return lhs.getNamePrefix() == rhs.getNamePrefix();
 }
 
 bool
 operator==(const NamePrefixTableEntry& lhs, const ndn::Name& rhs)
 {
-  return (lhs.getNamePrefix() == rhs);
+  return lhs.getNamePrefix() == rhs;
 }
 
 std::ostream&
 operator<<(std::ostream& os, const NamePrefixTableEntry& entry)
 {
   os << "Name: " << entry.getNamePrefix() << "\n";
-
-  for (const std::shared_ptr<RoutingTablePoolEntry> entryPtr : entry.getRteList()) {
+  for (const auto& entryPtr : entry.getRteList()) {
     os << "Destination: " << entryPtr->getDestination() << "\n";
   }
-
   return os;
 }
 
