diff --git a/daemon/mgmt/strategy-choice-manager.cpp b/daemon/mgmt/strategy-choice-manager.cpp
index a28e237..1f0c208 100644
--- a/daemon/mgmt/strategy-choice-manager.cpp
+++ b/daemon/mgmt/strategy-choice-manager.cpp
@@ -35,7 +35,7 @@
                                              Dispatcher& dispatcher,
                                              CommandValidator& validator)
   : NfdManagerBase(dispatcher, validator, "strategy-choice")
-  , m_strategyChoice(strategyChoice)
+  , m_table(strategyChoice)
 {
   registerCommandHandler<ndn::nfd::StrategyChoiceSetCommand>("set",
     bind(&StrategyChoiceManager::setStrategy, this, _2, _3, _4, _5));
@@ -54,15 +54,15 @@
   const Name& prefix = parameters.getName();
   const Name& selectedStrategy = parameters.getStrategy();
 
-  if (!m_strategyChoice.hasStrategy(selectedStrategy)) {
+  if (!m_table.hasStrategy(selectedStrategy)) {
     NFD_LOG_DEBUG("strategy-choice result: FAIL reason: unknown-strategy: "
                   << parameters.getStrategy());
     return done(ControlResponse(504, "Unsupported strategy"));
   }
 
-  if (m_strategyChoice.insert(prefix, selectedStrategy)) {
+  if (m_table.insert(prefix, selectedStrategy)) {
     NFD_LOG_DEBUG("strategy-choice result: SUCCESS");
-    auto currentStrategyChoice = m_strategyChoice.get(prefix);
+    auto currentStrategyChoice = m_table.get(prefix);
     BOOST_ASSERT(currentStrategyChoice.first);
     parameters.setStrategy(currentStrategyChoice.second);
     return done(ControlResponse(200, "OK").setBody(parameters.wireEncode()));
@@ -78,7 +78,7 @@
                                      ControlParameters parameters,
                                      const ndn::mgmt::CommandContinuation& done)
 {
-  m_strategyChoice.erase(parameters.getName());
+  m_table.erase(parameters.getName());
 
   NFD_LOG_DEBUG("strategy-choice result: SUCCESS");
   done(ControlResponse(200, "OK").setBody(parameters.wireEncode()));
@@ -88,7 +88,7 @@
 StrategyChoiceManager::listChoices(const Name& topPrefix, const Interest& interest,
                                    ndn::mgmt::StatusDatasetContext& context)
 {
-  for (auto&& i : m_strategyChoice) {
+  for (auto&& i : m_table) {
     ndn::nfd::StrategyChoice entry;
     entry.setName(i.getPrefix()).setStrategy(i.getStrategyName());
     context.append(entry.wireEncode());
diff --git a/daemon/mgmt/strategy-choice-manager.hpp b/daemon/mgmt/strategy-choice-manager.hpp
index eff3418..9fd4ad3 100644
--- a/daemon/mgmt/strategy-choice-manager.hpp
+++ b/daemon/mgmt/strategy-choice-manager.hpp
@@ -30,7 +30,9 @@
 
 namespace nfd {
 
+namespace strategy_choice {
 class StrategyChoice;
+} // namespace strategy_choice
 
 /**
  * @brief implement the Strategy Choice Management of NFD Management Protocol.
@@ -39,7 +41,7 @@
 class StrategyChoiceManager : public NfdManagerBase
 {
 public:
-  StrategyChoiceManager(StrategyChoice& strategyChoice,
+  StrategyChoiceManager(strategy_choice::StrategyChoice& table,
                         Dispatcher& dispatcher,
                         CommandValidator& validator);
 
@@ -59,7 +61,7 @@
               ndn::mgmt::StatusDatasetContext& context);
 
 private:
-  StrategyChoice& m_strategyChoice;
+  strategy_choice::StrategyChoice& m_table;
 };
 
 } // namespace nfd
diff --git a/daemon/table/name-tree-entry.cpp b/daemon/table/name-tree-entry.cpp
index 87853f2..3244059 100644
--- a/daemon/table/name-tree-entry.cpp
+++ b/daemon/table/name-tree-entry.cpp
@@ -119,15 +119,15 @@
 }
 
 void
-Entry::setStrategyChoiceEntry(shared_ptr<strategy_choice::Entry> strategyChoiceEntry)
+Entry::setStrategyChoiceEntry(unique_ptr<strategy_choice::Entry> strategyChoiceEntry)
 {
   BOOST_ASSERT(strategyChoiceEntry == nullptr || strategyChoiceEntry->m_nameTreeEntry.expired());
 
   if (m_strategyChoiceEntry != nullptr) {
     m_strategyChoiceEntry->m_nameTreeEntry.reset();
   }
+  m_strategyChoiceEntry = std::move(strategyChoiceEntry);
 
-  m_strategyChoiceEntry = strategyChoiceEntry;
   if (m_strategyChoiceEntry != nullptr) {
     m_strategyChoiceEntry->m_nameTreeEntry = this->shared_from_this();
   }
diff --git a/daemon/table/name-tree-entry.hpp b/daemon/table/name-tree-entry.hpp
index c650587..7bade1f 100644
--- a/daemon/table/name-tree-entry.hpp
+++ b/daemon/table/name-tree-entry.hpp
@@ -120,9 +120,9 @@
   getMeasurementsEntry() const;
 
   void
-  setStrategyChoiceEntry(shared_ptr<strategy_choice::Entry> strategyChoiceEntry);
+  setStrategyChoiceEntry(unique_ptr<strategy_choice::Entry> strategyChoiceEntry);
 
-  shared_ptr<strategy_choice::Entry>
+  strategy_choice::Entry*
   getStrategyChoiceEntry() const;
 
 private:
@@ -136,7 +136,7 @@
   unique_ptr<fib::Entry> m_fibEntry;
   std::vector<shared_ptr<pit::Entry> > m_pitEntries;
   shared_ptr<measurements::Entry> m_measurementsEntry;
-  shared_ptr<strategy_choice::Entry> m_strategyChoiceEntry;
+  unique_ptr<strategy_choice::Entry> m_strategyChoiceEntry;
 
   // get the Name Tree Node that is associated with this Name Tree Entry
   Node* m_node;
@@ -211,10 +211,10 @@
   return m_measurementsEntry;
 }
 
-inline shared_ptr<strategy_choice::Entry>
+inline strategy_choice::Entry*
 Entry::getStrategyChoiceEntry() const
 {
-  return m_strategyChoiceEntry;
+  return m_strategyChoiceEntry.get();
 }
 
 } // namespace name_tree
diff --git a/daemon/table/name-tree.cpp b/daemon/table/name-tree.cpp
index 796e701..bc7d7c7 100644
--- a/daemon/table/name-tree.cpp
+++ b/daemon/table/name-tree.cpp
@@ -277,7 +277,7 @@
 NameTree::lookup(const strategy_choice::Entry& strategyChoiceEntry) const
 {
   shared_ptr<name_tree::Entry> nte = this->getEntry(strategyChoiceEntry);
-  BOOST_ASSERT(nte == nullptr || nte->getStrategyChoiceEntry().get() == &strategyChoiceEntry);
+  BOOST_ASSERT(nte == nullptr || nte->getStrategyChoiceEntry() == &strategyChoiceEntry);
   return nte;
 }
 
diff --git a/daemon/table/strategy-choice.cpp b/daemon/table/strategy-choice.cpp
index de7cb13..5778237 100644
--- a/daemon/table/strategy-choice.cpp
+++ b/daemon/table/strategy-choice.cpp
@@ -30,8 +30,8 @@
 #include "measurements-entry.hpp"
 
 namespace nfd {
+namespace strategy_choice {
 
-using strategy_choice::Entry;
 using fw::Strategy;
 
 NFD_LOG_INIT("StrategyChoice");
@@ -96,7 +96,7 @@
   }
 
   shared_ptr<name_tree::Entry> nte = m_nameTree.lookup(prefix);
-  shared_ptr<Entry> entry = nte->getStrategyChoiceEntry();
+  Entry* entry = nte->getStrategyChoiceEntry();
   Strategy* oldStrategy = nullptr;
   if (entry != nullptr) {
     if (entry->getStrategy().getName() == strategy->getName()) {
@@ -110,8 +110,9 @@
 
   if (entry == nullptr) {
     oldStrategy = &this->findEffectiveStrategy(prefix);
-    entry = make_shared<Entry>(prefix);
-    nte->setStrategyChoiceEntry(entry);
+    auto newEntry = make_unique<Entry>(prefix);
+    entry = newEntry.get();
+    nte->setStrategyChoiceEntry(std::move(newEntry));
     ++m_nItems;
     NFD_LOG_TRACE("insert(" << prefix << ") new entry " << strategy->getName());
   }
@@ -131,7 +132,7 @@
     return;
   }
 
-  shared_ptr<Entry> entry = nte->getStrategyChoiceEntry();
+  Entry* entry = nte->getStrategyChoiceEntry();
   if (entry == nullptr) {
     return;
   }
@@ -141,7 +142,7 @@
   Strategy& parentStrategy = this->findEffectiveStrategy(prefix.getPrefix(-1));
   this->changeStrategy(*entry, oldStrategy, parentStrategy);
 
-  nte->setStrategyChoiceEntry(shared_ptr<Entry>());
+  nte->setStrategyChoiceEntry(nullptr);
   m_nameTree.eraseEntryIfEmpty(nte);
   --m_nItems;
 }
@@ -151,24 +152,22 @@
 {
   shared_ptr<name_tree::Entry> nte = m_nameTree.findExactMatch(prefix);
   if (nte == nullptr) {
-    return { false, Name() };
+    return {false, Name()};
   }
 
-  shared_ptr<Entry> entry = nte->getStrategyChoiceEntry();
+  Entry* entry = nte->getStrategyChoiceEntry();
   if (entry == nullptr) {
-    return { false, Name() };
+    return {false, Name()};
   }
 
-  return { true, entry->getStrategy().getName() };
+  return {true, entry->getStrategy().getName()};
 }
 
 Strategy&
 StrategyChoice::findEffectiveStrategy(const Name& prefix) const
 {
   shared_ptr<name_tree::Entry> nte = m_nameTree.findLongestPrefixMatch(prefix,
-    [] (const name_tree::Entry& entry) {
-      return entry.getStrategyChoiceEntry() != nullptr;
-    });
+    [] (const name_tree::Entry& entry) { return entry.getStrategyChoiceEntry() != nullptr; });
 
   BOOST_ASSERT(nte != nullptr);
   return nte->getStrategyChoiceEntry()->getStrategy();
@@ -177,14 +176,12 @@
 Strategy&
 StrategyChoice::findEffectiveStrategy(shared_ptr<name_tree::Entry> nte) const
 {
-  shared_ptr<strategy_choice::Entry> entry = nte->getStrategyChoiceEntry();
+  Entry* entry = nte->getStrategyChoiceEntry();
   if (entry != nullptr)
     return entry->getStrategy();
 
   nte = m_nameTree.findLongestPrefixMatch(nte,
-    [] (const name_tree::Entry& entry) {
-      return entry.getStrategyChoiceEntry() != nullptr;
-    });
+    [] (const name_tree::Entry& entry) { return entry.getStrategyChoiceEntry() != nullptr; });
 
   BOOST_ASSERT(nte != nullptr);
   return nte->getStrategyChoiceEntry()->getStrategy();
@@ -213,15 +210,15 @@
 {
   this->install(strategy);
 
+  auto entry = make_unique<Entry>(Name());
+  entry->setStrategy(*strategy);
+
   // don't use .insert here, because it will invoke findEffectiveStrategy
   // which expects an existing root entry
   shared_ptr<name_tree::Entry> nte = m_nameTree.lookup(Name());
-  shared_ptr<Entry> entry = make_shared<Entry>(Name());
-  nte->setStrategyChoiceEntry(entry);
+  nte->setStrategyChoiceEntry(std::move(entry));
   ++m_nItems;
   NFD_LOG_INFO("setDefaultStrategy " << strategy->getName());
-
-  entry->setStrategy(*strategy);
 }
 
 static inline void
@@ -244,7 +241,7 @@
 }
 
 void
-StrategyChoice::changeStrategy(strategy_choice::Entry& entry,
+StrategyChoice::changeStrategy(Entry& entry,
                                fw::Strategy& oldStrategy,
                                fw::Strategy& newStrategy)
 {
@@ -284,4 +281,5 @@
   return const_iterator(enumerable.begin());
 }
 
+} // namespace strategy_choice
 } // namespace nfd
diff --git a/daemon/table/strategy-choice.hpp b/daemon/table/strategy-choice.hpp
index 68ed395..7082092 100644
--- a/daemon/table/strategy-choice.hpp
+++ b/daemon/table/strategy-choice.hpp
@@ -1,12 +1,12 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California,
- *                      Arizona Board of Regents,
- *                      Colorado State University,
- *                      University Pierre & Marie Curie, Sorbonne University,
- *                      Washington University in St. Louis,
- *                      Beijing Institute of Technology,
- *                      The University of Memphis
+ * Copyright (c) 2014-2016,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -30,6 +30,7 @@
 #include "name-tree.hpp"
 
 namespace nfd {
+namespace strategy_choice {
 
 /** \brief represents the Strategy Choice table
  *
@@ -105,7 +106,7 @@
 
 public: // enumeration
   class const_iterator
-    : public std::iterator<std::forward_iterator_tag, const strategy_choice::Entry>
+    : public std::iterator<std::forward_iterator_tag, const Entry>
   {
   public:
     explicit
@@ -113,10 +114,10 @@
 
     ~const_iterator();
 
-    const strategy_choice::Entry&
+    const Entry&
     operator*() const;
 
-    shared_ptr<strategy_choice::Entry>
+    const Entry*
     operator->() const;
 
     const_iterator&
@@ -156,7 +157,7 @@
   setDefaultStrategy(shared_ptr<fw::Strategy> strategy);
 
   void
-  changeStrategy(strategy_choice::Entry& entry,
+  changeStrategy(Entry& entry,
                  fw::Strategy& oldStrategy,
                  fw::Strategy& newStrategy);
 
@@ -167,7 +168,7 @@
   NameTree& m_nameTree;
   size_t m_nItems;
 
-  typedef std::map<Name, shared_ptr<fw::Strategy> > StrategyInstanceTable;
+  typedef std::map<Name, shared_ptr<fw::Strategy>> StrategyInstanceTable;
   StrategyInstanceTable m_strategyInstances;
 };
 
@@ -210,13 +211,13 @@
   return *this;
 }
 
-inline const strategy_choice::Entry&
+inline const Entry&
 StrategyChoice::const_iterator::operator*() const
 {
   return *(m_nameTreeIterator->getStrategyChoiceEntry());
 }
 
-inline shared_ptr<strategy_choice::Entry>
+inline const Entry*
 StrategyChoice::const_iterator::operator->() const
 {
   return m_nameTreeIterator->getStrategyChoiceEntry();
@@ -234,6 +235,10 @@
   return m_nameTreeIterator != other.m_nameTreeIterator;
 }
 
+} // namespace strategy_choice
+
+using strategy_choice::StrategyChoice;
+
 } // namespace nfd
 
 #endif // NFD_DAEMON_TABLE_STRATEGY_CHOICE_HPP
