diff --git a/rib/rib-manager.cpp b/rib/rib-manager.cpp
index 5b0e0c6..c45aede 100644
--- a/rib/rib-manager.cpp
+++ b/rib/rib-manager.cpp
@@ -24,9 +24,6 @@
  */
 
 #include "rib-manager.hpp"
-#include "readvertise/readvertise.hpp"
-#include "readvertise/client-to-nlsr-readvertise-policy.hpp"
-#include "readvertise/nfd-rib-readvertise-destination.hpp"
 
 #include "core/fib-max-depth.hpp"
 #include "core/logger.hpp"
@@ -49,21 +46,19 @@
 const std::string RibManager::MGMT_MODULE_NAME = "rib";
 const Name RibManager::FACES_LIST_DATASET_PREFIX = "/localhost/nfd/faces/list";
 const time::seconds RibManager::ACTIVE_FACE_FETCH_INTERVAL = time::seconds(300);
-const Name RibManager::READVERTISE_NLSR_PREFIX = "/localhost/nlsr";
 
-RibManager::RibManager(Dispatcher& dispatcher,
+RibManager::RibManager(Rib& rib,
+                       Dispatcher& dispatcher,
                        ndn::Face& face,
-                       ndn::KeyChain& keyChain)
+                       ndn::nfd::Controller& controller,
+                       AutoPrefixPropagator& propagator)
   : ManagerBase(dispatcher, MGMT_MODULE_NAME)
-  , m_face(face)
-  , m_keyChain(keyChain)
-  , m_nfdController(m_face, m_keyChain)
-  , m_faceMonitor(m_face)
-  , m_localhostValidator(m_face)
-  , m_localhopValidator(m_face)
-  , m_isLocalhopEnabled(false)
-  , m_prefixPropagator(m_nfdController, m_keyChain, m_rib)
-  , m_fibUpdater(m_rib, m_nfdController)
+  , m_rib(rib)
+  , m_nfdController(controller)
+  , m_faceMonitor(face)
+  , m_localhostValidator(face)
+  , m_localhopValidator(face)
+  , m_prefixPropagator(propagator)
   , m_addTopPrefix([&dispatcher] (const Name& topPrefix) {
       dispatcher.addTopPrefix(topPrefix, false);
     })
@@ -128,12 +123,10 @@
 }
 
 void
-RibManager::onConfig(const ConfigSection& configSection,
-                     bool isDryRun,
-                     const std::string& filename)
+RibManager::onConfig(const ConfigSection& configSection, bool isDryRun, const std::string& filename)
 {
-  bool isAutoPrefixPropagatorEnabled = false;
-  bool wantReadvertiseToNlsr = false;
+  wantAutoPrefixPropagator = false;
+  wantReadvertiseToNlsr = false;
 
   for (const auto& item : configSection) {
     if (item.first == "localhost_security") {
@@ -145,14 +138,7 @@
     }
     else if (item.first == "auto_prefix_propagate") {
       m_prefixPropagator.loadConfig(item.second);
-      isAutoPrefixPropagatorEnabled = true;
-
-      // Avoid other actions when isDryRun == true
-      if (isDryRun) {
-        continue;
-      }
-
-      m_prefixPropagator.enable();
+      wantAutoPrefixPropagator = true;
     }
     else if (item.first == "readvertise_nlsr") {
       wantReadvertiseToNlsr = ConfigFile::parseYesNo(item, "rib.readvertise_nlsr");
@@ -161,22 +147,6 @@
       BOOST_THROW_EXCEPTION(Error("Unrecognized rib property: " + item.first));
     }
   }
-
-  if (!isAutoPrefixPropagatorEnabled) {
-    m_prefixPropagator.disable();
-  }
-
-  if (wantReadvertiseToNlsr && m_readvertiseNlsr == nullptr) {
-    NFD_LOG_DEBUG("Enabling readvertise-to-nlsr");
-    m_readvertiseNlsr = make_unique<Readvertise>(
-      m_rib,
-      make_unique<ClientToNlsrReadvertisePolicy>(),
-      make_unique<NfdRibReadvertiseDestination>(m_nfdController, READVERTISE_NLSR_PREFIX, m_rib));
-  }
-  else if (!wantReadvertiseToNlsr && m_readvertiseNlsr != nullptr) {
-    NFD_LOG_DEBUG("Disabling readvertise-to-nlsr");
-    m_readvertiseNlsr.reset();
-  }
 }
 
 void
diff --git a/rib/rib-manager.hpp b/rib/rib-manager.hpp
index 6da3ef4..be13c44 100644
--- a/rib/rib-manager.hpp
+++ b/rib/rib-manager.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-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -59,7 +59,8 @@
   };
 
 public:
-  RibManager(Dispatcher& dispatcher, ndn::Face& face, ndn::KeyChain& keyChain);
+  RibManager(Rib& rib, Dispatcher& dispatcher, ndn::Face& face,
+             ndn::nfd::Controller& controller, AutoPrefixPropagator& propagator);
 
   ~RibManager() override;
 
@@ -149,20 +150,18 @@
   void
   onEnableLocalFieldsError(const ControlResponse& response);
 
+public:
+  bool wantAutoPrefixPropagator = false;
+  bool wantReadvertiseToNlsr = false;
+
 private:
-  ndn::Face& m_face;
-  ndn::KeyChain& m_keyChain;
-  ndn::nfd::Controller m_nfdController;
+  Rib& m_rib;
+  ndn::nfd::Controller& m_nfdController;
   ndn::nfd::FaceMonitor m_faceMonitor;
   ndn::ValidatorConfig m_localhostValidator;
   ndn::ValidatorConfig m_localhopValidator;
-  bool m_isLocalhopEnabled;
-  AutoPrefixPropagator m_prefixPropagator;
-  unique_ptr<Readvertise> m_readvertiseNlsr;
-
-PUBLIC_WITH_TESTS_ELSE_PRIVATE:
-  Rib m_rib;
-  FibUpdater m_fibUpdater;
+  bool m_isLocalhopEnabled = false;
+  AutoPrefixPropagator& m_prefixPropagator;
 
 private:
   static const Name LOCAL_HOST_TOP_PREFIX;
@@ -171,7 +170,6 @@
   static const Name FACES_LIST_DATASET_PREFIX;
   static const time::seconds ACTIVE_FACE_FETCH_INTERVAL;
   scheduler::ScopedEventId m_activeFaceFetchEvent;
-  static const Name READVERTISE_NLSR_PREFIX;
 
   typedef std::set<uint64_t> FaceIdSet;
   /** \brief contains FaceIds with one or more Routes in the RIB
diff --git a/rib/service.cpp b/rib/service.cpp
index de103b4..739883c 100644
--- a/rib/service.cpp
+++ b/rib/service.cpp
@@ -24,18 +24,26 @@
  */
 
 #include "service.hpp"
+
+#include "auto-prefix-propagator.hpp"
+#include "fib-updater.hpp"
 #include "rib-manager.hpp"
+#include "readvertise/client-to-nlsr-readvertise-policy.hpp"
+#include "readvertise/nfd-rib-readvertise-destination.hpp"
+#include "readvertise/readvertise.hpp"
+
 #include "core/global-io.hpp"
 
 #include <boost/property_tree/info_parser.hpp>
 
-#include <ndn-cxx/transport/unix-transport.hpp>
 #include <ndn-cxx/transport/tcp-transport.hpp>
+#include <ndn-cxx/transport/unix-transport.hpp>
 
 namespace nfd {
 namespace rib {
 
 static const std::string INTERNAL_CONFIG = "internal://nfd.conf";
+static const Name READVERTISE_NLSR_PREFIX = "/localhost/nlsr";
 
 Service* Service::s_instance = nullptr;
 
@@ -52,8 +60,8 @@
   s_instance = this;
 }
 
-Service::Service(const ConfigSection& config, ndn::KeyChain& keyChain)
-  : m_configSection(config)
+Service::Service(const ConfigSection& configSection, ndn::KeyChain& keyChain)
+  : m_configSection(configSection)
   , m_keyChain(keyChain)
 {
   if (s_instance != nullptr) {
@@ -86,8 +94,11 @@
 Service::initialize()
 {
   m_face = make_unique<ndn::Face>(getLocalNfdTransport(), getGlobalIoService(), m_keyChain);
+  m_nfdController = make_unique<ndn::nfd::Controller>(*m_face, m_keyChain);
+  m_fibUpdater = make_unique<FibUpdater>(m_rib, *m_nfdController);
+  m_prefixPropagator = make_unique<AutoPrefixPropagator>(*m_nfdController, m_keyChain, m_rib);
   m_dispatcher = make_unique<ndn::mgmt::Dispatcher>(*m_face, m_keyChain);
-  m_ribManager = make_unique<RibManager>(*m_dispatcher, *m_face, m_keyChain);
+  m_ribManager = make_unique<RibManager>(m_rib, *m_dispatcher, *m_face, *m_nfdController, *m_prefixPropagator);
 
   ConfigFile config([] (const std::string& filename, const std::string& sectionName,
                         const ConfigSection& section, bool isDryRun) {
@@ -109,6 +120,23 @@
     config.parse(m_configSection, false, INTERNAL_CONFIG);
   }
 
+  if (m_ribManager->wantAutoPrefixPropagator) {
+    m_prefixPropagator->enable();
+  }
+  else {
+    m_prefixPropagator->disable();
+  }
+
+  if (m_ribManager->wantReadvertiseToNlsr && m_readvertiseNlsr == nullptr) {
+    m_readvertiseNlsr = make_unique<Readvertise>(
+      m_rib,
+      make_unique<ClientToNlsrReadvertisePolicy>(),
+      make_unique<NfdRibReadvertiseDestination>(*m_nfdController, READVERTISE_NLSR_PREFIX, m_rib));
+  }
+  else if (!m_ribManager->wantReadvertiseToNlsr && m_readvertiseNlsr != nullptr) {
+    m_readvertiseNlsr.reset();
+  }
+
   m_ribManager->registerWithNfd();
   m_ribManager->enableLocalFields();
 }
@@ -131,7 +159,7 @@
     // unix socket enabled
 
     auto socketPath = config.get<std::string>("face_system.unix.path", "/var/run/nfd.sock");
-    // default socketPath should be the same as in FaceManager::processSectionUnix
+    // default socketPath should be the same as in UnixStreamFactory::processConfig
 
     return make_shared<ndn::UnixTransport>(socketPath);
   }
@@ -140,7 +168,7 @@
     // tcp is enabled
 
     auto port = config.get<std::string>("face_system.tcp.port", "6363");
-    // default port should be the same as in FaceManager::processSectionTcp
+    // default port should be the same as in TcpFactory::processConfig
 
     return make_shared<ndn::TcpTransport>("localhost", port);
   }
diff --git a/rib/service.hpp b/rib/service.hpp
index 6c01f3e..a32d996 100644
--- a/rib/service.hpp
+++ b/rib/service.hpp
@@ -26,16 +26,21 @@
 #ifndef NFD_RIB_SERVICE_HPP
 #define NFD_RIB_SERVICE_HPP
 
+#include "rib.hpp"
 #include "core/config-file.hpp"
 
 #include <ndn-cxx/face.hpp>
 #include <ndn-cxx/mgmt/dispatcher.hpp>
+#include <ndn-cxx/mgmt/nfd/controller.hpp>
 #include <ndn-cxx/security/key-chain.hpp>
 #include <ndn-cxx/transport/transport.hpp>
 
 namespace nfd {
 namespace rib {
 
+class AutoPrefixPropagator;
+class FibUpdater;
+class Readvertise;
 class RibManager;
 
 /**
@@ -67,7 +72,7 @@
 
   /**
    * \brief create NFD-RIB service
-   * \param config parsed configuration section
+   * \param configSection parsed configuration section
    * \param keyChain the KeyChain
    * \note This constructor overload is more appropriate for integrated environments,
    *       such as NS-3 or android. Error messages related to configuration file
@@ -75,7 +80,7 @@
    * \throw std::logic_error Instance of rib::Service has been already constructed
    * \throw std::logic_error Instance of rib::Service is not constructed on RIB thread
    */
-  Service(const ConfigSection& config, ndn::KeyChain& keyChain);
+  Service(const ConfigSection& configSection, ndn::KeyChain& keyChain);
 
   /**
    * \brief Destructor
@@ -113,7 +118,13 @@
   ConfigSection m_configSection;
 
   ndn::KeyChain& m_keyChain;
+  Rib m_rib;
+
   unique_ptr<ndn::Face> m_face;
+  unique_ptr<ndn::nfd::Controller> m_nfdController;
+  unique_ptr<FibUpdater> m_fibUpdater;
+  unique_ptr<AutoPrefixPropagator> m_prefixPropagator;
+  unique_ptr<Readvertise> m_readvertiseNlsr;
   unique_ptr<ndn::mgmt::Dispatcher> m_dispatcher;
   unique_ptr<RibManager> m_ribManager;
 };
diff --git a/tests/rib/rib-manager.t.cpp b/tests/rib/rib-manager.t.cpp
index cdf1581..77b1ed3 100644
--- a/tests/rib/rib-manager.t.cpp
+++ b/tests/rib/rib-manager.t.cpp
@@ -53,8 +53,10 @@
                     bool shouldClearRib)
     : m_commands(m_face.sentInterests)
     , m_status(status)
-    , m_manager(m_dispatcher, m_face, m_keyChain)
-    , m_rib(m_manager.m_rib)
+    , m_nfdController(m_face, m_keyChain)
+    , m_fibUpdater(m_rib, m_nfdController)
+    , m_prefixPropagator(m_nfdController, m_keyChain, m_rib)
+    , m_manager(m_rib, m_dispatcher, m_face, m_nfdController, m_prefixPropagator)
   {
     m_rib.m_onSendBatchFromQueue = bind(&RibManagerFixture::onSendBatchFromQueue, this, _1);
 
@@ -168,9 +170,8 @@
     RibUpdate update = *(batch.begin());
 
     // Simulate a successful response from NFD
-    FibUpdater& updater = m_manager.m_fibUpdater;
-    m_manager.m_rib.onFibUpdateSuccess(batch, updater.m_inheritedRoutes,
-                                              bind(&RibManager::onRibUpdateSuccess, &m_manager, update));
+    m_rib.onFibUpdateSuccess(batch, m_fibUpdater.m_inheritedRoutes,
+                             bind(&RibManager::onRibUpdateSuccess, &m_manager, update));
   }
 
 public:
@@ -222,14 +223,16 @@
     return CheckCommandResult::OK;
   }
 
-public:
+protected:
   static const Name FIB_COMMAND_PREFIX;
   std::vector<Interest>& m_commands;
   ConfigurationStatus m_status;
 
-protected:
+  ndn::nfd::Controller m_nfdController;
+  Rib m_rib;
+  FibUpdater m_fibUpdater;
+  AutoPrefixPropagator m_prefixPropagator;
   RibManager m_manager;
-  Rib& m_rib;
 };
 
 const Name RibManagerFixture::FIB_COMMAND_PREFIX("/localhost/nfd/fib");
