diff --git a/daemon/face/face-system.cpp b/daemon/face/face-system.cpp
index 67738aa..5601057 100644
--- a/daemon/face/face-system.cpp
+++ b/daemon/face/face-system.cpp
@@ -34,15 +34,17 @@
 
 NFD_LOG_INIT(FaceSystem);
 
-static const std::string SECTION_GENERAL = "general";
-static const std::string SECTION_NETDEVBOUND = "netdev_bound";
+const std::string CFGSEC_FACESYSTEM = "face_system";
+const std::string CFGSEC_GENERAL = "general";
+const std::string CFGSEC_GENERAL_FQ = CFGSEC_FACESYSTEM + ".general";
+const std::string CFGSEC_NETDEVBOUND = "netdev_bound";
 
 FaceSystem::FaceSystem(FaceTable& faceTable, shared_ptr<ndn::net::NetworkMonitor> netmon)
   : m_faceTable(faceTable)
   , m_netmon(std::move(netmon))
 {
   auto pfCtorParams = this->makePFCtorParams();
-  for (const std::string& id : ProtocolFactory::listRegistered()) {
+  for (const auto& id : ProtocolFactory::listRegistered()) {
     NFD_LOG_TRACE("creating factory " << id);
     m_factories[id] = ProtocolFactory::create(id, pfCtorParams);
   }
@@ -53,7 +55,7 @@
 ProtocolFactoryCtorParams
 FaceSystem::makePFCtorParams()
 {
-  auto addFace = [&ft = m_faceTable] (auto face) { ft.add(std::move(face)); };
+  auto addFace = [this] (auto face) { m_faceTable.add(std::move(face)); };
   return {addFace, m_netmon};
 }
 
@@ -92,25 +94,25 @@
 void
 FaceSystem::setConfigFile(ConfigFile& configFile)
 {
-  configFile.addSectionHandler("face_system", bind(&FaceSystem::processConfig, this, _1, _2, _3));
+  configFile.addSectionHandler(CFGSEC_FACESYSTEM, bind(&FaceSystem::processConfig, this, _1, _2, _3));
 }
 
 void
-FaceSystem::processConfig(const ConfigSection& configSection, bool isDryRun, const std::string& filename)
+FaceSystem::processConfig(const ConfigSection& configSection, bool isDryRun, const std::string&)
 {
   ConfigContext context;
   context.isDryRun = isDryRun;
 
   // process general protocol factory config section
-  auto generalSection = configSection.get_child_optional(SECTION_GENERAL);
+  auto generalSection = configSection.get_child_optional(CFGSEC_GENERAL);
   if (generalSection) {
     for (const auto& pair : *generalSection) {
       const std::string& key = pair.first;
       if (key == "enable_congestion_marking") {
-        context.generalConfig.wantCongestionMarking = ConfigFile::parseYesNo(pair, "face_system.general");
+        context.generalConfig.wantCongestionMarking = ConfigFile::parseYesNo(pair, CFGSEC_GENERAL_FQ);
       }
       else {
-        NDN_THROW(ConfigFile::Error("Unrecognized option face_system.general." + key));
+        NDN_THROW(ConfigFile::Error("Unrecognized option " + CFGSEC_GENERAL_FQ + "." + key));
       }
     }
   }
@@ -140,7 +142,7 @@
   }
 
   // process netdev_bound section, after factories start providing *+dev schemes
-  auto netdevBoundSection = configSection.get_child_optional(SECTION_NETDEVBOUND);
+  auto netdevBoundSection = configSection.get_child_optional(CFGSEC_NETDEVBOUND);
   m_netdevBound->processConfig(netdevBoundSection, context);
 
   // process other sections
@@ -150,15 +152,15 @@
     // const ConfigSection& subSection = pair.second;
 
     if (!seenSections.insert(sectionName).second) {
-      NDN_THROW(ConfigFile::Error("Duplicate section face_system." + sectionName));
+      NDN_THROW(ConfigFile::Error("Duplicate section " + CFGSEC_FACESYSTEM + "." + sectionName));
     }
 
-    if (sectionName == SECTION_GENERAL || sectionName == SECTION_NETDEVBOUND ||
+    if (sectionName == CFGSEC_GENERAL || sectionName == CFGSEC_NETDEVBOUND ||
         m_factories.count(sectionName) > 0) {
       continue;
     }
 
-    NDN_THROW(ConfigFile::Error("Unrecognized option face_system." + sectionName));
+    NDN_THROW(ConfigFile::Error("Unrecognized option " + CFGSEC_FACESYSTEM + "." + sectionName));
   }
 }
 
diff --git a/daemon/fw/face-table.hpp b/daemon/fw/face-table.hpp
index f501813..d1c51c7 100644
--- a/daemon/fw/face-table.hpp
+++ b/daemon/fw/face-table.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -27,6 +27,7 @@
 #define NFD_DAEMON_FW_FACE_TABLE_HPP
 
 #include "face/face.hpp"
+
 #include <boost/range/adaptor/indirected.hpp>
 #include <boost/range/adaptor/map.hpp>
 
@@ -79,15 +80,15 @@
   end() const;
 
 public: // signals
-  /** \brief fires after a face is added
+  /** \brief Fires immediately after a face is added.
    */
-  signal::Signal<FaceTable, Face&> afterAdd;
+  signal::Signal<FaceTable, Face> afterAdd;
 
-  /** \brief fires before a face is removed
+  /** \brief Fires immediately before a face is removed.
    *
-   *  When this signal is emitted, face is still in FaceTable and has valid FaceId.
+   *  When this signal is emitted, the face is still in FaceTable and has a valid FaceId.
    */
-  signal::Signal<FaceTable, Face&> beforeRemove;
+  signal::Signal<FaceTable, Face> beforeRemove;
 
 private:
   void
diff --git a/daemon/fw/forwarder.cpp b/daemon/fw/forwarder.cpp
index 4c91fb7..f59963e 100644
--- a/daemon/fw/forwarder.cpp
+++ b/daemon/fw/forwarder.cpp
@@ -44,14 +44,15 @@
   return fw::BestRouteStrategy2::getStrategyName();
 }
 
-Forwarder::Forwarder()
-  : m_unsolicitedDataPolicy(make_unique<fw::DefaultUnsolicitedDataPolicy>())
+Forwarder::Forwarder(FaceTable& faceTable)
+  : m_faceTable(faceTable)
+  , m_unsolicitedDataPolicy(make_unique<fw::DefaultUnsolicitedDataPolicy>())
   , m_fib(m_nameTree)
   , m_pit(m_nameTree)
   , m_measurements(m_nameTree)
   , m_strategyChoice(*this)
 {
-  m_faceTable.afterAdd.connect([this] (Face& face) {
+  m_faceTable.afterAdd.connect([this] (const Face& face) {
     face.afterReceiveInterest.connect(
       [this, &face] (const Interest& interest, const EndpointId& endpointId) {
         this->startProcessInterest(FaceEndpoint(face, endpointId), interest);
@@ -70,7 +71,7 @@
       });
   });
 
-  m_faceTable.beforeRemove.connect([this] (Face& face) {
+  m_faceTable.beforeRemove.connect([this] (const Face& face) {
     cleanupOnFaceRemoval(m_nameTree, m_fib, m_pit, face);
   });
 
diff --git a/daemon/fw/forwarder.hpp b/daemon/fw/forwarder.hpp
index cc1d048..3b14a61 100644
--- a/daemon/fw/forwarder.hpp
+++ b/daemon/fw/forwarder.hpp
@@ -44,14 +44,15 @@
 class Strategy;
 } // namespace fw
 
-/** \brief Main class of NFD forwarding engine.
+/** \brief Main class of NFD's forwarding engine.
  *
- *  Forwarder owns all faces and tables, and implements the forwarding pipelines.
+ *  Forwarder owns all tables and implements the forwarding pipelines.
  */
 class Forwarder
 {
 public:
-  Forwarder();
+  explicit
+  Forwarder(FaceTable& faceTable);
 
   VIRTUAL_WITH_TESTS
   ~Forwarder();
@@ -62,33 +63,6 @@
     return m_counters;
   }
 
-public: // faces and policies
-  FaceTable&
-  getFaceTable()
-  {
-    return m_faceTable;
-  }
-
-  /** \brief get existing Face
-   *
-   *  shortcut to .getFaceTable().get(face)
-   */
-  Face*
-  getFace(FaceId id) const
-  {
-    return m_faceTable.get(id);
-  }
-
-  /** \brief add new Face
-   *
-   *  shortcut to .getFaceTable().add(face)
-   */
-  void
-  addFace(shared_ptr<Face> face)
-  {
-    m_faceTable.add(face);
-  }
-
   fw::UnsolicitedDataPolicy&
   getUnsolicitedDataPolicy() const
   {
@@ -274,7 +248,7 @@
 private:
   ForwarderCounters m_counters;
 
-  FaceTable m_faceTable;
+  FaceTable& m_faceTable;
   unique_ptr<fw::UnsolicitedDataPolicy> m_unsolicitedDataPolicy;
 
   NameTree           m_nameTree;
diff --git a/daemon/fw/strategy.cpp b/daemon/fw/strategy.cpp
index b0b9362..f9f4106 100644
--- a/daemon/fw/strategy.cpp
+++ b/daemon/fw/strategy.cpp
@@ -141,8 +141,8 @@
 }
 
 Strategy::Strategy(Forwarder& forwarder)
-  : afterAddFace(forwarder.getFaceTable().afterAdd)
-  , beforeRemoveFace(forwarder.getFaceTable().beforeRemove)
+  : afterAddFace(forwarder.m_faceTable.afterAdd)
+  , beforeRemoveFace(forwarder.m_faceTable.beforeRemove)
   , m_forwarder(forwarder)
   , m_measurements(m_forwarder.getMeasurements(), m_forwarder.getStrategyChoice(), *this)
 {
diff --git a/daemon/fw/strategy.hpp b/daemon/fw/strategy.hpp
index 8c62329..99e4826 100644
--- a/daemon/fw/strategy.hpp
+++ b/daemon/fw/strategy.hpp
@@ -322,13 +322,13 @@
   Face*
   getFace(FaceId id) const
   {
-    return m_forwarder.getFace(id);
+    return getFaceTable().get(id);
   }
 
   const FaceTable&
   getFaceTable() const
   {
-    return m_forwarder.getFaceTable();
+    return m_forwarder.m_faceTable;
   }
 
 protected: // instance name
@@ -379,8 +379,8 @@
   find(const Name& instanceName);
 
 protected: // accessors
-  signal::Signal<FaceTable, Face&>& afterAddFace;
-  signal::Signal<FaceTable, Face&>& beforeRemoveFace;
+  signal::Signal<FaceTable, Face>& afterAddFace;
+  signal::Signal<FaceTable, Face>& beforeRemoveFace;
 
 private: // instance fields
   Name m_name;
diff --git a/daemon/nfd.cpp b/daemon/nfd.cpp
index 63af6c7..e07b5d8 100644
--- a/daemon/nfd.cpp
+++ b/daemon/nfd.cpp
@@ -30,6 +30,7 @@
 #include "face/face-system.hpp"
 #include "face/internal-face.hpp"
 #include "face/null-face.hpp"
+#include "fw/face-table.hpp"
 #include "fw/forwarder.hpp"
 #include "mgmt/cs-manager.hpp"
 #include "mgmt/face-manager.hpp"
@@ -76,26 +77,25 @@
 {
   configureLogging();
 
-  m_forwarder = make_unique<Forwarder>();
+  m_faceTable = make_unique<FaceTable>();
+  m_faceTable->addReserved(face::makeNullFace(), face::FACEID_NULL);
+  m_faceTable->addReserved(face::makeNullFace(FaceUri("contentstore://")), face::FACEID_CONTENT_STORE);
 
-  FaceTable& faceTable = m_forwarder->getFaceTable();
-  faceTable.addReserved(face::makeNullFace(), face::FACEID_NULL);
-  faceTable.addReserved(face::makeNullFace(FaceUri("contentstore://")), face::FACEID_CONTENT_STORE);
-  m_faceSystem = make_unique<face::FaceSystem>(faceTable, m_netmon);
+  m_faceSystem = make_unique<face::FaceSystem>(*m_faceTable, m_netmon);
+  m_forwarder = make_unique<Forwarder>(*m_faceTable);
 
   initializeManagement();
 
   PrivilegeHelper::drop();
 
   m_netmon->onNetworkStateChanged.connect([this] {
-      // delay stages, so if multiple events are triggered in short sequence,
-      // only one auto-detection procedure is triggered
-      m_reloadConfigEvent = getScheduler().schedule(5_s,
-        [this] {
-          NFD_LOG_INFO("Network change detected, reloading face section of the config file...");
-          this->reloadConfigFileFaceSection();
-        });
+    // delay stages, so if multiple events are triggered in short sequence,
+    // only one auto-detection procedure is triggered
+    m_reloadConfigEvent = getScheduler().schedule(5_s, [this] {
+      NFD_LOG_INFO("Network change detected, reloading face section of the config file...");
+      reloadConfigFileFaceSection();
     });
+  });
 }
 
 void
@@ -133,14 +133,14 @@
 Nfd::initializeManagement()
 {
   std::tie(m_internalFace, m_internalClientFace) = face::makeInternalFace(m_keyChain);
-  m_forwarder->getFaceTable().addReserved(m_internalFace, face::FACEID_INTERNAL_FACE);
+  m_faceTable->addReserved(m_internalFace, face::FACEID_INTERNAL_FACE);
 
   m_dispatcher = make_unique<ndn::mgmt::Dispatcher>(*m_internalClientFace, m_keyChain);
   m_authenticator = CommandAuthenticator::create();
 
   m_forwarderStatusManager = make_unique<ForwarderStatusManager>(*m_forwarder, *m_dispatcher);
   m_faceManager = make_unique<FaceManager>(*m_faceSystem, *m_dispatcher, *m_authenticator);
-  m_fibManager = make_unique<FibManager>(m_forwarder->getFib(), m_forwarder->getFaceTable(),
+  m_fibManager = make_unique<FibManager>(m_forwarder->getFib(), *m_faceTable,
                                          *m_dispatcher, *m_authenticator);
   m_csManager = make_unique<CsManager>(m_forwarder->getCs(), m_forwarder->getCounters(),
                                        *m_dispatcher, *m_authenticator);
diff --git a/daemon/nfd.hpp b/daemon/nfd.hpp
index 508876c..787afb8 100644
--- a/daemon/nfd.hpp
+++ b/daemon/nfd.hpp
@@ -35,10 +35,10 @@
 
 namespace nfd {
 
+class FaceTable;
 class Forwarder;
-class CommandAuthenticator;
 
-// forward-declare management modules, in the order defined in management protocol
+class CommandAuthenticator;
 class ForwarderStatusManager;
 class FaceManager;
 class FibManager;
@@ -110,8 +110,9 @@
   std::string m_configFile;
   ConfigSection m_configSection;
 
-  unique_ptr<Forwarder> m_forwarder;
+  unique_ptr<FaceTable> m_faceTable;
   unique_ptr<face::FaceSystem> m_faceSystem;
+  unique_ptr<Forwarder> m_forwarder;
 
   ndn::KeyChain& m_keyChain;
   shared_ptr<face::Face> m_internalFace;
