diff --git a/examples/producer.cpp b/examples/producer.cpp
index d6ca248..acb214c 100644
--- a/examples/producer.cpp
+++ b/examples/producer.cpp
@@ -70,6 +70,7 @@
   {
     m_face.setInterestFilter("/localhost/testApp",
                              bind(&Producer::onInterest, this, _1, _2),
+                             RegisterPrefixSuccessCallback(),
                              bind(&Producer::onRegisterFailed, this, _1, _2));
     m_face.processEvents();
   }
diff --git a/src/detail/face-impl.hpp b/src/detail/face-impl.hpp
index 52f9dd3..7913831 100644
--- a/src/detail/face-impl.hpp
+++ b/src/detail/face-impl.hpp
@@ -251,7 +251,10 @@
           m_processEventsTimeoutTimer->cancel();
         }
       }
-    onSuccess();
+
+    if (static_cast<bool>(onSuccess)) {
+      onSuccess();
+    }
   }
 
   /////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/encoding/block.hpp b/src/encoding/block.hpp
index d1a762f..c7e7b18 100644
--- a/src/encoding/block.hpp
+++ b/src/encoding/block.hpp
@@ -124,15 +124,15 @@
    * @deprecated Use Block::fromStream instead
    */
   explicit
-  Block(std::istream& is)
+  DEPRECATED(Block(std::istream& is))
   {
     *this = Block::fromStream(is);
   }
 
   /*
-   * @brief A helper version of a constructor to create Block from the stream.
+   * @brief Constructor Block from the stream
    */
-  Block
+  static Block
   fromStream(std::istream& is);
 
   /**
diff --git a/src/exclude.cpp b/src/exclude.cpp
index 5dd6c5d..d2eed70 100644
--- a/src/exclude.cpp
+++ b/src/exclude.cpp
@@ -91,10 +91,8 @@
 Exclude::excludeRange(const name::Component& from, const name::Component& to)
 {
   if (from >= to) {
-    throw Error("Invalid exclude range [" +
-                from.toEscapedString() + ", " +
-                to.toEscapedString() +
-                "] (for single name exclude use Exclude::excludeOne)");
+    throw Error("Invalid exclude range [" + from.toUri() + ", " + to.toUri() + "] "
+                "(for single name exclude use Exclude::excludeOne)");
   }
 
   iterator newFrom = m_exclude.lower_bound(from);
@@ -154,7 +152,7 @@
   for (Exclude::const_reverse_iterator i = exclude.rbegin(); i != exclude.rend(); i++) {
     if (!i->first.empty()) {
       if (!empty) os << ",";
-      os << i->first.toEscapedString();
+      os << i->first.toUri();
       empty = false;
     }
     if (i->second) {
diff --git a/src/face.cpp b/src/face.cpp
index c2231c6..3fa693a 100644
--- a/src/face.cpp
+++ b/src/face.cpp
@@ -151,14 +151,9 @@
                       const Interest& tmpl,
                       const OnData& onData, const OnTimeout& onTimeout/* = OnTimeout()*/)
 {
-  return expressInterest(Interest(name,
-                                  tmpl.getMinSuffixComponents(),
-                                  tmpl.getMaxSuffixComponents(),
-                                  tmpl.getExclude(),
-                                  tmpl.getChildSelector(),
-                                  tmpl.getMustBeFresh(),
-                                  tmpl.getScope(),
-                                  tmpl.getInterestLifetime()),
+  return expressInterest(Interest(tmpl)
+                           .setName(name)
+                           .setNonce(0),
                          onData, onTimeout);
 }
 
diff --git a/src/face.hpp b/src/face.hpp
index 139ff28..ab7bb7e 100644
--- a/src/face.hpp
+++ b/src/face.hpp
@@ -112,8 +112,9 @@
    * @throws ConfigFile::Error on configuration file parse failure
    * @throws Face::Error on unsupported protocol
    */
+  DEPRECATED(
   explicit
-  Face(const shared_ptr<boost::asio::io_service>& ioService);
+  Face(const shared_ptr<boost::asio::io_service>& ioService));
 
   /**
    * @brief Create a new Face using the default transport (UnixTransport)
@@ -241,11 +242,12 @@
   /**
    * @deprecated Use the other overload
    */
+  DEPRECATED(
   const RegisteredPrefixId*
   setInterestFilter(const InterestFilter& interestFilter,
                     const OnInterest& onInterest,
                     const RegisterPrefixFailureCallback& onFailure,
-                    const IdentityCertificate& certificate = IdentityCertificate());
+                    const IdentityCertificate& certificate = IdentityCertificate()));
 
   /**
    * @brief Set InterestFilter to dispatch incoming matching interest to onInterest
@@ -276,11 +278,12 @@
   /**
    * @deprecated Use the other overload
    */
+  DEPRECATED(
   const RegisteredPrefixId*
   setInterestFilter(const InterestFilter& interestFilter,
                     const OnInterest& onInterest,
                     const RegisterPrefixFailureCallback& onFailure,
-                    const Name& identity);
+                    const Name& identity));
 
   /**
    * @brief Set InterestFilter to dispatch incoming matching interest to onInterest callback
@@ -445,8 +448,9 @@
    *
    * @deprecated Use getIoService instead
    */
+  DEPRECATED(
   shared_ptr<boost::asio::io_service>
-  ioService()
+  ioService())
   {
     return m_ioService;
   }
diff --git a/src/interest.hpp b/src/interest.hpp
index c433ae8..ea23392 100644
--- a/src/interest.hpp
+++ b/src/interest.hpp
@@ -128,6 +128,7 @@
    *
    * Otherwise, Interest::shared_from_this() will throw an exception.
    */
+  DEPRECATED(
   Interest(const Name& name,
            int minSuffixComponents, int maxSuffixComponents,
            const Exclude& exclude,
@@ -135,9 +136,14 @@
            bool mustBeFresh,
            int scope,
            const time::milliseconds& interestLifetime,
-           uint32_t nonce = 0)
+           uint32_t nonce = 0))
     : m_name(name)
-    , m_selectors(minSuffixComponents, maxSuffixComponents, exclude, childSelector, mustBeFresh)
+    , m_selectors(Selectors()
+                    .setMinSuffixComponents(minSuffixComponents)
+                    .setMaxSuffixComponents(maxSuffixComponents)
+                    .setExclude(exclude)
+                    .setChildSelector(childSelector)
+                    .setMustBeFresh(mustBeFresh))
     , m_nonce(nonce)
     , m_scope(scope)
     , m_interestLifetime(interestLifetime)
diff --git a/src/name-component.hpp b/src/name-component.hpp
index d58e4d6..751c490 100644
--- a/src/name-component.hpp
+++ b/src/name-component.hpp
@@ -194,8 +194,12 @@
    *
    * @param os The output stream to where write the URI escaped version *this
    */
+  DEPRECATED(
   void
-  toEscapedString(std::ostream& os) const;
+  toEscapedString(std::ostream& os) const)
+  {
+    return toUri(os);
+  }
 
   /**
    * @brief Convert *this by escaping characters according to the NDN URI Scheme
@@ -206,12 +210,11 @@
    *
    * @return The escaped string
    */
+  DEPRECATED(
   std::string
-  toEscapedString() const
+  toEscapedString() const)
   {
-    std::ostringstream result;
-    toEscapedString(result);
-    return result.str();
+    return toUri();
   }
 
   /**
@@ -222,10 +225,7 @@
    * @param os The output stream to where write the URI escaped version *this
    */
   void
-  toUri(std::ostream& os) const
-  {
-    return toEscapedString(os);
-  }
+  toUri(std::ostream& os) const;
 
   /**
    * @brief Convert *this by escaping characters according to the NDN URI Scheme
@@ -237,7 +237,9 @@
   std::string
   toUri() const
   {
-    return toEscapedString();
+    std::ostringstream os;
+    toUri(os);
+    return os.str();
   }
 
   /**
@@ -390,7 +392,7 @@
 inline std::ostream&
 operator<<(std::ostream& os, const Component& component)
 {
-  component.toEscapedString(os);
+  component.toUri(os);
   return os;
 }
 
@@ -468,7 +470,7 @@
 
 
 inline void
-Component::toEscapedString(std::ostream& result) const
+Component::toUri(std::ostream& result) const
 {
   const uint8_t* valuePtr = value();
   size_t valueSize = value_size();
diff --git a/src/name.hpp b/src/name.hpp
index 11a438d..8c348ac 100644
--- a/src/name.hpp
+++ b/src/name.hpp
@@ -534,7 +534,7 @@
     {
       for (Name::const_iterator i = name.begin(); i != name.end(); i++) {
         os << "/";
-        i->toEscapedString(os);
+        i->toUri(os);
       }
     }
   return os;
diff --git a/src/security/identity-certificate.cpp b/src/security/identity-certificate.cpp
index 33e1e71..b3c544a 100644
--- a/src/security/identity-certificate.cpp
+++ b/src/security/identity-certificate.cpp
@@ -26,7 +26,7 @@
   string idString("ID-CERT");
   int i = name.size() - 1;
   for (; i >= 0; i--) {
-    if (name.get(i).toEscapedString() == idString)
+    if (name.get(i).toUri() == idString)
       break;
   }
 
@@ -36,7 +36,7 @@
   string keyString("KEY");
   size_t keyIndex = 0;
   for (; keyIndex < name.size(); keyIndex++) {
-    if (name.get(keyIndex).toEscapedString() == keyString)
+    if (name.get(keyIndex).toUri() == keyString)
       break;
   }
 
@@ -68,7 +68,7 @@
   bool foundIdString = false;
   size_t idCertComponentIndex = certificateName.size() - 1;
   for (; idCertComponentIndex + 1 > 0; --idCertComponentIndex) {
-    if (certificateName.get(idCertComponentIndex).toEscapedString() == idString)
+    if (certificateName.get(idCertComponentIndex).toUri() == idString)
       {
         foundIdString = true;
         break;
@@ -83,7 +83,7 @@
   bool foundKeyString = false;
   size_t keyComponentIndex = 0;
   for (; keyComponentIndex < tmpName.size(); keyComponentIndex++) {
-    if (tmpName.get(keyComponentIndex).toEscapedString() == keyString)
+    if (tmpName.get(keyComponentIndex).toUri() == keyString)
       {
         foundKeyString = true;
         break;
diff --git a/src/security/key-chain.cpp b/src/security/key-chain.cpp
index 67cdda6..18051c1 100644
--- a/src/security/key-chain.cpp
+++ b/src/security/key-chain.cpp
@@ -116,7 +116,7 @@
   if (keyName.size() < 1)
     return shared_ptr<IdentityCertificate>();
 
-  std::string keyIdPrefix = keyName.get(-1).toEscapedString().substr(0, 4);
+  std::string keyIdPrefix = keyName.get(-1).toUri().substr(0, 4);
   if (keyIdPrefix != "ksk-" && keyIdPrefix != "dsk-")
     return shared_ptr<IdentityCertificate>();
 
diff --git a/src/security/sec-public-info-sqlite3.cpp b/src/security/sec-public-info-sqlite3.cpp
index 7f248d5..86256f8 100644
--- a/src/security/sec-public-info-sqlite3.cpp
+++ b/src/security/sec-public-info-sqlite3.cpp
@@ -233,7 +233,7 @@
   if (keyName.empty())
     throw Error("Incorrect key name " + keyName.toUri());
 
-  string keyId = keyName.get(-1).toEscapedString();
+  string keyId = keyName.get(-1).toUri();
   Name identityName = keyName.getPrefix(-1);
 
   sqlite3_stmt* statement;
@@ -269,7 +269,7 @@
   if (doesPublicKeyExist(keyName))
     return;
 
-  string keyId = keyName.get(-1).toEscapedString();
+  string keyId = keyName.get(-1).toUri();
   Name identityName = keyName.getPrefix(-1);
 
   addIdentity(identityName);
@@ -302,7 +302,7 @@
       throw Error("SecPublicInfoSqlite3::getPublicKey  Empty keyName");
     }
 
-  string keyId = keyName.get(-1).toEscapedString();
+  string keyId = keyName.get(-1).toUri();
   Name identityName = keyName.getPrefix(-1);
 
   sqlite3_stmt* statement;
@@ -364,7 +364,7 @@
 //   if (keyName.empty())
 //     return;
 
-//   std::string keyId = keyName.get(-1).toEscapedString();
+//   std::string keyId = keyName.get(-1).toUri();
 //   std::string identityName = keyName.getPrefix(-1).toUri();
 
 //   sqlite3_stmt* statement;
@@ -421,7 +421,7 @@
   if (doesCertificateExist(certificateName))
     return;
 
-  string keyId = keyName.get(-1).toEscapedString();
+  string keyId = keyName.get(-1).toUri();
   Name identity = keyName.getPrefix(-1);
 
   // Insert the certificate
@@ -585,7 +585,7 @@
   if (!doesPublicKeyExist(keyName))
     throw Error("Key does not exist:" + keyName.toUri());
 
-  string keyId = keyName.get(-1).toEscapedString();
+  string keyId = keyName.get(-1).toUri();
   Name identityName = keyName.getPrefix(-1);
 
   sqlite3_stmt* statement;
@@ -622,7 +622,7 @@
   if (keyName.empty())
     throw Error("SecPublicInfoSqlite3::getDefaultCertificateNameForKey wrong key");
 
-  string keyId = keyName.get(-1).toEscapedString();
+  string keyId = keyName.get(-1).toUri();
   Name identityName = keyName.getPrefix(-1);
 
   sqlite3_stmt* statement;
@@ -657,7 +657,7 @@
     throw Error("certificate does not exist:" + certificateName.toUri());
 
   Name keyName = IdentityCertificate::certificateNameToPublicKeyName(certificateName);
-  string keyId = keyName.get(-1).toEscapedString();
+  string keyId = keyName.get(-1).toUri();
   Name identityName = keyName.getPrefix(-1);
 
   sqlite3_stmt* statement;
@@ -812,7 +812,7 @@
   Name identity = keyName.getPrefix(-1);
   sqlite3_bind_text(stmt, 1, identity.toUri().c_str(), identity.toUri().size (), SQLITE_TRANSIENT);
 
-  std::string baseKeyName = keyName.get(-1).toEscapedString();
+  std::string baseKeyName = keyName.get(-1).toUri();
   sqlite3_bind_text(stmt, 2, baseKeyName.c_str(), baseKeyName.size(), SQLITE_TRANSIENT);
 
   while (sqlite3_step(stmt) == SQLITE_ROW)
@@ -842,7 +842,7 @@
     return;
 
   string identity = keyName.getPrefix(-1).toUri();
-  string keyId = keyName.get(-1).toEscapedString();
+  string keyId = keyName.get(-1).toUri();
 
   sqlite3_stmt* stmt;
   sqlite3_prepare_v2(m_database,
diff --git a/src/selectors.hpp b/src/selectors.hpp
index 4503c17..4e90ee7 100644
--- a/src/selectors.hpp
+++ b/src/selectors.hpp
@@ -36,10 +36,11 @@
 
   /** @deprecated Selectors().setX(...).setY(...)
    */
+  DEPRECATED(
   Selectors(int minSuffixComponents, int maxSuffixComponents,
             const Exclude& exclude,
             int childSelector,
-            bool mustBeFresh)
+            bool mustBeFresh))
     : m_minSuffixComponents(minSuffixComponents)
     , m_maxSuffixComponents(maxSuffixComponents)
     , m_exclude(exclude)
diff --git a/src/util/regex/regex-component-matcher.hpp b/src/util/regex/regex-component-matcher.hpp
index de0b6c9..fcc0ccc 100644
--- a/src/util/regex/regex-component-matcher.hpp
+++ b/src/util/regex/regex-component-matcher.hpp
@@ -99,7 +99,7 @@
   if (m_isExactMatch)
     {
       boost::smatch subResult;
-      std::string targetStr = name.get(offset).toEscapedString();
+      std::string targetStr = name.get(offset).toUri();
       if (boost::regex_match(targetStr, subResult, m_componentRegex))
         {
           for (size_t i = 1; i < m_componentRegex.mark_count(); i++)
diff --git a/src/util/regex/regex-top-matcher.cpp b/src/util/regex/regex-top-matcher.cpp
index 3c95959..43cd169 100644
--- a/src/util/regex/regex-top-matcher.cpp
+++ b/src/util/regex/regex-top-matcher.cpp
@@ -196,7 +196,7 @@
   for (Name::const_iterator it = name.begin(); it != name.end(); it++)
     {
       regexStr.append("<");
-      regexStr.append(convertSpecialChar(it->toEscapedString()));
+      regexStr.append(convertSpecialChar(it->toUri()));
       regexStr.append(">");
     }
 
diff --git a/tests-integrated/security/test-validator-config.cpp b/tests-integrated/security/test-validator-config.cpp
index def5ae3..df1dd77 100644
--- a/tests-integrated/security/test-validator-config.cpp
+++ b/tests-integrated/security/test-validator-config.cpp
@@ -542,7 +542,7 @@
   void
   terminate(shared_ptr<Face> face)
   {
-    face->ioService()->stop();
+    face->getIoService().stop();
   }
 
   const RegisteredPrefixId* regPrefixId;
@@ -584,18 +584,20 @@
   keyChain.addCertificateAsIdentityDefault(*nldCert);
 
   shared_ptr<Face> face = make_shared<Face>();
-  Face face2(face->ioService());
-  Scheduler scheduler(*face->ioService());
+  Face face2(face->getIoService());
+  Scheduler scheduler(face->getIoService());
 
   scheduler.scheduleEvent(time::seconds(1),
                           bind(&FacesFixture::terminate, this, face));
 
   regPrefixId = face->setInterestFilter(sldCert->getName().getPrefix(-1),
-                                       bind(&FacesFixture::onInterest, this, face, sldCert),
-                                       bind(&FacesFixture::onRegFailed, this));
+                                        bind(&FacesFixture::onInterest, this, face, sldCert),
+                                        RegisterPrefixSuccessCallback(),
+                                        bind(&FacesFixture::onRegFailed, this));
 
   regPrefixId2 = face->setInterestFilter(nldCert->getName().getPrefix(-1),
                                          bind(&FacesFixture::onInterest2, this, face, nldCert),
+                                         RegisterPrefixSuccessCallback(),
                                          bind(&FacesFixture::onRegFailed, this));
 
   Name dataName1 = nld;
@@ -789,18 +791,20 @@
   keyChain.addCertificateAsIdentityDefault(*nldCert);
 
   shared_ptr<Face> face = make_shared<Face>();
-  Face face2(face->ioService());
-  Scheduler scheduler(*face->ioService());
+  Face face2(face->getIoService());
+  Scheduler scheduler(face->getIoService());
 
   scheduler.scheduleEvent(time::seconds(1),
                           bind(&FacesFixture::terminate, this, face));
 
   regPrefixId = face->setInterestFilter(sldCert->getName().getPrefix(-1),
-                                       bind(&FacesFixture::onInterest, this, face, sldCert),
-                                       bind(&FacesFixture::onRegFailed, this));
+                                        bind(&FacesFixture::onInterest, this, face, sldCert),
+                                        RegisterPrefixSuccessCallback(),
+                                        bind(&FacesFixture::onRegFailed, this));
 
   regPrefixId2 = face->setInterestFilter(nldCert->getName().getPrefix(-1),
                                          bind(&FacesFixture::onInterest2, this, face, nldCert),
+                                         RegisterPrefixSuccessCallback(),
                                          bind(&FacesFixture::onRegFailed, this));
 
   Name interestName1("/localhost/nrd/register/option/timestamp/nonce");
diff --git a/tests-integrated/test-faces.cpp b/tests-integrated/test-faces.cpp
index 1c2ef29..e99f0fc 100644
--- a/tests-integrated/test-faces.cpp
+++ b/tests-integrated/test-faces.cpp
@@ -161,13 +161,14 @@
 BOOST_AUTO_TEST_CASE(SetFilter)
 {
   Face face;
-  Face face2(face.ioService());
-  Scheduler scheduler(*face.ioService());
+  Face face2(face.getIoService());
+  Scheduler scheduler(face.getIoService());
   scheduler.scheduleEvent(time::milliseconds(300),
                           bind(&FacesFixture::terminate, this, ref(face)));
 
   regPrefixId = face.setInterestFilter("/Hello/World",
                                        bind(&FacesFixture::onInterest, this, ref(face), _1, _2),
+                                       RegisterPrefixSuccessCallback(),
                                        bind(&FacesFixture::onRegFailed, this));
 
   scheduler.scheduleEvent(time::milliseconds(200),
@@ -185,17 +186,19 @@
 BOOST_AUTO_TEST_CASE(SetTwoFilters)
 {
   Face face;
-  Face face2(face.ioService());
-  Scheduler scheduler(*face.ioService());
+  Face face2(face.getIoService());
+  Scheduler scheduler(face.getIoService());
   scheduler.scheduleEvent(time::seconds(1),
                           bind(&FacesFixture::terminate, this, ref(face)));
 
   regPrefixId = face.setInterestFilter("/Hello/World",
                                        bind(&FacesFixture::onInterest, this, ref(face), _1, _2),
+                                       RegisterPrefixSuccessCallback(),
                                        bind(&FacesFixture::onRegFailed, this));
 
   regPrefixId2 = face.setInterestFilter("/Los/Angeles/Lakers",
                                         bind(&FacesFixture::onInterest2, this, ref(face), _1, _2),
+                                        RegisterPrefixSuccessCallback(),
                                         bind(&FacesFixture::onRegFailed, this));
 
 
@@ -216,13 +219,14 @@
 {
   Face face;
   Face face2(face.getIoService());
-  Scheduler scheduler(*face.ioService());
+  Scheduler scheduler(face.getIoService());
   scheduler.scheduleEvent(time::seconds(1),
                           bind(&FacesFixture::terminate, this, ref(face)));
 
   regPrefixId = face.setInterestFilter(InterestFilter("/Hello/World", "<><b><c>?"),
                                        bind(&FacesFixture::onInterestRegexError, this,
                                             ref(face), _1, _2),
+                                       RegisterPrefixSuccessCallback(),
                                        bind(&FacesFixture::onRegFailed, this));
 
   scheduler.scheduleEvent(time::milliseconds(300),
@@ -236,13 +240,14 @@
 {
   Face face;
   Face face2(face.getIoService());
-  Scheduler scheduler(*face.ioService());
+  Scheduler scheduler(face.getIoService());
   scheduler.scheduleEvent(time::seconds(2),
                           bind(&FacesFixture::terminate, this, ref(face)));
 
   regPrefixId = face.setInterestFilter(InterestFilter("/Hello/World", "<><b><c>?"),
                                        bind(&FacesFixture::onInterestRegex, this,
                                             ref(face), _1, _2),
+                                       RegisterPrefixSuccessCallback(),
                                        bind(&FacesFixture::onRegFailed, this));
 
   scheduler.scheduleEvent(time::milliseconds(200),
@@ -289,13 +294,14 @@
 BOOST_FIXTURE_TEST_CASE(RegisterUnregisterPrefix, FacesFixture2)
 {
   Face face;
-  Scheduler scheduler(*face.ioService());
+  Scheduler scheduler(face.getIoService());
   scheduler.scheduleEvent(time::seconds(2),
                           bind(&FacesFixture::terminate, this, ref(face)));
 
   regPrefixId = face.setInterestFilter(InterestFilter("/Hello/World"),
                                        bind(&FacesFixture::onInterest, this,
                                             ref(face), _1, _2),
+                                       RegisterPrefixSuccessCallback(),
                                        bind(&FacesFixture::onRegFailed, this));
 
   scheduler.scheduleEvent(time::milliseconds(500),
@@ -350,8 +356,8 @@
 BOOST_FIXTURE_TEST_CASE(RegisterPrefix, FacesFixture3)
 {
   Face face;
-  Face face2(face.ioService());
-  Scheduler scheduler(*face.ioService());
+  Face face2(face.getIoService());
+  Scheduler scheduler(face.getIoService());
   scheduler.scheduleEvent(time::seconds(2),
                           bind(&FacesFixture::terminate, this, ref(face)));
 
@@ -384,7 +390,7 @@
 {
   Face face;
   Face face2(face.getIoService());
-  Scheduler scheduler(*face.ioService());
+  Scheduler scheduler(face.getIoService());
   scheduler.scheduleEvent(time::seconds(2),
                           bind(&FacesFixture::terminate, this, ref(face)));
 
@@ -392,26 +398,30 @@
                          bind(&FacesFixture::onInterestRegex, this,
                               ref(face), _1, _2));
 
+  // prefix is not registered, and also does not match regex
   scheduler.scheduleEvent(time::milliseconds(200),
                           bind(&FacesFixture::expressInterest, this,
-                               ref(face2), Name("/Hello/World/a"))); // shouldn't match
+                               ref(face2), Name("/Hello/World/a")));
 
+  // matches regex, but prefix is not registered
   scheduler.scheduleEvent(time::milliseconds(300),
                           bind(&FacesFixture::expressInterest, this,
-                               ref(face2), Name("/Hello/World/a/b"))); // should match
+                               ref(face2), Name("/Hello/World/a/b")));
 
+  // matches regex, but prefix is not registered
   scheduler.scheduleEvent(time::milliseconds(400),
                           bind(&FacesFixture::expressInterest, this,
-                               ref(face2), Name("/Hello/World/a/b/c"))); // should match
+                               ref(face2), Name("/Hello/World/a/b/c")));
 
+  // prefix is not registered, and also does not match regex
   scheduler.scheduleEvent(time::milliseconds(500),
                           bind(&FacesFixture::expressInterest, this,
-                               ref(face2), Name("/Hello/World/a/b/d"))); // should not match
+                               ref(face2), Name("/Hello/World/a/b/d")));
 
   BOOST_REQUIRE_NO_THROW(face.processEvents());
 
   BOOST_CHECK_EQUAL(nRegFailures, 0);
-  BOOST_CHECK_EQUAL(nInInterests, 4);
+  BOOST_CHECK_EQUAL(nInInterests, 0);
   BOOST_CHECK_EQUAL(nTimeouts, 4);
   BOOST_CHECK_EQUAL(nData, 0);
 }
@@ -421,7 +431,7 @@
 {
   Face face;
   Face face2(face.getIoService());
-  Scheduler scheduler(*face.ioService());
+  Scheduler scheduler(face.getIoService());
   scheduler.scheduleEvent(time::seconds(2),
                           bind(&FacesFixture::terminate, this, ref(face)));
 
diff --git a/tests/test-block.cpp b/tests/test-block.cpp
index a4183f9..49ce204 100644
--- a/tests/test-block.cpp
+++ b/tests/test-block.cpp
@@ -553,22 +553,23 @@
   typedef boost::iostreams::stream<boost::iostreams::array_source> ArrayStream;
   ArrayStream stream(reinterpret_cast<const char*>(TEST_BUFFER), sizeof(TEST_BUFFER));
 
+
   Block testBlock;
-  BOOST_REQUIRE_NO_THROW(testBlock = Block(stream));
+  BOOST_REQUIRE_NO_THROW(testBlock = Block::fromStream(stream));
   BOOST_CHECK_EQUAL(testBlock.type(), 0);
   BOOST_CHECK_EQUAL(testBlock.size(), 3);
   BOOST_CHECK_EQUAL(testBlock.value_size(), 1);
   BOOST_CHECK_EQUAL(*testBlock.wire(),  0x00);
   BOOST_CHECK_EQUAL(*testBlock.value(), 0xfa);
 
-  BOOST_REQUIRE_NO_THROW(testBlock = Block(stream));
+  BOOST_REQUIRE_NO_THROW(testBlock = Block::fromStream(stream));
   BOOST_CHECK_EQUAL(testBlock.type(), 1);
   BOOST_CHECK_EQUAL(testBlock.size(), 3);
   BOOST_CHECK_EQUAL(testBlock.value_size(), 1);
   BOOST_CHECK_EQUAL(*testBlock.wire(),  0x01);
   BOOST_CHECK_EQUAL(*testBlock.value(), 0xfb);
 
-  BOOST_CHECK_THROW(testBlock = Block(stream), Tlv::Error);
+  BOOST_CHECK_THROW(Block::fromStream(stream), Tlv::Error);
 }
 
 BOOST_AUTO_TEST_CASE(Equality)
diff --git a/tests/test-interest.cpp b/tests/test-interest.cpp
index 54efad4..75a4fb7 100644
--- a/tests/test-interest.cpp
+++ b/tests/test-interest.cpp
@@ -245,7 +245,7 @@
   boost::iostreams::stream<boost::iostreams::array_source> is(
     reinterpret_cast<const char *>(Interest1), sizeof(Interest1));
 
-  Block interestBlock(is);
+  Block interestBlock = Block::fromStream(is);
 
   ndn::Interest i;
   BOOST_REQUIRE_NO_THROW(i.wireDecode(interestBlock));
diff --git a/tests/util/test-regex.cpp b/tests/util/test-regex.cpp
index 44279cd..668f5a4 100644
--- a/tests/util/test-regex.cpp
+++ b/tests/util/test-regex.cpp
@@ -36,7 +36,7 @@
   bool res = cm->match(Name("/a/b/"), 0, 1);
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 1);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
 
   backRef = make_shared<RegexBackrefManager>();
   cm = make_shared<RegexComponentMatcher>("a", backRef);
@@ -49,9 +49,9 @@
   res = cm->match(Name("/ccc.cd/b/"), 0, 1);
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 1);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("ccc.cd"));
-  BOOST_CHECK_EQUAL(backRef->getBackref(0)->getMatchResult()[0].toEscapedString(), string("ccc"));
-  BOOST_CHECK_EQUAL(backRef->getBackref(1)->getMatchResult()[0].toEscapedString(), string("cd"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("ccc.cd"));
+  BOOST_CHECK_EQUAL(backRef->getBackref(0)->getMatchResult()[0].toUri(), string("ccc"));
+  BOOST_CHECK_EQUAL(backRef->getBackref(1)->getMatchResult()[0].toUri(), string("cd"));
 }
 
 BOOST_AUTO_TEST_CASE(ComponentSetMatcher)
@@ -62,7 +62,7 @@
   bool res = cm->match(Name("/a/b/"), 0, 1);
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 1);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
 
   res = cm->match(Name("/a/b/"), 1, 1);
   BOOST_CHECK_EQUAL(res, false);
@@ -77,7 +77,7 @@
   res = cm->match(Name("/a/b/d"), 1, 1);
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 1);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("b"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("b"));
 
   res = cm->match(Name("/a/b/d"), 2, 1);
   BOOST_CHECK_EQUAL(res, false);
@@ -88,7 +88,7 @@
   res = cm->match(Name("/b/d"), 1, 1);
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 1);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("d"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("d"));
 
 }
 
@@ -104,8 +104,8 @@
   cm->match(Name("/a/b/c"), 0, 2);
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 2);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toEscapedString(), string("b"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toUri(), string("b"));
 
 
 
@@ -118,8 +118,8 @@
   res = cm->match(Name("/a/b/c"), 0, 2);
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 2);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toEscapedString(), string("b"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toUri(), string("b"));
 
 
 
@@ -128,12 +128,12 @@
   res = cm->match(Name("/a/b/c/d/e/f/"), 0, 6);
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 6);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toEscapedString(), string("b"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[2].toEscapedString(), string("c"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[3].toEscapedString(), string("d"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[4].toEscapedString(), string("e"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[5].toEscapedString(), string("f"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toUri(), string("b"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[2].toUri(), string("c"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[3].toUri(), string("d"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[4].toUri(), string("e"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[5].toUri(), string("f"));
 
 
 
@@ -142,12 +142,12 @@
   res = cm->match(Name("/a/b/c/d/e/f/"), 0, 6);
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 6);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toEscapedString(), string("b"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[2].toEscapedString(), string("c"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[3].toEscapedString(), string("d"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[4].toEscapedString(), string("e"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[5].toEscapedString(), string("f"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toUri(), string("b"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[2].toUri(), string("c"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[3].toUri(), string("d"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[4].toUri(), string("e"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[5].toUri(), string("f"));
 
 
 
@@ -161,7 +161,7 @@
   res = cm->match(Name("/a/b/c"), 0, 1);
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 1);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
 
   cm = make_shared<RegexRepeatMatcher>("<a>?", backRef, 3);
   res = cm->match(Name("/a/b/c"), 0, 2);
@@ -179,9 +179,9 @@
   res = cm->match(Name("/a/b/a/d/"), 0, 3);
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 3);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toEscapedString(), string("b"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[2].toEscapedString(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toUri(), string("b"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[2].toUri(), string("a"));
 
   res = cm->match(Name("/a/b/a/d/"), 0, 4);
   BOOST_CHECK_EQUAL(res, false);
@@ -194,15 +194,15 @@
   res = cm->match(Name("/a/b/a/d/e/"), 0, 2);
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 2);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toEscapedString(), string("b"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toUri(), string("b"));
 
   res = cm->match(Name("/a/b/a/d/e/"), 0, 3);
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 3);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toEscapedString(), string("b"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[2].toEscapedString(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toUri(), string("b"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[2].toUri(), string("a"));
 
   res = cm->match(Name("/a/b/a/b/e/"), 0, 4);
   BOOST_CHECK_EQUAL(res, false);
@@ -218,16 +218,16 @@
   res = cm->match(Name("/a/b/a/d/e/"), 0, 2);
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 2);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toEscapedString(), string("b"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toUri(), string("b"));
 
   res = cm->match(Name("/a/b/a/b/e/"), 0, 4);
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 4);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toEscapedString(), string("b"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[2].toEscapedString(), string("a"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[3].toEscapedString(), string("b"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toUri(), string("b"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[2].toUri(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[3].toUri(), string("b"));
 
   res = cm->match(Name("/a/b/a/d/e/"), 0, 1);
   BOOST_CHECK_EQUAL(res, false);
@@ -244,13 +244,13 @@
   res = cm->match(Name("/a/b/a/b/e/"), 0, 2);
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 2);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toEscapedString(), string("b"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toUri(), string("b"));
 
   res = cm->match(Name("/a/b/a/d/e/"), 0, 1);
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 1);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
 
   res = cm->match(Name("/a/b/a/d/e/"), 0, 0);
   BOOST_CHECK_EQUAL(res, true);
@@ -267,8 +267,8 @@
   bool res = cm->match(Name("/a/b/c"), 0, 2);
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 2);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toEscapedString(), string("b"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toUri(), string("b"));
   BOOST_CHECK_EQUAL(backRef->size(), 1);
 
   backRef = make_shared<RegexBackrefManager>();
@@ -278,12 +278,12 @@
   res = cm->match(Name("/a/b/c"), 0, 2);
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 2);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toEscapedString(), string("b"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toUri(), string("b"));
   BOOST_CHECK_EQUAL(backRef->size(), 2);
-  BOOST_CHECK_EQUAL(backRef->getBackref(0)->getMatchResult()[0].toEscapedString(), string("a"));
-  BOOST_CHECK_EQUAL(backRef->getBackref(0)->getMatchResult()[1].toEscapedString(), string("b"));
-  BOOST_CHECK_EQUAL(backRef->getBackref(1)->getMatchResult()[0].toEscapedString(), string("b"));
+  BOOST_CHECK_EQUAL(backRef->getBackref(0)->getMatchResult()[0].toUri(), string("a"));
+  BOOST_CHECK_EQUAL(backRef->getBackref(0)->getMatchResult()[1].toUri(), string("b"));
+  BOOST_CHECK_EQUAL(backRef->getBackref(1)->getMatchResult()[0].toUri(), string("b"));
 }
 
 BOOST_AUTO_TEST_CASE(BackRefMatcherAdvanced)
@@ -294,10 +294,10 @@
   bool res = cm->match(Name("/a/b/c"), 0, 2);
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 2);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toEscapedString(), string("b"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toUri(), string("b"));
   BOOST_CHECK_EQUAL(backRef->size(), 1);
-  BOOST_CHECK_EQUAL(backRef->getBackref(0)->getMatchResult()[0].toEscapedString(), string("b"));
+  BOOST_CHECK_EQUAL(backRef->getBackref(0)->getMatchResult()[0].toUri(), string("b"));
 }
 
 BOOST_AUTO_TEST_CASE(BackRefMatcherAdvanced2)
@@ -308,13 +308,13 @@
   bool res = cm->match(Name("/a/b/c"), 0, 3);
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 3);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toEscapedString(), string("b"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[2].toEscapedString(), string("c"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toUri(), string("b"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[2].toUri(), string("c"));
   BOOST_CHECK_EQUAL(backRef->size(), 2);
-  BOOST_CHECK_EQUAL(backRef->getBackref(0)->getMatchResult()[0].toEscapedString(), string("a"));
-  BOOST_CHECK_EQUAL(backRef->getBackref(0)->getMatchResult()[1].toEscapedString(), string("b"));
-  BOOST_CHECK_EQUAL(backRef->getBackref(1)->getMatchResult()[0].toEscapedString(), string("b"));
+  BOOST_CHECK_EQUAL(backRef->getBackref(0)->getMatchResult()[0].toUri(), string("a"));
+  BOOST_CHECK_EQUAL(backRef->getBackref(0)->getMatchResult()[1].toUri(), string("b"));
+  BOOST_CHECK_EQUAL(backRef->getBackref(1)->getMatchResult()[0].toUri(), string("b"));
 }
 
 BOOST_AUTO_TEST_CASE(PatternListMatcher)
@@ -325,15 +325,15 @@
   bool res = cm->match(Name("/a/b/c"), 0, 2);
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 2);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toEscapedString(), string("b"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toUri(), string("b"));
 
   backRef = make_shared<RegexBackrefManager>();
   cm = make_shared<RegexPatternListMatcher>("<>*<a>", backRef);
   res = cm->match(Name("/a/b/c"), 0, 1);
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 1);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
 
   backRef = make_shared<RegexBackrefManager>();
   cm = make_shared<RegexPatternListMatcher>("<>*<a>", backRef);
@@ -346,9 +346,9 @@
   res = cm->match(Name("/a/b/c"), 0, 3);
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 3);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toEscapedString(), string("b"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[2].toEscapedString(), string("c"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toUri(), string("b"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[2].toUri(), string("c"));
 
 }
 
@@ -359,28 +359,28 @@
   bool res = cm->match(Name("/a/b/c/d"));
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 4);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toEscapedString(), string("b"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[2].toEscapedString(), string("c"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[3].toEscapedString(), string("d"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toUri(), string("b"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[2].toUri(), string("c"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[3].toUri(), string("d"));
 
   cm = make_shared<RegexTopMatcher>("<b><c><d>$");
   res = cm->match(Name("/a/b/c/d"));
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 4);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toEscapedString(), string("b"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[2].toEscapedString(), string("c"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[3].toEscapedString(), string("d"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toUri(), string("b"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[2].toUri(), string("c"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[3].toUri(), string("d"));
 
   cm = make_shared<RegexTopMatcher>("^<a><b><c><d>$");
   res = cm->match(Name("/a/b/c/d"));
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 4);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toEscapedString(), string("b"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[2].toEscapedString(), string("c"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[3].toEscapedString(), string("d"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toUri(), string("b"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[2].toUri(), string("c"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[3].toUri(), string("d"));
 
   res = cm->match(Name("/a/b/c/d/e"));
   BOOST_CHECK_EQUAL(res, false);
@@ -390,20 +390,20 @@
   res = cm->match(Name("/a/b/c/d"));
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 4);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toEscapedString(), string("b"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[2].toEscapedString(), string("c"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[3].toEscapedString(), string("d"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toUri(), string("b"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[2].toUri(), string("c"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[3].toUri(), string("d"));
 
 
   cm = make_shared<RegexTopMatcher>("<b><c>");
   res = cm->match(Name("/a/b/c/d"));
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult().size(), 4);
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toEscapedString(), string("a"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toEscapedString(), string("b"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[2].toEscapedString(), string("c"));
-  BOOST_CHECK_EQUAL(cm->getMatchResult()[3].toEscapedString(), string("d"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[0].toUri(), string("a"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[1].toUri(), string("b"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[2].toUri(), string("c"));
+  BOOST_CHECK_EQUAL(cm->getMatchResult()[3].toUri(), string("d"));
 }
 
 BOOST_AUTO_TEST_CASE(TopMatcherAdvanced)
diff --git a/tools/ndnputchunks3.cpp b/tools/ndnputchunks3.cpp
index e6d74b2..66d0a8e 100644
--- a/tools/ndnputchunks3.cpp
+++ b/tools/ndnputchunks3.cpp
@@ -84,6 +84,7 @@
 
     m_face.setInterestFilter(m_name,
                              bind(&Producer::onInterest, this, _1, _2),
+                             RegisterPrefixSuccessCallback(),
                              bind(&Producer::onRegisterFailed, this, _1, _2));
     m_face.processEvents();
   }
diff --git a/tools/ndnsec-dsk-gen.hpp b/tools/ndnsec-dsk-gen.hpp
index d99ea2b..50cd76a 100644
--- a/tools/ndnsec-dsk-gen.hpp
+++ b/tools/ndnsec-dsk-gen.hpp
@@ -72,7 +72,7 @@
 
   Name defaultCertName = keyChain.getDefaultCertificateNameForIdentity(identityName);
   bool isDefaultDsk = false;
-  if (defaultCertName.get(-3).toEscapedString().substr(0,4) == "dsk-")
+  if (defaultCertName.get(-3).toUri().substr(0,4) == "dsk-")
     isDefaultDsk = true;
 
   if (isDefaultDsk)
diff --git a/tools/tlvdump.cpp b/tools/tlvdump.cpp
index 5f5eac8..47752ae 100644
--- a/tools/tlvdump.cpp
+++ b/tools/tlvdump.cpp
@@ -97,7 +97,7 @@
   if (block.elements().empty())
     {
       std::cout << " [[";
-      ndn::name::Component(block.value(), block.value_size()).toEscapedString(std::cout);
+      ndn::name::Component(block.value(), block.value_size()).toUri(std::cout);
       std::cout<< "]]";
     }
   std::cout << std::endl;
@@ -151,7 +151,7 @@
 {
   while (is.peek() != std::char_traits<char>::eof()) {
     try {
-      ndn::Block block(is);
+      ndn::Block block = ndn::Block::fromStream(is);
       BlockPrinter(block, "");
       // HexPrinter(block, "");
     }
