diff --git a/PSync/full-producer.cpp b/PSync/full-producer.cpp
index 968154a..4390a26 100644
--- a/PSync/full-producer.cpp
+++ b/PSync/full-producer.cpp
@@ -41,15 +41,14 @@
   : ProducerBase(expectedNumEntries, face, syncPrefix, userPrefix, syncReplyFreshness)
   , m_syncInterestLifetime(syncInterestLifetime)
   , m_onUpdate(onUpdateCallBack)
-  , m_scheduledSyncInterestId(m_scheduler)
 {
   int jitter = m_syncInterestLifetime.count() * .20;
   m_jitter = std::uniform_int_distribution<>(-jitter, jitter);
 
-  m_registerPrefixId =
-    m_face.setInterestFilter(ndn::InterestFilter(m_syncPrefix).allowLoopback(false),
-                             std::bind(&FullProducer::onSyncInterest, this, _1, _2),
-                             std::bind(&FullProducer::onRegisterFailed, this, _1, _2));
+  m_registeredPrefix = m_face.setInterestFilter(
+                         ndn::InterestFilter(m_syncPrefix).allowLoopback(false),
+                         std::bind(&FullProducer::onSyncInterest, this, _1, _2),
+                         std::bind(&FullProducer::onRegisterFailed, this, _1, _2));
 
   // Should we do this after setInterestFilter success call back
   // (Currently following ChronoSync's way)
@@ -61,8 +60,6 @@
   if (m_fetcher) {
     m_fetcher->stop();
   }
-
-  m_face.unsetInterestFilter(m_registerPrefixId);
 }
 
 void
@@ -209,16 +206,12 @@
     return;
   }
 
-  ndn::util::scheduler::ScopedEventId scopedEventId(m_scheduler);
-  auto it = m_pendingEntries.emplace(interestName,
-                                     PendingEntryInfoFull{iblt, std::move(scopedEventId)});
-
-  it.first->second.expirationEvent =
-    m_scheduler.scheduleEvent(interest.getInterestLifetime(),
-                              [this, interest] {
-                                NDN_LOG_TRACE("Erase Pending Interest " << interest.getNonce());
-                                m_pendingEntries.erase(interest.getName());
-                              });
+  auto& entry = m_pendingEntries.emplace(interestName, PendingEntryInfoFull{iblt, {}}).first->second;
+  entry.expirationEvent = m_scheduler.scheduleEvent(interest.getInterestLifetime(),
+                          [this, interest] {
+                            NDN_LOG_TRACE("Erase Pending Interest " << interest.getNonce());
+                            m_pendingEntries.erase(interest.getName());
+                          });
 }
 
 void
diff --git a/PSync/full-producer.hpp b/PSync/full-producer.hpp
index ec0ba4a..b5eb55f 100644
--- a/PSync/full-producer.hpp
+++ b/PSync/full-producer.hpp
@@ -28,11 +28,10 @@
 #include <random>
 
 #include <ndn-cxx/face.hpp>
-#include <ndn-cxx/util/scheduler.hpp>
-#include <ndn-cxx/util/scheduler-scoped-event-id.hpp>
-#include <ndn-cxx/util/time.hpp>
 #include <ndn-cxx/security/key-chain.hpp>
+#include <ndn-cxx/util/scheduler.hpp>
 #include <ndn-cxx/util/segment-fetcher.hpp>
+#include <ndn-cxx/util/time.hpp>
 
 namespace psync {
 
@@ -171,7 +170,6 @@
 
   /**
    * @brief Delete pending sync interests that match given name
-   *
    */
   void
   deletePendingInterests(const ndn::Name& interestName);
@@ -186,20 +184,13 @@
   isFutureHash(const ndn::Name& prefix, const std::set<uint32_t>& negative);
 
 private:
-  std::map <ndn::Name, PendingEntryInfoFull> m_pendingEntries;
-
+  std::map<ndn::Name, PendingEntryInfoFull> m_pendingEntries;
   ndn::time::milliseconds m_syncInterestLifetime;
-
   UpdateCallback m_onUpdate;
-
   ndn::util::scheduler::ScopedEventId m_scheduledSyncInterestId;
-
   std::uniform_int_distribution<> m_jitter;
-
   ndn::Name m_outstandingInterestName;
-
-  const ndn::RegisteredPrefixId* m_registerPrefixId;
-
+  ndn::ScopedRegisteredPrefixHandle m_registeredPrefix;
   std::shared_ptr<ndn::util::SegmentFetcher> m_fetcher;
 };
 
diff --git a/PSync/partial-producer.cpp b/PSync/partial-producer.cpp
index ed54175..87f648d 100644
--- a/PSync/partial-producer.cpp
+++ b/PSync/partial-producer.cpp
@@ -38,21 +38,14 @@
  : ProducerBase(expectedNumEntries, face, syncPrefix,
                 userPrefix, syncReplyFreshness, helloReplyFreshness)
 {
-  m_registerPrefixId =
-    m_face.registerPrefix(m_syncPrefix,
-      [this] (const ndn::Name& syncPrefix) {
-        m_face.setInterestFilter(ndn::Name(m_syncPrefix).append("hello"),
-                                 std::bind(&PartialProducer::onHelloInterest, this, _1, _2));
-
-        m_face.setInterestFilter(ndn::Name(m_syncPrefix).append("sync"),
-                                 std::bind(&PartialProducer::onSyncInterest, this, _1, _2));
-      },
-      std::bind(&PartialProducer::onRegisterFailed, this, _1, _2));
-}
-
-PartialProducer::~PartialProducer()
-{
-  m_face.unregisterPrefix(m_registerPrefixId, nullptr, nullptr);
+  m_registeredPrefix = m_face.registerPrefix(m_syncPrefix,
+    [this] (const ndn::Name& syncPrefix) {
+      m_face.setInterestFilter(ndn::Name(m_syncPrefix).append("hello"),
+                               std::bind(&PartialProducer::onHelloInterest, this, _1, _2));
+      m_face.setInterestFilter(ndn::Name(m_syncPrefix).append("sync"),
+                               std::bind(&PartialProducer::onSyncInterest, this, _1, _2));
+    },
+    std::bind(&PartialProducer::onRegisterFailed, this, _1, _2));
 }
 
 void
@@ -199,16 +192,12 @@
     return;
   }
 
-  ndn::util::scheduler::ScopedEventId scopedEventId(m_scheduler);
-  auto it = m_pendingEntries.emplace(interestName,
-                                     PendingEntryInfo{bf, iblt, std::move(scopedEventId)});
-
-  it.first->second.expirationEvent =
-    m_scheduler.scheduleEvent(interest.getInterestLifetime(),
-                              [this, interest] {
-                                NDN_LOG_TRACE("Erase Pending Interest " << interest.getNonce());
-                                m_pendingEntries.erase(interest.getName());
-                              });
+  auto& entry = m_pendingEntries.emplace(interestName, PendingEntryInfo{bf, iblt, {}}).first->second;
+  entry.expirationEvent = m_scheduler.scheduleEvent(interest.getInterestLifetime(),
+                          [this, interest] {
+                            NDN_LOG_TRACE("Erase Pending Interest " << interest.getNonce());
+                            m_pendingEntries.erase(interest.getName());
+                          });
 }
 
 void
diff --git a/PSync/partial-producer.hpp b/PSync/partial-producer.hpp
index cec1079..94f5672 100644
--- a/PSync/partial-producer.hpp
+++ b/PSync/partial-producer.hpp
@@ -27,10 +27,9 @@
 #include <unordered_set>
 
 #include <ndn-cxx/face.hpp>
-#include <ndn-cxx/util/scheduler.hpp>
-#include <ndn-cxx/util/scheduler-scoped-event-id.hpp>
-#include <ndn-cxx/util/time.hpp>
 #include <ndn-cxx/security/key-chain.hpp>
+#include <ndn-cxx/util/scheduler.hpp>
+#include <ndn-cxx/util/time.hpp>
 
 namespace psync {
 
@@ -72,8 +71,6 @@
                   ndn::time::milliseconds helloReplyFreshness = HELLO_REPLY_FRESHNESS,
                   ndn::time::milliseconds syncReplyFreshness = SYNC_REPLY_FRESHNESS);
 
-  ~PartialProducer();
-
   /**
    * @brief Publish name to let subscribed consumers know
    *
@@ -122,9 +119,8 @@
   onSyncInterest(const ndn::Name& prefix, const ndn::Interest& interest);
 
 PUBLIC_WITH_TESTS_ELSE_PRIVATE:
-  std::map <ndn::Name, PendingEntryInfo> m_pendingEntries;
-
-  const ndn::RegisteredPrefixId* m_registerPrefixId;
+  std::map<ndn::Name, PendingEntryInfo> m_pendingEntries;
+  ndn::ScopedRegisteredPrefixHandle m_registeredPrefix;
 };
 
 } // namespace psync
diff --git a/PSync/segment-publisher.hpp b/PSync/segment-publisher.hpp
index f28e31d..f00acff 100644
--- a/PSync/segment-publisher.hpp
+++ b/PSync/segment-publisher.hpp
@@ -24,11 +24,10 @@
 
 #include <ndn-cxx/face.hpp>
 #include <ndn-cxx/name.hpp>
+#include <ndn-cxx/ims/in-memory-storage-fifo.hpp>
 #include <ndn-cxx/security/key-chain.hpp>
-#include <ndn-cxx/util/scheduler-scoped-event-id.hpp>
 #include <ndn-cxx/util/scheduler.hpp>
 #include <ndn-cxx/util/time.hpp>
-#include <ndn-cxx/ims/in-memory-storage-fifo.hpp>
 
 namespace psync {
 
