diff --git a/src/handles/delete-handle.cpp b/src/handles/delete-handle.cpp
index f39856f..d062399 100644
--- a/src/handles/delete-handle.cpp
+++ b/src/handles/delete-handle.cpp
@@ -36,28 +36,6 @@
                        bind(&DeleteHandle::onValidationFailed, this, _1, _2));
 }
 
-
-void
-DeleteHandle::onRegisterFailed(const Name& prefix, const std::string& reason)
-{
-  BOOST_THROW_EXCEPTION(Error("Delete prefix registration failed"));
-}
-
-
-void
-DeleteHandle::onCheckInterest(const Name& prefix, const Interest& interest)
-{
-  BOOST_ASSERT(false); // Deletion progress check, not implemented
-}
-
-
-void
-DeleteHandle::onCheckRegisterFailed(const Name& prefix, const std::string& reason)
-{
-  BOOST_THROW_EXCEPTION(Error("Delete check prefix registration failed"));
-}
-
-
 void
 DeleteHandle::onValidated(const shared_ptr<const Interest>& interest, const Name& prefix)
 {
@@ -102,11 +80,8 @@
 void
 DeleteHandle::listen(const Name& prefix)
 {
-  ndn::Name deleteprefix = Name(prefix).append("delete");
-  ndn::InterestFilter filter(deleteprefix);
-  getFace().setInterestFilter(filter,
-                              bind(&DeleteHandle::onInterest, this, _1, _2),
-                              bind(&DeleteHandle::onRegisterFailed, this, _1, _2));
+  getFace().setInterestFilter(Name(prefix).append("delete"),
+                              bind(&DeleteHandle::onInterest, this, _1, _2));
 }
 
 void
diff --git a/src/handles/delete-handle.hpp b/src/handles/delete-handle.hpp
index 0bb0e06..265d5ef 100644
--- a/src/handles/delete-handle.hpp
+++ b/src/handles/delete-handle.hpp
@@ -50,9 +50,6 @@
   onInterest(const Name& prefix, const Interest& interest);
 
   void
-  onRegisterFailed(const Name& prefix, const std::string& reason);
-
-  void
   onValidated(const std::shared_ptr<const Interest>& interest, const Name& prefix);
 
   void
@@ -65,9 +62,6 @@
   onCheckInterest(const Name& prefix, const Interest& interest);
 
   void
-  onCheckRegisterFailed(const Name& prefix, const std::string& reason);
-
-  void
   positiveReply(const Interest& interest, const RepoCommandParameter& parameter,
                 uint64_t statusCode, uint64_t nDeletedDatas);
 
diff --git a/src/handles/watch-handle.cpp b/src/handles/watch-handle.cpp
index 97aea8f..91eaac4 100644
--- a/src/handles/watch-handle.cpp
+++ b/src/handles/watch-handle.cpp
@@ -53,25 +53,6 @@
 }
 
 void
-WatchHandle::onRegistered(const Name& prefix)
-{
-  getFace().setInterestFilter(Name().append(prefix).append("start"),
-                              bind(&WatchHandle::onInterest, this, _1, _2));
-  getFace().setInterestFilter(Name().append(prefix).append("check"),
-                              bind(&WatchHandle::onCheckInterest, this, _1, _2));
-  getFace().setInterestFilter(Name().append(prefix).append("stop"),
-                              bind(&WatchHandle::onStopInterest, this, _1, _2));
-}
-
-// onRegisterFailed for watch start.
-void
-WatchHandle::onRegisterFailed(const Name& prefix, const std::string& reason)
-{
-  std::cerr << reason << std::endl;
-  BOOST_THROW_EXCEPTION(Error("watch prefix registration failed"));
-}
-
-void
 WatchHandle::onValidated(const shared_ptr<const Interest>& interest, const Name& prefix)
 {
   RepoCommandParameter parameter;
@@ -221,11 +202,12 @@
 void
 WatchHandle::listen(const Name& prefix)
 {
-  Name baseWatchPrefix(prefix);
-  baseWatchPrefix.append("watch");
-  getFace().registerPrefix(baseWatchPrefix,
-                           bind(&WatchHandle::onRegistered, this, _1),
-                           bind(&WatchHandle::onRegisterFailed, this, _1, _2));
+  getFace().setInterestFilter(Name(prefix).append("watch").append("start"),
+                              bind(&WatchHandle::onInterest, this, _1, _2));
+  getFace().setInterestFilter(Name(prefix).append("watch").append("check"),
+                              bind(&WatchHandle::onCheckInterest, this, _1, _2));
+  getFace().setInterestFilter(Name(prefix).append("watch").append("stop"),
+                              bind(&WatchHandle::onStopInterest, this, _1, _2));
 }
 
 void
diff --git a/src/handles/watch-handle.hpp b/src/handles/watch-handle.hpp
index a3e9e5f..5768e06 100644
--- a/src/handles/watch-handle.hpp
+++ b/src/handles/watch-handle.hpp
@@ -73,12 +73,6 @@
   void
   onValidationFailed(const std::shared_ptr<const Interest>& interest, const std::string& reason);
 
-  void
-  onRegistered(const Name& prefix);
-
-  void
-  onRegisterFailed(const Name& prefix, const std::string& reason);
-
 private: // data fetching
   /**
    * @brief fetch data and send next interest
diff --git a/src/handles/write-handle.cpp b/src/handles/write-handle.cpp
index 862616a..a398f0b 100644
--- a/src/handles/write-handle.cpp
+++ b/src/handles/write-handle.cpp
@@ -54,22 +54,6 @@
                        bind(&WriteHandle::onValidationFailed, this, _1, _2));
 }
 
-// onRegisterFailed.
-void
-WriteHandle::onRegisterFailed(const Name& prefix, const std::string& reason)
-{
-  std::cerr << reason << std::endl;
-  BOOST_THROW_EXCEPTION(Error("Insert prefix registration failed"));
-}
-
-// onRegisterFailed for insert.
-void
-WriteHandle::onCheckRegisterFailed(const Name& prefix, const std::string& reason)
-{
-  std::cerr << reason << std::endl;
-  BOOST_THROW_EXCEPTION(Error("Insert check prefix registration failed"));
-}
-
 void
 WriteHandle::onValidated(const std::shared_ptr<const Interest>& interest, const Name& prefix)
 {
@@ -201,18 +185,10 @@
 void
 WriteHandle::listen(const Name& prefix)
 {
-  Name insertPrefix;
-  insertPrefix.append(prefix).append("insert");
-  ndn::InterestFilter filter_insert(insertPrefix);
-  getFace().setInterestFilter(filter_insert,
-                              bind(&WriteHandle::onInterest, this, _1, _2),
-                              bind(&WriteHandle::onRegisterFailed, this, _1, _2));
-  Name insertCheckPrefix;
-  insertCheckPrefix.append(prefix).append("insert check");
-  ndn::InterestFilter filter_insertCheck(insertCheckPrefix);
-  getFace().setInterestFilter(filter_insertCheck,
-                              bind(&WriteHandle::onCheckInterest, this, _1, _2),
-                              bind(&WriteHandle::onRegisterFailed, this, _1, _2));
+  getFace().setInterestFilter(Name(prefix).append("insert"),
+                              bind(&WriteHandle::onInterest, this, _1, _2));
+  getFace().setInterestFilter(Name(prefix).append("insert check"),
+                              bind(&WriteHandle::onCheckInterest, this, _1, _2));
 }
 
 void
diff --git a/src/handles/write-handle.hpp b/src/handles/write-handle.hpp
index 1347470..1e7a007 100644
--- a/src/handles/write-handle.hpp
+++ b/src/handles/write-handle.hpp
@@ -112,12 +112,6 @@
   void
   onValidationFailed(const std::shared_ptr<const Interest>& interest, const std::string& reason);
 
-  /**
-   * @brief insert command prefix register failed
-   */
-  void
-  onRegisterFailed(const Name& prefix, const std::string& reason);
-
 private: // single data fetching
   /**
    * @brief fetch one data
@@ -199,12 +193,6 @@
   void
   onCheckInterest(const Name& prefix, const Interest& interest);
 
-  /**
-   * @brief insert check command prefix register failed
-   */
-  void
-  onCheckRegisterFailed(const Name& prefix, const std::string& reason);
-
   void
   onCheckValidated(const std::shared_ptr<const Interest>& interest, const Name& prefix);
 
diff --git a/src/repo.cpp b/src/repo.cpp
index ff2422d..e12698f 100644
--- a/src/repo.cpp
+++ b/src/repo.cpp
@@ -142,31 +142,26 @@
 void
 Repo::enableListening()
 {
-  // Enable "listening" on Data prefixes
-  for (auto it = m_config.dataPrefixes.begin();
-       it != m_config.dataPrefixes.end();
-       ++it)
-    {
-      m_readHandle.listen(*it);
-    }
+  for (const ndn::Name& dataPrefix : m_config.dataPrefixes) {
+    // ReadHandle performs prefix registration internally.
+    m_readHandle.listen(dataPrefix);
+  }
 
-  // Enable "listening" on control prefixes
-  for (auto it = m_config.repoPrefixes.begin();
-       it != m_config.repoPrefixes.end();
-       ++it)
-    {
-      m_writeHandle.listen(*it);
-      m_watchHandle.listen(*it);
-      m_deleteHandle.listen(*it);
-    }
+  for (const ndn::Name& cmdPrefix : m_config.repoPrefixes) {
+    m_face.registerPrefix(cmdPrefix, nullptr,
+      [] (const Name& cmdPrefix, const std::string& reason) {
+        std::cerr << "Command prefix " << cmdPrefix << " registration error: " << reason << std::endl;
+        BOOST_THROW_EXCEPTION(Error("Command prefix registration failed"));
+      });
 
-  // Enable listening on TCP bulk insert addresses
-  for (auto it = m_config.tcpBulkInsertEndpoints.begin();
-       it != m_config.tcpBulkInsertEndpoints.end();
-       ++it)
-    {
-      m_tcpBulkInsertHandle.listen(it->first, it->second);
-    }
+    m_writeHandle.listen(cmdPrefix);
+    m_watchHandle.listen(cmdPrefix);
+    m_deleteHandle.listen(cmdPrefix);
+  }
+
+  for (const auto& ep : m_config.tcpBulkInsertEndpoints) {
+    m_tcpBulkInsertHandle.listen(ep.first, ep.second);
+  }
 }
 
 void
diff --git a/tests/integrated/test-basic-command-insert-delete.cpp b/tests/integrated/test-basic-command-insert-delete.cpp
index 775a16d..28fea81 100644
--- a/tests/integrated/test-basic-command-insert-delete.cpp
+++ b/tests/integrated/test-basic-command-insert-delete.cpp
@@ -54,8 +54,13 @@
     , insertFace(repoFace.getIoService())
     , deleteFace(repoFace.getIoService())
   {
-    writeHandle.listen(Name("/repo/command"));
-    deleteHandle.listen(Name("/repo/command"));
+    Name cmdPrefix("/repo/command");
+    repoFace.registerPrefix(cmdPrefix, nullptr,
+      [] (const Name& cmdPrefix, const std::string& reason) {
+        BOOST_FAIL("Command prefix registration error: " << reason);
+      });
+    writeHandle.listen(cmdPrefix);
+    deleteHandle.listen(cmdPrefix);
   }
 
   void
@@ -163,13 +168,13 @@
 template<class T> void
 Fixture<T>::onInsertTimeout(const Interest& interest)
 {
-  BOOST_ERROR("Inserert command timeout");
+  BOOST_ERROR("Insert command timeout");
 }
 
 template<class T> void
 Fixture<T>::onDeleteTimeout(const Interest& interest)
 {
-  BOOST_ERROR("delete command timeout");
+  BOOST_ERROR("Delete command timeout");
 }
 
 template<class T> void
diff --git a/tests/integrated/test-basic-command-watch.cpp b/tests/integrated/test-basic-command-watch.cpp
index 8b8f327..a29deed 100644
--- a/tests/integrated/test-basic-command-watch.cpp
+++ b/tests/integrated/test-basic-command-watch.cpp
@@ -50,7 +50,12 @@
     : watchHandle(repoFace, *handle, keyChain, scheduler, validator)
     , watchFace(repoFace.getIoService())
   {
-    watchHandle.listen(Name("/repo/command"));
+    Name cmdPrefix("/repo/command");
+    repoFace.registerPrefix(cmdPrefix, nullptr,
+      [] (const Name& cmdPrefix, const std::string& reason) {
+        BOOST_FAIL("Command prefix registration error: " << reason);
+      });
+    watchHandle.listen(cmdPrefix);
   }
 
   void
