diff --git a/src/management/controller.hpp b/src/management/controller.hpp
index f919489..f38e64a 100644
--- a/src/management/controller.hpp
+++ b/src/management/controller.hpp
@@ -14,7 +14,8 @@
 
 namespace ndn {
 
-class Node;
+class Name;
+class Face;
 
 class Controller
 {
diff --git a/src/management/ndnd-controller.cpp b/src/management/ndnd-controller.cpp
index e95d85e..302699e 100644
--- a/src/management/ndnd-controller.cpp
+++ b/src/management/ndnd-controller.cpp
@@ -7,7 +7,7 @@
 #include "common.hpp"
 #include "ndnd-controller.hpp"
 
-#include "../node.hpp"
+#include "../face.hpp"
 #include "../security/signature-sha256-with-rsa.hpp"
 #include "../util/random.hpp"
 
@@ -18,7 +18,7 @@
 namespace ndn {
 namespace ndnd {
 
-Controller::Controller(Node& face)
+Controller::Controller(Face& face)
   : m_face(face)
   , m_faceId(-1)
 {
@@ -64,12 +64,11 @@
 
 
 void 
-Controller::onNdnidFetched(const shared_ptr<const Interest>& interest,
-                           const shared_ptr<Data>& data)
+Controller::onNdnidFetched(const Interest& interest, Data& data)
 {
-  if (data->getName().size() > interest->getName().size())
+  if (data.getName().size() > interest.getName().size())
     {
-      m_ndndId = data->getName()[interest->getName().size()];
+      m_ndndId = data.getName()[interest.getName().size()];
 
       for (FilterRequestList::iterator i = m_filterRequests.begin();
            i != m_filterRequests.end();
@@ -169,11 +168,11 @@
 }
 
 void
-Controller::processFaceActionResponse(const shared_ptr<Data>& data,
+Controller::processFaceActionResponse(Data& data,
                                       const FaceOperationSucceedCallback& onSuccess,
                                       const FailCallback& onFail)
 {
-  Block content = data->getContent();
+  Block content = data.getContent();
   content.parse();
 
   if (content.getAll().empty())
@@ -215,11 +214,11 @@
 }
 
 void
-Controller::processPrefixActionResponse(const shared_ptr<Data>& data,
+Controller::processPrefixActionResponse(Data& data,
                                         const PrefixOperationSucceedCallback& onSuccess,
                                         const FailCallback& onFail)
 {
-  Block content = data->getContent();
+  Block content = data.getContent();
   content.parse();
 
   if (content.getAll().empty())
diff --git a/src/management/ndnd-controller.hpp b/src/management/ndnd-controller.hpp
index 319f995..a689d28 100644
--- a/src/management/ndnd-controller.hpp
+++ b/src/management/ndnd-controller.hpp
@@ -7,17 +7,9 @@
 #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 {
-
-class Node;
-
 namespace ndnd {
 
 class FaceInstance;
@@ -37,7 +29,7 @@
   /**
    * @brief Construct ndnd::Control object
    */
-  Controller(Node& face);
+  Controller(Face& face);
 
   virtual void
   selfRegisterPrefix(const Name& prefixToRegister,
@@ -62,26 +54,24 @@
 
 private:
   void 
-  onNdnidFetched(const shared_ptr<const Interest>& interest,
-                 const shared_ptr<Data>& data);
-
+  onNdnidFetched(const Interest& interest, Data& data);
 
   void
   recordSelfRegisteredFaceId(const ForwardingEntry& entry,
                              const SuccessCallback& onSuccess);
 
   void
-  processFaceActionResponse(const shared_ptr<Data>& data,
+  processFaceActionResponse(Data& data,
                             const FaceOperationSucceedCallback& onSuccess,
                             const FailCallback&    onFail);
 
   void
-  processPrefixActionResponse(const shared_ptr<Data>& data,
+  processPrefixActionResponse(Data& data,
                               const PrefixOperationSucceedCallback& onSuccess,
                               const FailCallback&    onFail);
 
 private:
-  Node& m_face;
+  Face& m_face;
   Block m_ndndId;
   int64_t m_faceId; // internal face ID (needed for prefix de-registration)
 
diff --git a/src/management/nfd-controller.cpp b/src/management/nfd-controller.cpp
index c72c5d3..b75f0e0 100644
--- a/src/management/nfd-controller.cpp
+++ b/src/management/nfd-controller.cpp
@@ -5,7 +5,7 @@
  */
 
 #include "common.hpp"
-#include "../node.hpp"
+#include "../face.hpp"
 
 #include "nfd-controller.hpp"
 #include "nfd-fib-management-options.hpp"
@@ -14,7 +14,7 @@
 namespace ndn {
 namespace nfd {
 
-Controller::Controller(Node& face)
+Controller::Controller(Face& face)
   : m_face(face)
   , m_faceId(0)
 {
@@ -82,18 +82,18 @@
 }
 
 // void
-// processFaceActionResponse(const shared_ptr<Data>& data,
+// processFaceActionResponse(Data& data,
 //                           const FaceOperationSucceedCallback& onSuccess,
 //                           const FailCallback&    onFail);
 
 void
-Controller::processFibCommandResponse(const shared_ptr<Data>& data,
+Controller::processFibCommandResponse(Data& data,
                                       const FibCommandSucceedCallback& onSuccess,
                                       const FailCallback& onFail)
 {
   try
     {
-      ControlResponse response(data->getContent().blockFromValue());
+      ControlResponse response(data.getContent().blockFromValue());
 
       if (response.getCode() != 200)
         return onFail(response.getText());
diff --git a/src/management/nfd-controller.hpp b/src/management/nfd-controller.hpp
index d5400c6..aa788a9 100644
--- a/src/management/nfd-controller.hpp
+++ b/src/management/nfd-controller.hpp
@@ -7,18 +7,12 @@
 #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;
@@ -31,7 +25,7 @@
   /**
    * @brief Construct ndnd::Control object
    */
-  Controller(Node& face);
+  Controller(Face& face);
 
   virtual void
   selfRegisterPrefix(const Name& prefixToRegister,
@@ -54,17 +48,17 @@
                              const SuccessCallback& onSuccess);
 
   // void
-  // processFaceActionResponse(const shared_ptr<Data>& data,
+  // processFaceActionResponse(Data& data,
   //                           const FaceOperationSucceedCallback& onSuccess,
   //                           const FailCallback&    onFail);
 
   void
-  processFibCommandResponse(const shared_ptr<Data>& data,
+  processFibCommandResponse(Data& data,
                             const FibCommandSucceedCallback& onSuccess,
                             const FailCallback& onFail);
   
 private:
-  Node& m_face;
+  Face& m_face;
   KeyChain m_keyChain;
   uint64_t m_faceId; // internal face ID (needed for prefix de-registration)
 };
