diff --git a/examples/producer.cpp b/examples/producer.cpp
index 4a24bac..53ccdc0 100644
--- a/examples/producer.cpp
+++ b/examples/producer.cpp
@@ -49,11 +49,12 @@
     face_.put(data);
   }
 
+
   void
-  onRegisterFailed(const ptr_lib::shared_ptr<const Name>&)
+  onRegisterFailed (const ndn::Name& prefix, const std::string& reason)
   {
-    std::cerr << "ERROR: Failed to register prefix in local hub's daemon" << std::endl;
-    face_.shutdown();
+    std::cerr << "ERROR: Failed to register prefix in local hub's daemon (" << reason << ")" << std::endl;
+    face_.shutdown ();
   }
   
   void
@@ -61,7 +62,7 @@
   {
     face_.setInterestFilter("/localhost/testApp",
                             func_lib::bind(&Producer::onInterest, this, _1, _2),
-                            func_lib::bind(&Producer::onRegisterFailed, this, _1));
+                            func_lib::bind(&Producer::onRegisterFailed, this, _1, _2));
     face_.processEvents();
   }
 
diff --git a/src/management/controller.hpp b/src/management/controller.hpp
new file mode 100644
index 0000000..f919489
--- /dev/null
+++ b/src/management/controller.hpp
@@ -0,0 +1,43 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/**
+ * Copyright (C) 2013 Regents of the University of California.
+ * See COPYING for copyright and distribution information.
+ */
+
+#ifndef NDN_MANAGEMENT_CONTROLLER_HPP
+#define NDN_MANAGEMENT_CONTROLLER_HPP
+
+#include "../common.hpp"
+#include "../name.hpp"
+#include "../interest.hpp"
+#include "../data.hpp"
+
+namespace ndn {
+
+class Node;
+
+class Controller
+{
+public:
+  typedef function<void()>                   SuccessCallback;
+  typedef function<void(const std::string&)> FailCallback;
+
+  virtual
+  ~Controller()
+  {
+  }
+  
+  virtual void
+  selfRegisterPrefix(const Name& prefixToRegister,
+                     const SuccessCallback& onSuccess,
+                     const FailCallback&    onFail) = 0;
+
+  virtual void
+  selfDeregisterPrefix(const Name& prefixToRegister,
+                       const SuccessCallback& onSuccess,
+                       const FailCallback&    onFail) = 0;
+};
+
+} // namespace ndn
+
+#endif // NDN_MANAGEMENT_CONTROLLER_HPP
diff --git a/src/management/ndnd-control.cpp b/src/management/ndnd-controller.cpp
similarity index 66%
rename from src/management/ndnd-control.cpp
rename to src/management/ndnd-controller.cpp
index 6f48231..e95d85e 100644
--- a/src/management/ndnd-control.cpp
+++ b/src/management/ndnd-controller.cpp
@@ -5,6 +5,8 @@
  */
 
 #include "common.hpp"
+#include "ndnd-controller.hpp"
+
 #include "../node.hpp"
 #include "../security/signature-sha256-with-rsa.hpp"
 #include "../util/random.hpp"
@@ -16,43 +18,43 @@
 namespace ndn {
 namespace ndnd {
 
-Control::Control(Node& face)
+Controller::Controller(Node& face)
   : m_face(face)
   , m_faceId(-1)
 {
 }
 
 void
-Control::selfRegisterPrefix(const Name& prefixToRegister,
-                            const SuccessCallback& onSuccess,
-                            const FailCallback&    onFail)
+Controller::selfRegisterPrefix(const Name& prefixToRegister,
+                               const SuccessCallback& onSuccess,
+                               const FailCallback&    onFail)
 {
   if (!m_ndndId.hasValue())
     {
       if (m_filterRequests.empty())
         {
           m_face.expressInterest(Name("/%C1.M.S.localhost/%C1.M.SRV/ndnd/KEY"),
-                                 bind(&Control::onNdnidFetched, this, _1, _2),
-                                 bind(onFail));
+                                 bind(&Controller::onNdnidFetched, this, _1, _2),
+                                 bind(onFail, "NDNDID fetching timed out"));
         }
       m_filterRequests.push_back(FilterRequest(prefixToRegister, onSuccess, onFail));
     }
   else
     startPrefixAction(ForwardingEntry("selfreg", prefixToRegister),
-                      bind(&Control::recordSelfRegisteredFaceId, this, _1, onSuccess),
+                      bind(&Controller::recordSelfRegisteredFaceId, this, _1, onSuccess),
                       onFail);
 }
 
 
 void
-Control::selfDeregisterPrefix(const Name& prefixToRegister,
-                              const SuccessCallback& onSuccess,
-                              const FailCallback&    onFail)
+Controller::selfDeregisterPrefix(const Name& prefixToRegister,
+                                 const SuccessCallback& onSuccess,
+                                 const FailCallback&    onFail)
 {
   if (!m_ndndId.hasValue() || m_faceId == -1)
     {
       if (static_cast<bool>(onFail))
-        onFail();
+        onFail("NDNID is not available (must have been present after a successful registration operation)");
       return;
     }
 
@@ -62,8 +64,8 @@
 
 
 void 
-Control::onNdnidFetched(const shared_ptr<const Interest>& interest,
-                        const shared_ptr<Data>& data)
+Controller::onNdnidFetched(const shared_ptr<const Interest>& interest,
+                           const shared_ptr<Data>& data)
 {
   if (data->getName().size() > interest->getName().size())
     {
@@ -74,7 +76,7 @@
            ++i)
         {
           startPrefixAction(ForwardingEntry("selfreg", i->m_prefixToRegister),
-                            bind(&Control::recordSelfRegisteredFaceId, this, _1, i->m_onSuccess),
+                            bind(&Controller::recordSelfRegisteredFaceId, this, _1, i->m_onSuccess),
                             i->m_onFailure);
         }
     }
@@ -85,15 +87,15 @@
            ++i)
         {
           if (static_cast<bool>(i->m_onFailure))
-              i->m_onFailure();
+              i->m_onFailure("NDNID cannot be fetched");
         }
     }
   m_filterRequests.clear();
 }
 
 void
-Control::recordSelfRegisteredFaceId(const ForwardingEntry& entry,
-                                    const SuccessCallback& onSuccess)
+Controller::recordSelfRegisteredFaceId(const ForwardingEntry& entry,
+                                       const SuccessCallback& onSuccess)
 {
   m_faceId = entry.getFaceId();
   if (static_cast<bool>(onSuccess))
@@ -101,9 +103,9 @@
 }
 
 void
-Control::startFaceAction(const FaceInstance& entry,
-                         const FaceOperationSucceedCallback& onSuccess,
-                         const FailCallback& onFailure)
+Controller::startFaceAction(const FaceInstance& entry,
+                            const FaceOperationSucceedCallback& onSuccess,
+                            const FailCallback& onFail)
 {
   // Set the ForwardingEntry as the content of a Data packet and sign.
   Data data;
@@ -129,14 +131,14 @@
   interest.setMustBeFresh(true);
 
   m_face.expressInterest(interest,
-                         bind(&Control::processFaceActionResponse, this, _2, onSuccess, onFailure),
-                         bind(onFailure));
+                         bind(&Controller::processFaceActionResponse, this, _2, onSuccess, onFail),
+                         bind(onFail, "Command Interest failed"));
 }
 
 void
-Control::startPrefixAction(const ForwardingEntry& entry,
-                           const PrefixOperationSucceedCallback& onSuccess,
-                           const FailCallback& onFailure)
+Controller::startPrefixAction(const ForwardingEntry& entry,
+                              const PrefixOperationSucceedCallback& onSuccess,
+                              const FailCallback& onFail)
 {
   // Set the ForwardingEntry as the content of a Data packet and sign.
   Data data;
@@ -162,14 +164,14 @@
   interest.setMustBeFresh(true);
 
   m_face.expressInterest(interest,
-                         bind(&Control::processPrefixActionResponse, this, _2, onSuccess, onFailure),
-                         bind(onFailure));
+                         bind(&Controller::processPrefixActionResponse, this, _2, onSuccess, onFail),
+                         bind(onFail, "Command Interest timed out"));
 }
 
 void
-Control::processFaceActionResponse(const shared_ptr<Data>& data,
-                                   const FaceOperationSucceedCallback& onSuccess,
-                                   const FailCallback& onFail)
+Controller::processFaceActionResponse(const shared_ptr<Data>& data,
+                                      const FaceOperationSucceedCallback& onSuccess,
+                                      const FailCallback& onFail)
 {
   Block content = data->getContent();
   content.parse();
@@ -177,7 +179,7 @@
   if (content.getAll().empty())
     {
       if (static_cast<bool>(onFail))
-        onFail();
+        onFail("Empty response");
       return;
     }
 
@@ -200,22 +202,22 @@
         resp.wireDecode(*val);
 
         if (static_cast<bool>(onFail))
-          onFail();
+          onFail(resp.getInfo());
         return;
       }
     default:
       {
         if (static_cast<bool>(onFail))
-          onFail();
+          onFail("Invalid response");
         return;
       }
     }
 }
 
 void
-Control::processPrefixActionResponse(const shared_ptr<Data>& data,
-                                     const PrefixOperationSucceedCallback& onSuccess,
-                                     const FailCallback& onFail)
+Controller::processPrefixActionResponse(const shared_ptr<Data>& data,
+                                        const PrefixOperationSucceedCallback& onSuccess,
+                                        const FailCallback& onFail)
 {
   Block content = data->getContent();
   content.parse();
@@ -223,7 +225,7 @@
   if (content.getAll().empty())
     {
       if (static_cast<bool>(onFail))
-        onFail();
+        onFail("Empty response");
       return;
     }
 
@@ -248,13 +250,13 @@
         // std::cerr << "StatusReponse: " << resp << std::endl;
       
         if (static_cast<bool>(onFail))
-          onFail();
+          onFail(resp.getInfo());
         return;
       }
     default:
       {
         if (static_cast<bool>(onFail))
-          onFail();
+          onFail("Invalid response");
         return;
       }
     }
diff --git a/src/management/ndnd-control.hpp b/src/management/ndnd-controller.hpp
similarity index 88%
rename from src/management/ndnd-control.hpp
rename to src/management/ndnd-controller.hpp
index fd22f15..319f995 100644
--- a/src/management/ndnd-control.hpp
+++ b/src/management/ndnd-controller.hpp
@@ -4,10 +4,15 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_MANAGEMENT_NDND_CONTROL_HPP
-#define NDN_MANAGEMENT_NDND_CONTROL_HPP
+#ifndef NDN_MANAGEMENT_NDND_CONTROLLER_HPP
+#define NDN_MANAGEMENT_NDND_CONTROLLER_HPP
 
 #include "../common.hpp"
+#include "controller.hpp"
+
+#include "../name.hpp"
+#include "../interest.hpp"
+#include "../data.hpp"
 
 namespace ndn {
 
@@ -23,26 +28,23 @@
  *
  * ndnd::Control should be used when connecting to ndnd-tlv daemon
  */
-class Control
+class Controller : public ndn::Controller
 {
 public:
-  typedef function<void()>                       SuccessCallback;
-  typedef function<void()>                       FailCallback;
-
   typedef function<void(const ForwardingEntry&)> PrefixOperationSucceedCallback;
   typedef function<void(const FaceInstance&)>    FaceOperationSucceedCallback;
 
   /**
    * @brief Construct ndnd::Control object
    */
-  Control(Node& face);
+  Controller(Node& face);
 
-  void
+  virtual void
   selfRegisterPrefix(const Name& prefixToRegister,
                      const SuccessCallback& onSuccess,
                      const FailCallback&    onFail);
 
-  void
+  virtual void
   selfDeregisterPrefix(const Name& prefixToRegister,
                        const SuccessCallback& onSuccess,
                        const FailCallback&    onFail);
@@ -106,4 +108,4 @@
 } // namespace ndnd
 } // namespace ndn
 
-#endif // NDN_MANAGEMENT_NDND_CONTROL_HPP
+#endif // NDN_MANAGEMENT_NDND_CONTROLLER_HPP
diff --git a/src/management/control-response.hpp b/src/management/nfd-control-response.hpp
similarity index 92%
rename from src/management/control-response.hpp
rename to src/management/nfd-control-response.hpp
index f493f5a..238d1c5 100644
--- a/src/management/control-response.hpp
+++ b/src/management/nfd-control-response.hpp
@@ -11,6 +11,7 @@
 #include "../encoding/tlv-nfd-control.hpp"
 
 namespace ndn {
+namespace nfd {
 
 /**
  * @brief Class defining abstraction of ControlResponse for NFD Control Protocol
@@ -31,6 +32,11 @@
     , m_text(text)
   {
   }
+
+  ControlResponse(const Block& block)
+  {
+    wireDecode(block);
+  }
   
   inline uint32_t
   getCode() const;
@@ -133,6 +139,9 @@
   m_wire = wire;
   m_wire.parse();
 
+  if (m_wire.type() != tlv::nfd_control::ControlResponse)
+    throw Error("Requested decoding of ControlResponse, but Block is of different type");  
+  
   Block::element_iterator val = m_wire.getAll().begin();
   if (val == m_wire.getAll().end() ||
       val->type() != tlv::nfd_control::StatusCode)
@@ -164,6 +173,7 @@
   return os;
 }
 
+} // namespace nfd
 } // namespace ndn
 
 #endif // NDN_MANAGEMENT_CONTROL_RESPONSE_HPP
diff --git a/src/management/nfd-control.hpp b/src/management/nfd-control.hpp
deleted file mode 100644
index 642afd8..0000000
--- a/src/management/nfd-control.hpp
+++ /dev/null
@@ -1,14 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
-/**
- * Copyright (C) 2013 Regents of the University of California.
- * See COPYING for copyright and distribution information.
- */
-
-#ifndef NDN_MANAGEMENT_NFD_CONTROL_HPP
-#define NDN_MANAGEMENT_NFD_CONTROL_HPP
-
-namespace ndn {
-
-} // namespace ndn
-
-#endif // NDN_MANAGEMENT_NFD_CONTROL_HPP
diff --git a/src/management/nfd-controller.cpp b/src/management/nfd-controller.cpp
new file mode 100644
index 0000000..c72c5d3
--- /dev/null
+++ b/src/management/nfd-controller.cpp
@@ -0,0 +1,122 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/**
+ * Copyright (C) 2013 Regents of the University of California.
+ * See COPYING for copyright and distribution information.
+ */
+
+#include "common.hpp"
+#include "../node.hpp"
+
+#include "nfd-controller.hpp"
+#include "nfd-fib-management-options.hpp"
+#include "nfd-control-response.hpp"
+
+namespace ndn {
+namespace nfd {
+
+Controller::Controller(Node& face)
+  : m_face(face)
+  , m_faceId(0)
+{
+}
+
+void
+Controller::selfRegisterPrefix(const Name& prefixToRegister,
+                               const SuccessCallback& onSuccess,
+                               const FailCallback&    onFail)
+{
+  startFibCommand("add-nexthop",
+                  FibManagementOptions()
+                  .setName(prefixToRegister)
+                  .setFaceId(0) // self-registration
+                  .setCost(0),
+                  bind(&Controller::recordSelfRegisteredFaceId, this, _1, onSuccess),
+                  onFail);
+}
+
+void
+Controller::selfDeregisterPrefix(const Name& prefixToRegister,
+                                 const SuccessCallback& onSuccess,
+                                 const FailCallback&    onFail)
+{
+  if (m_faceId == 0)
+    {
+      if (static_cast<bool>(onFail))
+        onFail("Face ID is not set, should have been set after a successful prefix registration command");
+      return;
+    }
+  
+  startFibCommand("remove-nexthop",
+                  FibManagementOptions()
+                  .setName(prefixToRegister)
+                  .setFaceId(m_faceId),
+                  bind(onSuccess), onFail);
+}
+
+void
+Controller::startFibCommand(const std::string& command,
+                            const FibManagementOptions& options,
+                            const FibCommandSucceedCallback& onSuccess,
+                            const FailCallback& onFail)
+{
+  Name fibCommandInterestName("/localhost/nfd/fib");
+  fibCommandInterestName
+    .append(command)
+    .append(options.wireEncode());
+
+  Interest fibCommandInterest(fibCommandInterestName);
+  m_keyChain.sign(fibCommandInterest);
+
+  m_face.expressInterest(fibCommandInterest,
+                         bind(&Controller::processFibCommandResponse, this, _2,
+                              onSuccess, onFail),
+                         bind(onFail, "Command Interest timed out"));
+}
+
+void
+Controller::recordSelfRegisteredFaceId(const FibManagementOptions& entry,
+                                       const SuccessCallback& onSuccess)
+{
+  m_faceId = entry.getFaceId();
+  onSuccess();
+}
+
+// void
+// processFaceActionResponse(const shared_ptr<Data>& data,
+//                           const FaceOperationSucceedCallback& onSuccess,
+//                           const FailCallback&    onFail);
+
+void
+Controller::processFibCommandResponse(const shared_ptr<Data>& data,
+                                      const FibCommandSucceedCallback& onSuccess,
+                                      const FailCallback& onFail)
+{
+  try
+    {
+      ControlResponse response(data->getContent().blockFromValue());
+
+      if (response.getCode() != 200)
+        return onFail(response.getText());
+
+      FibManagementOptions options(response.getBody());
+      return onSuccess(options);
+    }
+  catch(ndn::Tlv::Error& e)
+    {
+      if (static_cast<bool>(onFail))
+        return onFail(e.what());
+    }
+  catch(ControlResponse::Error& e)
+    {
+      if (static_cast<bool>(onFail))
+        return onFail(e.what());
+    }
+  catch(FibManagementOptions::Error& e)
+    {
+      if (static_cast<bool>(onFail))
+        return onFail(e.what());
+    }
+}
+
+} // namespace nfd
+} // namespace ndn
diff --git a/src/management/nfd-controller.hpp b/src/management/nfd-controller.hpp
new file mode 100644
index 0000000..d5400c6
--- /dev/null
+++ b/src/management/nfd-controller.hpp
@@ -0,0 +1,75 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/**
+ * Copyright (C) 2013 Regents of the University of California.
+ * See COPYING for copyright and distribution information.
+ */
+
+#ifndef NDN_MANAGEMENT_NFD_CONTROL_HPP
+#define NDN_MANAGEMENT_NFD_CONTROL_HPP
+
+#include "../common.hpp"
+#include "controller.hpp"
+
+#include "../name.hpp"
+#include "../interest.hpp"
+#include "../data.hpp"
+#include "../security/key-chain.hpp"
+
+namespace ndn {
+
+class Name;
+
+namespace nfd {
+
+class FibManagementOptions;
+
+class Controller : public ndn::Controller
+{
+public:
+  typedef function<void(const FibManagementOptions&)> FibCommandSucceedCallback;
+
+  /**
+   * @brief Construct ndnd::Control object
+   */
+  Controller(Node& face);
+
+  virtual void
+  selfRegisterPrefix(const Name& prefixToRegister,
+                     const SuccessCallback& onSuccess,
+                     const FailCallback&    onFail);
+
+  virtual void
+  selfDeregisterPrefix(const Name& prefixToRegister,
+                       const SuccessCallback& onSuccess,
+                       const FailCallback&    onFail);
+
+  void
+  startFibCommand(const std::string& command,
+                  const FibManagementOptions& options,
+                  const FibCommandSucceedCallback& onSuccess,
+                  const FailCallback& onFailure);
+private:
+  void
+  recordSelfRegisteredFaceId(const FibManagementOptions& entry,
+                             const SuccessCallback& onSuccess);
+
+  // void
+  // processFaceActionResponse(const shared_ptr<Data>& data,
+  //                           const FaceOperationSucceedCallback& onSuccess,
+  //                           const FailCallback&    onFail);
+
+  void
+  processFibCommandResponse(const shared_ptr<Data>& data,
+                            const FibCommandSucceedCallback& onSuccess,
+                            const FailCallback& onFail);
+  
+private:
+  Node& m_face;
+  KeyChain m_keyChain;
+  uint64_t m_faceId; // internal face ID (needed for prefix de-registration)
+};
+
+} // namespace nfd
+} // namespace ndn
+
+#endif // NDN_MANAGEMENT_NFD_CONTROL_HPP
diff --git a/src/management/fib-management-options.hpp b/src/management/nfd-fib-management-options.hpp
similarity index 63%
rename from src/management/fib-management-options.hpp
rename to src/management/nfd-fib-management-options.hpp
index 58048b5..67e344c 100644
--- a/src/management/fib-management-options.hpp
+++ b/src/management/nfd-fib-management-options.hpp
@@ -7,8 +7,8 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_FIB_MANAGEMENT_HPP
-#define NDN_FIB_MANAGEMENT_HPP
+#ifndef NDN_MANAGEMENT_NFD_FIB_MANAGEMENT_OPTIONS_HPP
+#define NDN_MANAGEMENT_NFD_FIB_MANAGEMENT_OPTIONS_HPP
 
 #include "../encoding/block.hpp"
 #include "../encoding/encoding-buffer.hpp"
@@ -16,40 +16,73 @@
 #include "../name.hpp"
 
 namespace ndn {
+namespace nfd {
 
 class FibManagementOptions {
 public:
+  struct Error : public Tlv::Error { Error(const std::string &what) : Tlv::Error(what) {} };
+
   FibManagementOptions ()
     : faceId_ (-1)
     , cost_ (-1)
   {
   }
+
+  FibManagementOptions(const Block& block)
+  {
+    wireDecode(block);
+  }
   
   const Name& 
-  getName () const { return name_; }
+  getName () const
+  {
+    return name_;
+  }
   
-  void
-  setName (const Name &name) { name_ = name; wire_.reset (); }
+  FibManagementOptions&
+  setName (const Name &name)
+  {
+    name_ = name;
+    wire_.reset ();
+    return *this;
+  }
   
   int 
-  getFaceId () const { return faceId_; }
+  getFaceId () const
+  {
+    return faceId_;
+  }
 
-  void 
-  setFaceId (int faceId) { faceId_ = faceId; wire_.reset (); }
+  FibManagementOptions&
+  setFaceId (int faceId)
+  {
+    faceId_ = faceId;
+    wire_.reset ();
+    return *this;
+  }
 
   int 
-  getCost () const { return cost_; }
+  getCost () const
+  {
+    return cost_;
+  }
 
-  void 
-  setCost (int cost) { cost_ = cost; wire_.reset (); }
+  FibManagementOptions&
+  setCost (int cost)
+  {
+    cost_ = cost;
+    wire_.reset ();
+    return *this;
+  }
 
-  inline size_t
-  wireEncode (EncodingBuffer& blk);
+  template<bool T>
+  size_t
+  wireEncode(EncodingImpl<T> &block) const;
   
-  inline const Block&
+  const Block&
   wireEncode () const;
   
-  inline void 
+  void 
   wireDecode (const Block &wire);
   
 private:
@@ -62,8 +95,9 @@
   mutable Block wire_;
 };
 
+template<bool T>
 inline size_t
-FibManagementOptions::wireEncode (EncodingBuffer& blk)
+FibManagementOptions::wireEncode(EncodingImpl<T>& blk) const
 {
   size_t total_len = 0;
   if (cost_ != -1)
@@ -89,28 +123,27 @@
   return total_len;
 }
 
+template
+size_t
+FibManagementOptions::wireEncode<true>(EncodingBuffer& block) const;
+
+template
+size_t
+FibManagementOptions::wireEncode<false>(EncodingEstimator& block) const;
+
 inline const Block&
 FibManagementOptions::wireEncode () const
 {
   if (wire_.hasWire ())
     return wire_;
-  
-  wire_ = Block (tlv::nfd_control::FibManagementOptions);
 
-  // Name
-  wire_.push_back (name_.wireEncode ());
+  EncodingEstimator estimator;
+  size_t estimatedSize = wireEncode(estimator);
   
-  // FaceId
-  if (faceId_ != -1)
-    wire_.push_back (nonNegativeIntegerBlock (tlv::nfd_control::FaceId, faceId_));
+  EncodingBuffer buffer(estimatedSize, 0);
+  wireEncode(buffer);
 
-  // Cost
-  if (cost_ != -1)
-    wire_.push_back (nonNegativeIntegerBlock (tlv::nfd_control::Cost, cost_));
-
-  //TODO: Strategy
-  
-  wire_.encode ();
+  wire_ = buffer.block();
   return wire_;
 }
   
@@ -122,6 +155,10 @@
   cost_ = -1;
 
   wire_ = wire;
+
+  if (wire_.type() != tlv::nfd_control::FibManagementOptions)
+    throw Error("Requested decoding of FibManagementOptions, but Block is of different type");
+  
   wire_.parse ();
 
   // Name
@@ -166,6 +203,7 @@
   return os;
 }
 
-}
+} // namespace nfd
+} // namespace ndn
 
-#endif
+#endif // NDN_MANAGEMENT_NFD_FIB_MANAGEMENT_OPTIONS_HPP
diff --git a/src/node.cpp b/src/node.cpp
index 513c40f..bd7ce67 100644
--- a/src/node.cpp
+++ b/src/node.cpp
@@ -14,28 +14,42 @@
 #include "util/time.hpp"
 #include "util/random.hpp"
 
+#include "management/ndnd-controller.hpp"
+#include "management/nfd-controller.hpp"
+
 namespace ndn {
 
-Node::Node(const shared_ptr<Transport>& transport)
-  : pitTimeoutCheckTimerActive_(false)
-  , transport_(transport)
-  , m_fwController(*this)
+Node::Node(const shared_ptr<Transport>& transport, bool nfdMode/* = false*/)
 {
-  ioService_ = make_shared<boost::asio::io_service>();      
-  pitTimeoutCheckTimer_      = make_shared<boost::asio::deadline_timer>(boost::ref(*ioService_));
-  processEventsTimeoutTimer_ = make_shared<boost::asio::deadline_timer>(boost::ref(*ioService_));
+  construct(transport, make_shared<boost::asio::io_service>(), nfdMode);
 }
 
-Node::Node(const shared_ptr<Transport>& transport, const shared_ptr<boost::asio::io_service> &ioService)
-  : ioService_(ioService)
-  , pitTimeoutCheckTimerActive_(false)
-  , transport_(transport)
-  , m_fwController(*this)
+Node::Node(const shared_ptr<Transport>& transport,
+           const shared_ptr<boost::asio::io_service> &ioService,
+           bool nfdMode/* = false*/)
 {
+  construct(transport, ioService, nfdMode);
+}
+
+void
+Node::construct(const shared_ptr<Transport>& transport,
+                const shared_ptr<boost::asio::io_service> &ioService,
+                bool nfdMode)
+{
+  pitTimeoutCheckTimerActive_ = false;
+  transport_ = transport;
+  ioService_ = ioService;
+
   pitTimeoutCheckTimer_      = make_shared<boost::asio::deadline_timer>(boost::ref(*ioService_));
   processEventsTimeoutTimer_ = make_shared<boost::asio::deadline_timer>(boost::ref(*ioService_));
+  
+  if (nfdMode)
+      m_fwController = make_shared<nfd::Controller>(boost::ref(*this));
+  else
+      m_fwController = make_shared<ndnd::Controller>(boost::ref(*this));
 }
 
+
 const PendingInterestId*
 Node::expressInterest(const Interest& interest, const OnData& onData, const OnTimeout& onTimeout)
 {
@@ -97,9 +111,9 @@
 {
   shared_ptr<RegisteredPrefix> prefixToRegister(new RegisteredPrefix(prefix, onInterest));
 
-  m_fwController.selfRegisterPrefix(prefixToRegister->getPrefix(),
-                                    bind(&RegisteredPrefixTable::push_back, &registeredPrefixTable_, prefixToRegister),
-                                    bind(onSetInterestFilterFailed, prefixToRegister->getPrefix().shared_from_this()));
+  m_fwController->selfRegisterPrefix(prefixToRegister->getPrefix(),
+                                     bind(&RegisteredPrefixTable::push_back, &registeredPrefixTable_, prefixToRegister),
+                                     bind(onSetInterestFilterFailed, prefixToRegister->getPrefix(), _1));
   
   return reinterpret_cast<const RegisteredPrefixId*>(prefixToRegister.get());
 }
@@ -117,9 +131,9 @@
                                                    MatchRegisteredPrefixId(registeredPrefixId));  
   if (i != registeredPrefixTable_.end())
     {
-      m_fwController.selfDeregisterPrefix((*i)->getPrefix(),
-                                          bind(&RegisteredPrefixTable::erase, &registeredPrefixTable_, i),
-                                          ndnd::Control::FailCallback());
+      m_fwController->selfDeregisterPrefix((*i)->getPrefix(),
+                                           bind(&RegisteredPrefixTable::erase, &registeredPrefixTable_, i),
+                                           Controller::FailCallback());
     }
 
   // there cannot be two registered prefixes with the same id. if there are, then something is broken
diff --git a/src/node.hpp b/src/node.hpp
index 726b4c1..7e1a7ca 100644
--- a/src/node.hpp
+++ b/src/node.hpp
@@ -13,7 +13,7 @@
 #include "data.hpp"
 #include "transport/transport.hpp"
 
-#include "management/ndnd-control.hpp"
+#include "management/controller.hpp"
 
 #include "detail/registered-prefix.hpp"
 #include "detail/pending-interest.hpp"
@@ -42,7 +42,7 @@
 /**
  * An OnRegisterFailed function object is used to report when registerPrefix fails.
  */
-typedef function<void(const shared_ptr<const Name>&)> OnSetInterestFilterFailed;
+typedef function<void(const Name&, const std::string&)> OnSetInterestFilterFailed;
 
 class Node {
 public:
@@ -53,7 +53,7 @@
    * @param transport A shared_ptr to a Transport object used for communication.
    * @param transport A shared_ptr to a Transport::ConnectionInfo to be used to connect to the transport.
    */
-  Node(const shared_ptr<Transport>& transport);
+  Node(const shared_ptr<Transport>& transport, bool nfdMode = false);
 
   /**
    * @brief Alternative (special use case) version of the constructor, can be used to aggregate
@@ -67,7 +67,7 @@
    *     face1.processEvents();
    * </code>
    */
-  Node(const shared_ptr<Transport>& transport, const shared_ptr<boost::asio::io_service> &ioService);
+  Node(const shared_ptr<Transport>& transport, const shared_ptr<boost::asio::io_service> &ioService, bool nfdMode = false);
   
   /**
    * @brief Send the Interest through the transport, read the entire response and call onData(interest, data).
@@ -150,6 +150,9 @@
   ioService() { return ioService_; }
 
 private:
+  void
+  construct(const shared_ptr<Transport>& transport, const shared_ptr<boost::asio::io_service> &ioService, bool nfdMode);
+  
   struct ProcessEventsTimeout {};
   typedef std::list<shared_ptr<PendingInterest> > PendingInterestTable;
   typedef std::list<shared_ptr<RegisteredPrefix> > RegisteredPrefixTable;
@@ -204,7 +207,7 @@
   PendingInterestTable pendingInterestTable_;
   RegisteredPrefixTable registeredPrefixTable_;
 
-  ndnd::Control m_fwController;
+  shared_ptr<Controller> m_fwController;
 };
 
 } // namespace ndn
diff --git a/tests/management/test-nfd-control.cpp b/tests/management/test-nfd-control.cpp
index 48295aa..1315627 100644
--- a/tests/management/test-nfd-control.cpp
+++ b/tests/management/test-nfd-control.cpp
@@ -4,8 +4,8 @@
  * See COPYING for copyright and distribution information.
  */
 
-#include "management/control-response.hpp"
-#include "management/fib-management-options.hpp"
+#include "management/nfd-control-response.hpp"
+#include "management/nfd-fib-management-options.hpp"
 
 #include <boost/test/unit_test.hpp>
 #include <boost/test/output_test_stream.hpp>
@@ -13,6 +13,7 @@
 using namespace std;
 
 namespace ndn {
+namespace nfd {
 
 BOOST_AUTO_TEST_SUITE(TestNfdControl)
 
@@ -28,7 +29,7 @@
 
 BOOST_AUTO_TEST_CASE (ControlResponseEncode)
 {
-  ndn::ControlResponse controlResponse(404, "Nothing not found");
+  ControlResponse controlResponse(404, "Nothing not found");
   const Block &wire = controlResponse.wireEncode();
 
   BOOST_REQUIRE_EQUAL_COLLECTIONS(TestControlResponse, TestControlResponse+sizeof(TestControlResponse),
@@ -37,7 +38,7 @@
 
 BOOST_AUTO_TEST_CASE (ControlResponseDecode)
 {
-  ndn::ControlResponse controlResponse;
+  ControlResponse controlResponse;
   
   BOOST_REQUIRE_NO_THROW(controlResponse.wireDecode(Block(TestControlResponse, sizeof(TestControlResponse))));
 
@@ -56,7 +57,7 @@
   opt.setFaceId (0);
   opt.setCost (0);
 
-  const ndn::Block& blk = opt.wireEncode ();
+  const Block& blk = opt.wireEncode ();
 
   BOOST_REQUIRE_EQUAL_COLLECTIONS (TestFibManagementOptions,
                                    TestFibManagementOptions + sizeof (TestFibManagementOptions),
@@ -105,4 +106,5 @@
 
 BOOST_AUTO_TEST_SUITE_END()
 
+} // namespace nfd
 } // namespace ndn
diff --git a/tools/ndnputchunks3.cpp b/tools/ndnputchunks3.cpp
index f6af9aa..d3a96f5 100644
--- a/tools/ndnputchunks3.cpp
+++ b/tools/ndnputchunks3.cpp
@@ -21,11 +21,6 @@
 #include "face.hpp"
 #include "security/key-chain.hpp"
 
-#if NDN_CPP_HAVE_CXX11
-// In the std library, the placeholders are in a different namespace than boost.
-using namespace ndn::func_lib::placeholders;
-#endif
-
 #define MAX_SEG_SIZE 4096
 
 class Producer
@@ -44,7 +39,7 @@
 
         if (got > 0)
           {
-            ndn::ptr_lib::shared_ptr<ndn::Data> data = ndn::ptr_lib::make_shared<ndn::Data> (ndn::Name(m_name).appendSegment (segnum));
+            ndn::shared_ptr<ndn::Data> data = ndn::make_shared<ndn::Data> (ndn::Name(m_name).appendSegment (segnum));
             data->setFreshnessPeriod (10000); // 10 sec
             data->setContent (reinterpret_cast<const uint8_t*>(buf), got);
             
@@ -60,7 +55,7 @@
   }
 
   void
-  onInterest (const ndn::ptr_lib::shared_ptr<const ndn::Name>& name, const ndn::ptr_lib::shared_ptr<const ndn::Interest>& interest)
+  onInterest (const ndn::shared_ptr<const ndn::Name>& name, const ndn::shared_ptr<const ndn::Interest>& interest)
   {
     if (m_verbose)
       std::cerr << "<< I: " << *interest << std::endl;
@@ -74,9 +69,9 @@
   }
 
   void
-  onRegisterFailed (const ndn::ptr_lib::shared_ptr<const ndn::Name>&)
+  onRegisterFailed (const ndn::Name& prefix, const std::string& reason)
   {
-    std::cerr << "ERROR: Failed to register prefix in local hub's daemon" << std::endl;
+    std::cerr << "ERROR: Failed to register prefix in local hub's daemon (" << reason << ")" << std::endl;
     m_face.shutdown ();
   }
   
@@ -90,8 +85,8 @@
       }
     
     m_face.setInterestFilter (m_name,
-                              ndn::func_lib::bind (&Producer::onInterest, this, _1, _2),
-                              ndn::func_lib::bind (&Producer::onRegisterFailed, this, _1));
+                              ndn::bind (&Producer::onInterest, this, _1, _2),
+                              ndn::bind (&Producer::onRegisterFailed, this, _1, _2));
     m_face.processEvents ();
   }
 
@@ -100,7 +95,7 @@
   ndn::Face m_face;
   ndn::KeyChain m_keychain;
   
-  std::vector< ndn::ptr_lib::shared_ptr<ndn::Data> > m_store;
+  std::vector< ndn::shared_ptr<ndn::Data> > m_store;
 
   bool m_verbose;
 };
