diff --git a/src/leaf-container.hpp b/src/leaf-container.hpp
index 51470b7..d116b55 100644
--- a/src/leaf-container.hpp
+++ b/src/leaf-container.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2012-2014 University of California, Los Angeles
+ * Copyright (c) 2012-2017 University of California, Los Angeles
  *
  * This file is part of ChronoSync, synchronization library for distributed realtime
  * applications for NDN.
@@ -47,7 +47,7 @@
   operator()(const Name& prefix) const
   {
     ndn::ConstBufferPtr buffer =
-      ndn::crypto::sha256(prefix.wireEncode().wire(), prefix.wireEncode().size());
+      ndn::crypto::computeSha256Digest(prefix.wireEncode().wire(), prefix.wireEncode().size());
 
     BOOST_ASSERT(buffer->size() > sizeof(std::size_t));
 
diff --git a/src/logic.cpp b/src/logic.cpp
index 278115e..4caa56e 100644
--- a/src/logic.cpp
+++ b/src/logic.cpp
@@ -52,7 +52,7 @@
 
 const ndn::Name Logic::DEFAULT_NAME;
 const ndn::Name Logic::EMPTY_NAME;
-const ndn::shared_ptr<ndn::Validator> Logic::DEFAULT_VALIDATOR;
+const std::shared_ptr<ndn::Validator> Logic::DEFAULT_VALIDATOR;
 const time::steady_clock::Duration Logic::DEFAULT_RESET_TIMER = time::seconds(0);
 const time::steady_clock::Duration Logic::DEFAULT_CANCEL_RESET_TIMER = time::milliseconds(500);
 const time::milliseconds Logic::DEFAULT_RESET_INTEREST_LIFETIME(1000);
@@ -69,7 +69,7 @@
              const Name& defaultUserPrefix,
              const UpdateCallback& onUpdate,
              const Name& defaultSigningId,
-             ndn::shared_ptr<ndn::Validator> validator,
+             std::shared_ptr<ndn::Validator> validator,
              const time::steady_clock::Duration& resetTimer,
              const time::steady_clock::Duration& cancelResetTimer,
              const time::milliseconds& resetInterestLifetime,
@@ -213,7 +213,7 @@
   if (node != m_nodeList.end())
     return node->second.sessionName;
   else
-    throw Error("Refer to non-existent node:" + prefix.toUri());
+    BOOST_THROW_EXCEPTION(Error("Refer to non-existent node:" + prefix.toUri()));
 }
 
 const SeqNo&
@@ -225,12 +225,12 @@
   if (node != m_nodeList.end())
     return node->second.seqNo;
   else
-    throw Logic::Error("Refer to non-existent node:" + prefix.toUri());
+    BOOST_THROW_EXCEPTION(Logic::Error("Refer to non-existent node:" + prefix.toUri()));
 
 }
 
 void
-Logic::updateSeqNo(const SeqNo& seqNo, const Name &updatePrefix)
+Logic::updateSeqNo(const SeqNo& seqNo, const Name& updatePrefix)
 {
   Name prefix;
   if (updatePrefix == EMPTY_NAME) {
@@ -342,7 +342,7 @@
 }
 
 void
-Logic::onSyncData(const Interest& interest, Data& data)
+Logic::onSyncData(const Interest& interest, const Data& data)
 {
   _LOG_DEBUG_ID(">> Logic::onSyncData");
   // if (static_cast<bool>(m_validator))
@@ -366,7 +366,7 @@
 }
 
 void
-Logic::onResetData(const Interest& interest, Data& data)
+Logic::onResetData(const Interest& interest, const Data& data)
 {
   // This should not happened, drop the received data.
 }
@@ -531,7 +531,7 @@
       _LOG_DEBUG_ID("What? nothing new");
     }
   }
-  catch (State::Error&) {
+  catch (const State::Error&) {
     _LOG_DEBUG_ID("Something really fishy happened during state decoding");
     // Something really fishy happened during state decoding;
     commit.reset();
@@ -566,7 +566,7 @@
     }
     m_interestTable.clear();
   }
-  catch (InterestTable::Error&) {
+  catch (const InterestTable::Error&) {
     // ok. not really an error
   }
   _LOG_DEBUG_ID("<< Logic::satisfyPendingSyncInterests");
@@ -607,6 +607,7 @@
   interest.setInterestLifetime(m_resetInterestLifetime);
   m_face.expressInterest(interest,
                          bind(&Logic::onResetData, this, _1, _2),
+                         bind(&Logic::onSyncTimeout, this, _1), // Nack
                          bind(&Logic::onSyncTimeout, this, _1));
 
   _LOG_DEBUG_ID("<< Logic::sendResetInterest");
@@ -640,6 +641,7 @@
 
   m_outstandingInterestId = m_face.expressInterest(interest,
                                                    bind(&Logic::onSyncData, this, _1, _2),
+                                                   bind(&Logic::onSyncTimeout, this, _1), // Nack
                                                    bind(&Logic::onSyncTimeout, this, _1));
 
   _LOG_DEBUG_ID("Send interest: " << interest.getName());
@@ -720,8 +722,10 @@
   interest.setMustBeFresh(true);
   interest.setInterestLifetime(m_recoveryInterestLifetime);
 
-  m_face.expressInterest(interest, bind(&Logic::onRecoveryData, this, _1, _2),
-                                   bind(&Logic::onRecoveryTimeout, this, _1));
+  m_face.expressInterest(interest,
+                         bind(&Logic::onRecoveryData, this, _1, _2),
+                         bind(&Logic::onRecoveryTimeout, this, _1), // Nack
+                         bind(&Logic::onRecoveryTimeout, this, _1));
 
   _LOG_DEBUG_ID("interest: " << interest.getName());
   _LOG_DEBUG_ID("<< Logic::sendRecoveryInterest");
@@ -748,7 +752,7 @@
 }
 
 void
-Logic::onRecoveryData(const Interest& interest, Data& data)
+Logic::onRecoveryData(const Interest& interest, const Data& data)
 {
   _LOG_DEBUG_ID(">> Logic::onRecoveryData");
   onSyncDataValidated(data.shared_from_this());
@@ -777,8 +781,10 @@
 
   excludeInterest.setInterestLifetime(m_syncInterestLifetime);
 
-  m_face.expressInterest(excludeInterest, bind(&Logic::onSyncData, this, _1, _2),
-                                          bind(&Logic::onSyncTimeout, this, _1));
+  m_face.expressInterest(excludeInterest,
+                         bind(&Logic::onSyncData, this, _1, _2),
+                         bind(&Logic::onSyncTimeout, this, _1), // Nack
+                         bind(&Logic::onSyncTimeout, this, _1));
 
   _LOG_DEBUG_ID("Send interest: " << excludeInterest.getName());
   _LOG_DEBUG_ID("<< Logic::sendExcludeInterest");
@@ -808,4 +814,4 @@
   _LOG_DEBUG_ID("<< Logic::formAndSendExcludeInterest");
 }
 
-} // namespace chronosync
\ No newline at end of file
+} // namespace chronosync
diff --git a/src/logic.hpp b/src/logic.hpp
index c452d20..b07ba62 100644
--- a/src/logic.hpp
+++ b/src/logic.hpp
@@ -121,7 +121,7 @@
         const Name& defaultUserPrefix,
         const UpdateCallback& onUpdate,
         const Name& defaultSigningId = DEFAULT_NAME,
-        ndn::shared_ptr<ndn::Validator> validator = DEFAULT_VALIDATOR,
+        std::shared_ptr<ndn::Validator> validator = DEFAULT_VALIDATOR,
         const time::steady_clock::Duration& resetTimer = DEFAULT_RESET_TIMER,
         const time::steady_clock::Duration& cancelResetTimer = DEFAULT_CANCEL_RESET_TIMER,
         const time::milliseconds& resetInterestLifetime = DEFAULT_RESET_INTEREST_LIFETIME,
@@ -264,7 +264,7 @@
    * @param data     The reply to the Sync Interest
    */
   void
-  onSyncData(const Interest& interest, Data& data);
+  onSyncData(const Interest& interest, const Data& data);
 
   /**
    * @brief Callback to handle reply to Reset Interest.
@@ -275,7 +275,7 @@
    * @param data     The reply to the Reset Interest
    */
   void
-  onResetData(const Interest& interest, Data& data);
+  onResetData(const Interest& interest, const Data& data);
 
   /**
    * @brief Callback to handle Sync Interest timeout.
@@ -423,7 +423,7 @@
    * @param data     The reply to the Recovery Interest
    */
   void
-  onRecoveryData(const Interest& interest, Data& data);
+  onRecoveryData(const Interest& interest, const Data& data);
 
   /**
    * @brief Callback to handle Recovery Interest timeout.
@@ -461,7 +461,7 @@
 public:
   static const ndn::Name DEFAULT_NAME;
   static const ndn::Name EMPTY_NAME;
-  static const ndn::shared_ptr<ndn::Validator> DEFAULT_VALIDATOR;
+  static const std::shared_ptr<ndn::Validator> DEFAULT_VALIDATOR;
 
 private:
   typedef std::unordered_map<ndn::Name, NodeInfo> NodeList;
@@ -516,7 +516,7 @@
   // Security
   ndn::Name m_defaultSigningId;
   ndn::KeyChain m_keyChain;
-  ndn::shared_ptr<ndn::Validator> m_validator;
+  std::shared_ptr<ndn::Validator> m_validator;
 
 
 #ifdef _DEBUG
@@ -528,4 +528,4 @@
 
 } // namespace chronosync
 
-#endif // CHRONOSYNC_LOGIC_HPP
\ No newline at end of file
+#endif // CHRONOSYNC_LOGIC_HPP
diff --git a/src/socket.cpp b/src/socket.cpp
index 4d46d7f..dad1125 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -32,14 +32,14 @@
 
 const ndn::Name Socket::DEFAULT_NAME;
 const ndn::Name Socket::DEFAULT_PREFIX;
-const ndn::shared_ptr<ndn::Validator> Socket::DEFAULT_VALIDATOR;
+const std::shared_ptr<ndn::Validator> Socket::DEFAULT_VALIDATOR;
 
 Socket::Socket(const Name& syncPrefix,
                const Name& userPrefix,
                ndn::Face& face,
                const UpdateCallback& updateCallback,
                const Name& signingId,
-               ndn::shared_ptr<ndn::Validator> validator)
+               std::shared_ptr<ndn::Validator> validator)
   : m_userPrefix(userPrefix)
   , m_face(face)
   , m_logic(face, syncPrefix, userPrefix, updateCallback)
@@ -146,6 +146,8 @@
   m_face.expressInterest(interest,
                          bind(&Socket::onData, this, _1, _2, dataCallback, failureCallback),
                          bind(&Socket::onDataTimeout, this, _1, nRetries,
+                              dataCallback, failureCallback), // Nack
+                         bind(&Socket::onDataTimeout, this, _1, nRetries,
                               dataCallback, failureCallback));
 }
 
@@ -153,7 +155,7 @@
 Socket::fetchData(const Name& sessionName, const SeqNo& seqNo,
                   const ndn::OnDataValidated& dataCallback,
                   const ndn::OnDataValidationFailed& failureCallback,
-                  const ndn::OnTimeout& onTimeout,
+                  const ndn::TimeoutCallback& onTimeout,
                   int nRetries)
 {
   _LOG_DEBUG(">> Socket::fetchData");
@@ -165,6 +167,7 @@
 
   m_face.expressInterest(interest,
                          bind(&Socket::onData, this, _1, _2, dataCallback, failureCallback),
+                         bind(onTimeout, _1), // Nack
                          onTimeout);
 
   _LOG_DEBUG("<< Socket::fetchData");
@@ -180,7 +183,7 @@
 }
 
 void
-Socket::onData(const Interest& interest, Data& data,
+Socket::onData(const Interest& interest, const Data& data,
                const ndn::OnDataValidated& onValidated,
                const ndn::OnDataValidationFailed& onFailed)
 {
@@ -204,6 +207,8 @@
   m_face.expressInterest(interest,
                          bind(&Socket::onData, this, _1, _2, onValidated, onFailed),
                          bind(&Socket::onDataTimeout, this, _1, nRetries - 1,
+                              onValidated, onFailed), // Nack
+                         bind(&Socket::onDataTimeout, this, _1, nRetries - 1,
                               onValidated, onFailed));
 }
 
diff --git a/src/socket.hpp b/src/socket.hpp
index d213018..807e173 100644
--- a/src/socket.hpp
+++ b/src/socket.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2012-2014 University of California, Los Angeles
+ * Copyright (c) 2012-2017 University of California, Los Angeles
  *
  * This file is part of ChronoSync, synchronization library for distributed realtime
  * applications for NDN.
@@ -64,7 +64,7 @@
          ndn::Face& face,
          const UpdateCallback& updateCallback,
          const Name& signingId = DEFAULT_NAME,
-         ndn::shared_ptr<ndn::Validator> validator = DEFAULT_VALIDATOR);
+         std::shared_ptr<ndn::Validator> validator = DEFAULT_VALIDATOR);
 
   ~Socket();
 
@@ -151,7 +151,7 @@
   fetchData(const Name& sessionName, const SeqNo& seq,
             const ndn::OnDataValidated& onValidated,
             const ndn::OnDataValidationFailed& onValidationFailed,
-            const ndn::OnTimeout& onTimeout,
+            const ndn::TimeoutCallback& onTimeout,
             int nRetries = 0);
 
   /// @brief Get the root digest of current sync tree
@@ -169,7 +169,7 @@
   onInterest(const Name& prefix, const Interest& interest);
 
   void
-  onData(const Interest& interest, Data& data,
+  onData(const Interest& interest, const Data& data,
          const ndn::OnDataValidated& dataCallback,
          const ndn::OnDataValidationFailed& failCallback);
 
@@ -185,7 +185,7 @@
 public:
   static const ndn::Name DEFAULT_NAME;
   static const ndn::Name DEFAULT_PREFIX;
-  static const ndn::shared_ptr<ndn::Validator> DEFAULT_VALIDATOR;
+  static const std::shared_ptr<ndn::Validator> DEFAULT_VALIDATOR;
 
 private:
   typedef std::unordered_map<ndn::Name, const ndn::RegisteredPrefixId*> RegisteredPrefixList;
@@ -196,7 +196,7 @@
 
   ndn::Name m_signingId;
   ndn::KeyChain m_keyChain;
-  ndn::shared_ptr<ndn::Validator> m_validator;
+  std::shared_ptr<ndn::Validator> m_validator;
 
   RegisteredPrefixList m_registeredPrefixList;
   ndn::util::InMemoryStoragePersistent m_ims;
diff --git a/src/state.cpp b/src/state.cpp
index 251d46b..0b2c0c7 100644
--- a/src/state.cpp
+++ b/src/state.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2012-2014 University of California, Los Angeles
+ * Copyright (c) 2012-2017 University of California, Los Angeles
  *
  * This file is part of ChronoSync, synchronization library for distributed realtime
  * applications for NDN.
@@ -143,11 +143,11 @@
 State::wireDecode(const Block& wire)
 {
   if (!wire.hasWire())
-    throw Error("The supplied block does not contain wire format");
+    BOOST_THROW_EXCEPTION(Error("The supplied block does not contain wire format"));
 
   if (wire.type() != tlv::SyncReply)
-    throw Error("Unexpected TLV type when decoding SyncReply: " +
-                boost::lexical_cast<std::string>(m_wire.type()));
+    BOOST_THROW_EXCEPTION(Error("Unexpected TLV type when decoding SyncReply: " +
+                                boost::lexical_cast<std::string>(m_wire.type())));
 
   wire.parse();
   m_wire = wire;
@@ -164,7 +164,7 @@
       if (val != it->elements_end())
         update(info, readNonNegativeInteger(*val));
       else
-        throw Error("No seqNo when decoding SyncReply");
+        BOOST_THROW_EXCEPTION(Error("No seqNo when decoding SyncReply"));
     }
   }
 }
diff --git a/tests/unit-tests/test-interest-table.cpp b/tests/unit-tests/test-interest-table.cpp
index 531de09..8b1f156 100644
--- a/tests/unit-tests/test-interest-table.cpp
+++ b/tests/unit-tests/test-interest-table.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2012-2014 University of California, Los Angeles
+ * Copyright (c) 2012-2017 University of California, Los Angeles
  *
  * This file is part of ChronoSync, synchronization library for distributed realtime
  * applications for NDN.
@@ -36,19 +36,19 @@
     Name prefix("/test/prefix");
 
     Name interestName1;
-    digest1 = ndn::crypto::sha256(origin, 1);
+    digest1 = ndn::crypto::computeSha256Digest(origin, 1);
     interestName1.append(prefix).append(name::Component(digest1));
     interest1 = make_shared<Interest>(interestName1);
     interest1->setInterestLifetime(time::milliseconds(100));
 
     Name interestName2;
-    digest2 = ndn::crypto::sha256(origin, 2);
+    digest2 = ndn::crypto::computeSha256Digest(origin, 2);
     interestName2.append(prefix).append(name::Component(digest2));
     interest2 = make_shared<Interest>(interestName2);
     interest2->setInterestLifetime(time::milliseconds(100));
 
     Name interestName3;
-    digest3 = ndn::crypto::sha256(origin, 3);
+    digest3 = ndn::crypto::computeSha256Digest(origin, 3);
     interestName3.append(prefix).append(name::Component(digest3));
     interest3 = make_shared<Interest>(interestName3);
     interest3->setInterestLifetime(time::milliseconds(100));
@@ -121,16 +121,16 @@
 {
   InterestTable table(io);
 
-  insert(ndn::ref(table), interest1, digest1);
+  insert(table, interest1, digest1);
 
   advanceClocks(ndn::time::milliseconds(10), 10);
 
-  insert(ndn::ref(table), interest2, digest2);
-  insert(ndn::ref(table), interest3, digest3);
+  insert(table, interest2, digest2);
+  insert(table, interest3, digest3);
 
   advanceClocks(ndn::time::milliseconds(10), 5);
 
-  insert(ndn::ref(table), interest2, digest2);
+  insert(table, interest2, digest2);
 
   advanceClocks(ndn::time::milliseconds(10), 2);
   BOOST_CHECK_EQUAL(table.size(), 2);
