diff --git a/src/sync-diff-leaf.cc b/src/sync-diff-leaf.cc
index bdbbd1b..114b122 100644
--- a/src/sync-diff-leaf.cc
+++ b/src/sync-diff-leaf.cc
@@ -17,12 +17,12 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #include "sync-diff-leaf.h"
 #include <boost/throw_exception.hpp>
-typedef boost::error_info<struct tag_errmsg, std::string> errmsg_info; 
+typedef boost::error_info<struct tag_errmsg, std::string> errmsg_info;
 
 using namespace Sync::Error;
 
diff --git a/src/sync-diff-leaf.h b/src/sync-diff-leaf.h
index 6e09efe..c7862af 100644
--- a/src/sync-diff-leaf.h
+++ b/src/sync-diff-leaf.h
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #ifndef SYNC_DIFF_LEAF_H
@@ -40,7 +40,7 @@
 
 /**
  * @ingroup sync
- * @brief Annotated SYNC leaf 
+ * @brief Annotated SYNC leaf
  */
 class DiffLeaf : public Leaf
 {
diff --git a/src/sync-diff-state-container.h b/src/sync-diff-state-container.h
index 2ae7c59..9cbec2b 100644
--- a/src/sync-diff-state-container.h
+++ b/src/sync-diff-state-container.h
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #ifndef SYNC_DIFF_STATE_CONTAINER_H
@@ -40,7 +40,7 @@
 
 namespace Sync {
 
-/// @cond include_hidden 
+/// @cond include_hidden
 struct sequenced { };
 struct timed { };
 /// @endcond
@@ -59,7 +59,7 @@
       DigestPtrHash,
       DigestPtrEqual
       >
-    ,        
+    ,
     // sequenced index to access older/newer element (like in list)
     mi::sequenced<mi::tag<sequenced> >
     >
diff --git a/src/sync-diff-state.cc b/src/sync-diff-state.cc
index 3030940..fefcf5b 100644
--- a/src/sync-diff-state.cc
+++ b/src/sync-diff-state.cc
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #include "sync-diff-state.h"
@@ -43,7 +43,7 @@
 DiffState::diff () const
 {
   DiffStatePtr ret = make_shared<DiffState> ();
-  
+
   DiffStatePtr state = m_next;
   while (state != 0)
     {
@@ -71,10 +71,10 @@
           BOOST_ASSERT (false);
         }
     }
-  
+
   return *this;
 }
-  
+
 // from State
 boost::tuple<bool/*inserted*/, bool/*updated*/, SeqNo/*oldSeqNo*/>
 DiffState::update (NameInfoConstPtr info, const SeqNo &seq)
diff --git a/src/sync-diff-state.h b/src/sync-diff-state.h
index d944c3e..153437e 100644
--- a/src/sync-diff-state.h
+++ b/src/sync-diff-state.h
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #ifndef SYNC_DIFF_STATE_H
@@ -67,7 +67,7 @@
    */
   DigestConstPtr
   getDigest () const { return m_digest; }
-  
+
   /**
    * @brief Accumulate differences from `this' state to the most current state
    * @returns Accumulated differences from `this' state to the most current state
@@ -84,14 +84,14 @@
    */
   DiffState&
   operator += (const DiffState &state);
-  
+
   // from State
   virtual boost::tuple<bool/*inserted*/, bool/*updated*/, SeqNo/*oldSeqNo*/>
   update (NameInfoConstPtr info, const SeqNo &seq);
 
   virtual bool
   remove (NameInfoConstPtr info);
-  
+
 private:
   DiffStatePtr m_next;
   DigestConstPtr m_digest;
diff --git a/src/sync-digest.cc b/src/sync-digest.cc
index 19ec240..d3dde6c 100644
--- a/src/sync-digest.cc
+++ b/src/sync-digest.cc
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #include "sync-digest.h"
@@ -25,8 +25,8 @@
 
 #include <boost/assert.hpp>
 #include <boost/throw_exception.hpp>
-typedef boost::error_info<struct tag_errmsg, std::string> errmsg_info_str; 
-typedef boost::error_info<struct tag_errmsg, int> errmsg_info_int; 
+typedef boost::error_info<struct tag_errmsg, std::string> errmsg_info_str;
+typedef boost::error_info<struct tag_errmsg, int> errmsg_info_int;
 
 // for printing, may be disabled in optimized build
 
@@ -89,7 +89,7 @@
       value = lookup_table [(unsigned)ch];
     if (value == -1)
       BOOST_THROW_EXCEPTION (Sync::Error::DigestCalculationError () << errmsg_info_int ((int)ch));
-    
+
     return value;
   }
 };
@@ -146,7 +146,7 @@
   if (!m_buffer.empty ()) return;
 
   m_buffer.resize (HASH_FUNCTION_LEN);
-  
+
   unsigned int tmp;
   int ok = EVP_DigestFinal_ex (m_context,
 			       &m_buffer[0], &tmp);
@@ -160,14 +160,14 @@
 Digest::getHash () const
 {
   if (isZero ()) return 0;
-  
+
   if (sizeof (std::size_t) > m_buffer.size ())
     {
       BOOST_THROW_EXCEPTION (Error::DigestCalculationError ()
                              << errmsg_info_str ("Hash is not zero and length is less than size_t")
                              << errmsg_info_int (m_buffer.size ()));
     }
-  
+
   // just getting first sizeof(std::size_t) bytes
   // not ideal, but should work pretty well
   return *(reinterpret_cast<const std::size_t*> (&m_buffer[0]));
@@ -192,7 +192,7 @@
 Digest::update (const uint8_t *buffer, size_t size)
 {
   // cout << "Update: " << (void*)buffer << " / size: " << size << "\n";
-  
+
   // cannot update Digest when it has been finalized
   if (!m_buffer.empty ())
     BOOST_THROW_EXCEPTION (Error::DigestCalculationError ()
@@ -209,7 +209,7 @@
 Digest &
 Digest::operator << (const Digest &src)
 {
-  if (src.m_buffer.empty ()) 
+  if (src.m_buffer.empty ())
     BOOST_THROW_EXCEPTION (Error::DigestCalculationError ()
                            << errmsg_info_str ("Digest has not been yet finalized"));
 
@@ -222,7 +222,7 @@
 operator << (std::ostream &os, const Digest &digest)
 {
   BOOST_ASSERT (!digest.m_buffer.empty ());
-  
+
   std::ostreambuf_iterator<char> out_it (os); // ostream iterator
   // need to encode to base64
   copy (string_from_binary (digest.m_buffer.begin ()),
@@ -241,7 +241,7 @@
   if (str.size () == 0)
     BOOST_THROW_EXCEPTION (Error::DigestCalculationError ()
                            << errmsg_info_str ("Input is empty"));
-  
+
   // uint8_t padding = (3 - str.size () % 3) % 3;
   // for (uint8_t i = 0; i < padding; i++) str.push_back ('=');
 
@@ -251,7 +251,7 @@
                            << errmsg_info_str ("Digest has been already finalized"));
 
   digest.m_buffer.clear ();
-  
+
   copy (string_to_binary (str.begin ()),
         string_to_binary (str.end ()),
         std::back_inserter (digest.m_buffer));
@@ -261,4 +261,3 @@
 
 
 } // Sync
-
diff --git a/src/sync-digest.h b/src/sync-digest.h
index ecc8522..881b252 100644
--- a/src/sync-digest.h
+++ b/src/sync-digest.h
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #ifndef SYNC_DIGEST_H
@@ -47,7 +47,7 @@
    */
   bool
   empty () const;
-  
+
   /**
    * @brief Reset digest to the initial state
    */
@@ -84,7 +84,7 @@
   bool
   operator != (const Digest &digest) const
   { return ! (*this == digest); }
-  
+
 
   /**
    * @brief Add existing digest to digest calculation
@@ -116,11 +116,11 @@
    */
   bool
   isZero () const;
-  
+
 private:
   Digest &
   operator = (Digest &digest) { (void)digest; return *this; }
-  
+
   /**
    * @brief Add size bytes of buffer to the hash
    */
@@ -132,7 +132,7 @@
 
   friend std::istream &
   operator >> (std::istream &is, Digest &digest);
-  
+
 private:
   EVP_MD_CTX *m_context;
   std::vector<uint8_t> m_buffer;
diff --git a/src/sync-event.h b/src/sync-event.h
index 7808947..ac489ca 100644
--- a/src/sync-event.h
+++ b/src/sync-event.h
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #ifndef SYNC_EVENT_H
diff --git a/src/sync-full-leaf.cc b/src/sync-full-leaf.cc
index 84f96e3..e261e78 100644
--- a/src/sync-full-leaf.cc
+++ b/src/sync-full-leaf.cc
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #include "sync-full-leaf.h"
diff --git a/src/sync-full-leaf.h b/src/sync-full-leaf.h
index 08142a6..e40a30f 100644
--- a/src/sync-full-leaf.h
+++ b/src/sync-full-leaf.h
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #ifndef SYNC_FULL_LEAF_H
@@ -29,7 +29,7 @@
 
 /**
  * @ingroup sync
- * @brief SYNC leaf for the full state (with support of Digest calculation) 
+ * @brief SYNC leaf for the full state (with support of Digest calculation)
  */
 class FullLeaf : public Leaf
 {
@@ -49,12 +49,12 @@
    * (including updates of child classes)
    */
   const Digest &
-  getDigest () const { return m_digest; }  
+  getDigest () const { return m_digest; }
 
   // from Leaf
   virtual void
   setSeq (const SeqNo &seq);
-  
+
 private:
   void
   updateDigest ();
diff --git a/src/sync-full-state.cc b/src/sync-full-state.cc
index 7000606..4d00aec 100644
--- a/src/sync-full-state.cc
+++ b/src/sync-full-state.cc
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #include "sync-full-state.h"
diff --git a/src/sync-full-state.h b/src/sync-full-state.h
index 028c41e..99914ab 100644
--- a/src/sync-full-state.h
+++ b/src/sync-full-state.h
@@ -17,13 +17,13 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #ifndef SYNC_FULL_STATE_H
 #define SYNC_FULL_STATE_H
 
-#include <ndn-cpp-dev/util/time.hpp>
+#include <ndn-cxx/util/time.hpp>
 #include "sync-state.h"
 
 namespace Sync {
@@ -61,14 +61,14 @@
    */
   DigestConstPtr
   getDigest ();
-  
+
   // from State
   virtual boost::tuple<bool/*inserted*/, bool/*updated*/, SeqNo/*oldSeqNo*/>
   update (NameInfoConstPtr info, const SeqNo &seq);
 
   virtual bool
   remove (NameInfoConstPtr info);
-  
+
 private:
   ndn::time::system_clock::TimePoint m_lastUpdated; ///< @brief Time when state was updated last time
   DigestPtr m_digest;
diff --git a/src/sync-interest-container.h b/src/sync-interest-container.h
index f674d05..96086fa 100644
--- a/src/sync-interest-container.h
+++ b/src/sync-interest-container.h
@@ -17,13 +17,13 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #ifndef SYNC_INTEREST_CONTAINER_H
 #define SYNC_INTEREST_CONTAINER_H
 
-#include <ndn-cpp-dev/util/time.hpp>
+#include <ndn-cxx/util/time.hpp>
 
 #include "sync-digest.h"
 
@@ -51,14 +51,14 @@
   , m_unknown (unknown)
   {
   }
-  
+
   DigestConstPtr   m_digest;
   std::string      m_name;
   ndn::time::system_clock::TimePoint m_time;
   bool             m_unknown;
 };
 
-/// @cond include_hidden 
+/// @cond include_hidden
 struct named { };
 struct hashed;
 struct timed;
@@ -76,7 +76,7 @@
       BOOST_MULTI_INDEX_MEMBER(Interest, std::string, m_name)
     >
     ,
-    
+
     mi::hashed_non_unique<
       mi::tag<hashed>,
       BOOST_MULTI_INDEX_MEMBER(Interest, DigestConstPtr, m_digest),
@@ -84,7 +84,7 @@
       DigestPtrEqual
       >
     ,
-    
+
     mi::ordered_non_unique<
       mi::tag<timed>,
       BOOST_MULTI_INDEX_MEMBER(Interest, ndn::time::system_clock::TimePoint, m_time)
diff --git a/src/sync-interest-table.cc b/src/sync-interest-table.cc
index fc1d3bf..16706ea 100644
--- a/src/sync-interest-table.cc
+++ b/src/sync-interest-table.cc
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #include "sync-interest-table.h"
@@ -56,7 +56,7 @@
 SyncInterestTable::insert (DigestConstPtr digest, const std::string& name, bool unknownState/*=false*/)
 {
   bool existent = false;
-  
+
   InterestContainer::index<named>::type::iterator it = m_table.get<named> ().find (name);
   if (it != m_table.end())
     {
@@ -100,14 +100,14 @@
 }
 
 void SyncInterestTable::expireInterests ()
-{ 
+{
   uint32_t count = 0;
   ndn::time::system_clock::TimePoint expireTime = ndn::time::system_clock::now() - m_entryLifetime;
-  
+
   while (m_table.size () > 0)
     {
       InterestContainer::index<timed>::type::iterator item = m_table.get<timed> ().begin ();
-      
+
       if (item->m_time <= expireTime)
         {
           m_table.get<timed> ().erase (item);
diff --git a/src/sync-interest-table.h b/src/sync-interest-table.h
index 4810c41..13ea3bc 100644
--- a/src/sync-interest-table.h
+++ b/src/sync-interest-table.h
@@ -17,13 +17,13 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #ifndef SYNC_INTEREST_TABLE_H
 #define SYNC_INTEREST_TABLE_H
 
-#include <ndn-cpp-dev/util/scheduler.hpp>
+#include <ndn-cxx/util/scheduler.hpp>
 
 #include <string>
 #include <vector>
@@ -36,7 +36,7 @@
 /**
  * \ingroup sync
  * @brief A table to keep unanswered Sync Interest
- * all access operation to the table should grab the 
+ * all access operation to the table should grab the
  * mutex first
  */
 class SyncInterestTable
@@ -63,7 +63,7 @@
    */
   bool
   remove (const std::string &name);
-  
+
   /**
    * @brief pop a non-expired Interest from PIT
    */
diff --git a/src/sync-intro-certificate.h b/src/sync-intro-certificate.h
index 3c28366..bc19fd2 100644
--- a/src/sync-intro-certificate.h
+++ b/src/sync-intro-certificate.h
@@ -11,8 +11,8 @@
 #ifndef SYNC_INTRO_CERTIFICATE_H
 #define SYNC_INTRO_CERTIFICATE_H
 
-#include <ndn-cpp-dev/security/identity-certificate.hpp>
-#include <ndn-cpp-dev/security/signature-sha256-with-rsa.hpp>
+#include <ndn-cxx/security/identity-certificate.hpp>
+#include <ndn-cxx/security/signature-sha256-with-rsa.hpp>
 
 namespace Sync {
 
@@ -29,7 +29,7 @@
 
   IntroCertificate()
   {}
-  
+
   /**
    * @brief Construct IntroCertificate from IdentityCertificate
    *
@@ -43,7 +43,7 @@
 
   /**
    * @brief Construct IntroCertificate using a plain data.
-   * 
+   *
    * if data is not actually IntroCertificate, Error will be thrown out.
    *
    * @param data
@@ -94,7 +94,7 @@
     .append(m_introduceeCertName.wireEncode())
     .append(m_introducerCertName.wireEncode())
     .appendVersion();
-  
+
   setName(dataName);
   setContent(m_introduceeCert.wireEncode());
 }
diff --git a/src/sync-leaf.cc b/src/sync-leaf.cc
index 03e2217..e01b192 100644
--- a/src/sync-leaf.cc
+++ b/src/sync-leaf.cc
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #include "sync-leaf.h"
diff --git a/src/sync-leaf.h b/src/sync-leaf.h
index 345be46..a85544e 100644
--- a/src/sync-leaf.h
+++ b/src/sync-leaf.h
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #ifndef SYNC_LEAF_H
@@ -42,7 +42,7 @@
    */
   Leaf (NameInfoConstPtr info, const SeqNo &seq);
   virtual ~Leaf ();
-  
+
   /**
    * @brief Get name of the leaf
    */
@@ -63,7 +63,7 @@
    */
   virtual void
   setSeq (const SeqNo &seq);
-  
+
 private:
   NameInfoConstPtr m_info;
   SeqNo m_seq;
diff --git a/src/sync-logging.cc b/src/sync-logging.cc
index 9048964..3a63232 100644
--- a/src/sync-logging.cc
+++ b/src/sync-logging.cc
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #include "sync-logging.h"
@@ -43,7 +43,7 @@
   static bool configured = false;
 
   if (configured) return;
-  
+
   if (access ("log4cxx.properties", R_OK)==0)
     PropertyConfigurator::configureAndWatch ("log4cxx.properties");
   else
diff --git a/src/sync-logging.h b/src/sync-logging.h
index 865204a..2bdc36b 100644
--- a/src/sync-logging.h
+++ b/src/sync-logging.h
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #ifndef SYNC_LOG_H
diff --git a/src/sync-logic-event-container.h b/src/sync-logic-event-container.h
index ebab72a..fc79282 100644
--- a/src/sync-logic-event-container.h
+++ b/src/sync-logic-event-container.h
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #ifndef SYNC_LOGIC_EVENT_CONTAINER_H
@@ -49,7 +49,7 @@
     , event (_event)
     , lbl (_label)
   { }
-  
+
   boost::system_time time;
   Event event;
   uint32_t lbl;
diff --git a/src/sync-logic.cc b/src/sync-logic.cc
index 56692e5..86fb69b 100644
--- a/src/sync-logic.cc
+++ b/src/sync-logic.cc
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  *         Yingdi Yu <yingdi@cs.ucla.edu>
  */
 
@@ -61,7 +61,7 @@
 
 SyncLogic::SyncLogic (const Name& syncPrefix,
                       const IdentityCertificate& myCertificate,
-                      shared_ptr<Validator> validator, 
+                      shared_ptr<Validator> validator,
                       shared_ptr<Face> face,
                       LogicUpdateCallback onUpdate,
                       LogicRemoveCallback onRemove)
@@ -79,11 +79,11 @@
   , m_rangeUniformRandom (m_randomGenerator, boost::uniform_int<> (200,1000))
   , m_reexpressionJitter (m_randomGenerator, boost::uniform_int<> (100,500))
   , m_recoveryRetransmissionInterval (m_defaultRecoveryRetransmitInterval)
-{ 
-  m_syncRegisteredPrefixId = m_face->setInterestFilter (m_syncPrefix, 
-                                                        bind(&SyncLogic::onSyncInterest, this, _1, _2), 
+{
+  m_syncRegisteredPrefixId = m_face->setInterestFilter (m_syncPrefix,
+                                                        bind(&SyncLogic::onSyncInterest, this, _1, _2),
                                                         bind(&SyncLogic::onSyncRegisterFailed, this, _1, _2));
-  
+
 
   m_reexpressingInterestId = m_scheduler.scheduleEvent (time::seconds (0), // no need to add jitter
                                                         bind (&SyncLogic::sendSyncInterest, this));
@@ -109,9 +109,9 @@
   , m_rangeUniformRandom (m_randomGenerator, boost::uniform_int<> (200,1000))
   , m_reexpressionJitter (m_randomGenerator, boost::uniform_int<> (100,500))
   , m_recoveryRetransmissionInterval (m_defaultRecoveryRetransmitInterval)
-{ 
-  m_syncRegisteredPrefixId = m_face->setInterestFilter (m_syncPrefix, 
-                                                        bind(&SyncLogic::onSyncInterest, this, _1, _2), 
+{
+  m_syncRegisteredPrefixId = m_face->setInterestFilter (m_syncPrefix,
+                                                        bind(&SyncLogic::onSyncInterest, this, _1, _2),
                                                         bind(&SyncLogic::onSyncRegisterFailed, this, _1, _2));
 
   m_reexpressingInterestId = m_scheduler.scheduleEvent (time::seconds (0), // no need to add jitter
@@ -119,8 +119,8 @@
 }
 
 SyncLogic::~SyncLogic ()
-{ 
-  m_face->unsetInterestFilter(m_syncRegisteredPrefixId); 
+{
+  m_face->unsetInterestFilter(m_syncRegisteredPrefixId);
   m_scheduler.cancelEvent (m_reexpressingInterestId);
   m_scheduler.cancelEvent (m_delayedInterestProcessingId);
 }
@@ -128,7 +128,7 @@
 /**
  * Two types of intersts
  *
- * Normal name:    .../<hash>  
+ * Normal name:    .../<hash>
  * Recovery name:  .../recovery/<hash>
  */
 boost::tuple<DigestConstPtr, std::string>
@@ -139,10 +139,10 @@
   int nameLengthDiff = name.size() - m_syncPrefix.size();
   BOOST_ASSERT (nameLengthDiff > 0);
   BOOST_ASSERT (nameLengthDiff < 3);
-  
+
   std::string hash = name.get(-1).toEscapedString();
   std::string interestType;
-  
+
   if(nameLengthDiff == 1)
     interestType = "normal";
   else
@@ -180,7 +180,7 @@
         {
           processSyncInterest (name, digest);
         }
-      else if (type == "recovery") 
+      else if (type == "recovery")
         {
           processSyncRecoveryInterest (name, digest);
         }
@@ -204,13 +204,13 @@
 {
   OnDataValidated onValidated = bind(&SyncLogic::onSyncDataValidated, this, _1);
   OnDataValidationFailed onValidationFailed = bind(&SyncLogic::onSyncDataValidationFailed, this, _1);
-  m_validator->validate(data, onValidated, onValidationFailed); 
+  m_validator->validate(data, onValidated, onValidationFailed);
 }
 
 void
 SyncLogic::onSyncTimeout(const ndn::Interest& interest)
-{ 
-  // It is OK. Others will handle the time out situation. 
+{
+  // It is OK. Others will handle the time out situation.
 }
 
 void
@@ -229,7 +229,7 @@
   try
     {
       _LOG_DEBUG_ID ("<< D " << name);
-  
+
       DigestConstPtr digest;
       std::string type;
       tie (digest, type) = convertNameToDigestAndType (name);
@@ -265,7 +265,7 @@
   // Special case when state is not empty and we have received request with zero-root digest
   if (digest->isZero () && !rootDigest->isZero ())
     {
-      
+
       SyncStateMsg ssm;
       {
         ssm << (*m_state);
@@ -280,7 +280,7 @@
       m_syncInterestTable.insert (digest, name.toUri(), false);
       return;
     }
-  
+
   DiffStateContainer::iterator stateInDiffLog = m_log.find (digest);
 
   if (stateInDiffLog != m_log.end ())
@@ -300,7 +300,7 @@
           m_scheduler.cancelEvent (m_delayedInterestProcessingId);
         }
 
-      uint32_t waitDelay = GET_RANDOM (m_rangeUniformRandom);      
+      uint32_t waitDelay = GET_RANDOM (m_rangeUniformRandom);
       _LOG_DEBUG_ID ("Digest is not in the log. Schedule processing after small delay: " << time::milliseconds (waitDelay));
 
       m_delayedInterestProcessingId = m_scheduler.scheduleEvent (time::milliseconds (waitDelay),
@@ -309,7 +309,7 @@
   else
     {
       _LOG_DEBUG_ID ("                                                      (timed processing)");
-      
+
       m_recoveryRetransmissionInterval = m_defaultRecoveryRetransmitInterval;
       sendSyncRecoveryInterests (digest);
     }
@@ -320,7 +320,7 @@
 {
   DiffStatePtr diffLog = boost::make_shared<DiffState> ();
   bool ownInterestSatisfied = false;
-  
+
   try
     {
 
@@ -330,7 +330,7 @@
 
       DiffState diff;
       SyncStateMsg msg;
-      if (!msg.ParseFromArray(wireData, len) || !msg.IsInitialized()) 
+      if (!msg.ParseFromArray(wireData, len) || !msg.IsInitialized())
       {
         //Throw
         BOOST_THROW_EXCEPTION (Error::SyncStateMsgDecodingFailure () );
@@ -404,7 +404,7 @@
             }
         }
 
-      if (!v.empty()) 
+      if (!v.empty())
       {
         if (!m_perBranch)
         {
@@ -430,7 +430,7 @@
 
       // this is kind of wrong
       // satisfyPendingSyncInterests (diffLog); // if there are interests in PIT, there is a point to satisfy them using new state
-  
+
       // if state has changed, then it is safe to express a new interest
       time::system_clock::Duration after = time::milliseconds(GET_RANDOM (m_reexpressionJitter));
       // cout << "------------ reexpress interest after: " << after << endl;
@@ -472,7 +472,7 @@
         /// @todo Impose limit on how many state info should be send out
       }
   }
-  
+
   try
     {
       uint32_t counter = 0;
@@ -501,9 +501,9 @@
 }
 
 void
-SyncLogic::insertToDiffLog (DiffStatePtr diffLog) 
+SyncLogic::insertToDiffLog (DiffStatePtr diffLog)
 {
-  diffLog->setDigest (m_state->getDigest());  
+  diffLog->setDigest (m_state->getDigest());
   if (m_log.size () > 0)
     {
       m_log.get<sequenced> ().front ()->setNext (diffLog);
@@ -527,23 +527,23 @@
     m_state->update(info, seqN);
 
     _LOG_DEBUG_ID ("addLocalNames (): new state " << *m_state->getDigest ());
-    
+
     diff = boost::make_shared<DiffState>();
     diff->update(info, seqN);
     insertToDiffLog (diff);
   }
 
   // _LOG_DEBUG_ID ("PIT size: " << m_syncInterestTable.size ());
-  satisfyPendingSyncInterests (diff);  
+  satisfyPendingSyncInterests (diff);
 }
 
 void
-SyncLogic::remove(const Name &prefix) 
+SyncLogic::remove(const Name &prefix)
 {
   DiffStatePtr diff;
   {
     NameInfoConstPtr info = StdNameInfo::FindOrCreate(prefix.toUri());
-    m_state->remove(info);	
+    m_state->remove(info);
 
     // increment the sequence number for the forwarder node
     NameInfoConstPtr forwarderInfo = StdNameInfo::FindOrCreate(forwarderPrefix);
@@ -564,7 +564,7 @@
     insertToDiffLog (diff);
   }
 
-  satisfyPendingSyncInterests (diff);  
+  satisfyPendingSyncInterests (diff);
 }
 
 void
@@ -600,14 +600,14 @@
 {
   std::ostringstream os;
   os << *digest;
-  
+
   Name interestName = m_syncPrefix;
   interestName.append("recovery").append(os.str());
 
   time::system_clock::Duration nextRetransmission = time::milliseconds (m_recoveryRetransmissionInterval + GET_RANDOM (m_reexpressionJitter));
 
   m_recoveryRetransmissionInterval <<= 1;
-    
+
   m_scheduler.cancelEvent (m_reexpressingRecoveryInterestId);
   if (m_recoveryRetransmissionInterval < 100*1000) // <100 seconds
     m_reexpressingRecoveryInterestId = m_scheduler.scheduleEvent (nextRetransmission,
@@ -643,11 +643,11 @@
   Data syncData(name);
   syncData.setContent(reinterpret_cast<const uint8_t*>(wireData), size);
   syncData.setFreshnessPeriod(time::milliseconds(m_syncResponseFreshness));
-  
+
   m_keyChain.sign(syncData, m_myCertificate.getName());
-  
+
   m_face->put(syncData);
-  
+
   delete []wireData;
 
   // checking if our own interest got satisfied
@@ -655,11 +655,11 @@
   {
     satisfiedOwnInterest = (m_outstandingInterestName == name);
   }
-  
+
   if (satisfiedOwnInterest)
     {
       _LOG_DEBUG_ID ("Satisfied our own Interest. Re-expressing (hopefully with a new digest)");
-      
+
       time::system_clock::Duration after = time::milliseconds(GET_RANDOM (m_reexpressionJitter));
       // cout << "------------ reexpress interest after: " << after << endl;
       EventId eventId = m_scheduler.scheduleEvent (after,
@@ -670,7 +670,7 @@
 }
 
 std::string
-SyncLogic::getRootDigest() 
+SyncLogic::getRootDigest()
 {
   std::ostringstream os;
   os << *m_state->getDigest();
diff --git a/src/sync-logic.h b/src/sync-logic.h
index 98ab0aa..9d9f7fe 100644
--- a/src/sync-logic.h
+++ b/src/sync-logic.h
@@ -28,10 +28,10 @@
 #include <memory>
 #include <map>
 
-#include <ndn-cpp-dev/face.hpp>
-#include <ndn-cpp-dev/security/validator.hpp>
-#include <ndn-cpp-dev/security/key-chain.hpp>
-#include <ndn-cpp-dev/util/scheduler.hpp>
+#include <ndn-cxx/face.hpp>
+#include <ndn-cxx/security/validator.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
+#include <ndn-cxx/util/scheduler.hpp>
 
 #include "sync-interest-table.h"
 #include "sync-diff-state.h"
@@ -108,7 +108,7 @@
   std::map<std::string, bool>
   getBranchPrefixes() const;
 
-private: 
+private:
   void
   delayedChecksLoop ();
 
@@ -137,12 +137,12 @@
   void
   processSyncData (const ndn::Name &name,
                    DigestConstPtr digest, const char *wireData, size_t len);
-  
+
   void
   processSyncRecoveryInterest (const ndn::Name &name,
                                DigestConstPtr digest);
-  
-  void 
+
+  void
   insertToDiffLog (DiffStatePtr diff);
 
   void
@@ -167,7 +167,7 @@
 
   size_t
   getNumberOfBranches () const;
-  
+
 private:
   FullStatePtr m_state;
   DiffStateContainer m_log;
@@ -198,11 +198,11 @@
 
   static const int m_defaultRecoveryRetransmitInterval = 200; // milliseconds
   uint32_t m_recoveryRetransmissionInterval; // milliseconds
-  
+
   ndn::EventId m_delayedInterestProcessingId;
   ndn::EventId m_reexpressingInterestId;
   ndn::EventId m_reexpressingRecoveryInterestId;
-  
+
   std::string m_instanceId;
   static int m_instanceCounter;
 };
diff --git a/src/sync-name-info.cc b/src/sync-name-info.cc
index 30986cd..3054eac 100644
--- a/src/sync-name-info.cc
+++ b/src/sync-name-info.cc
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #include "sync-name-info.h"
diff --git a/src/sync-name-info.h b/src/sync-name-info.h
index 2f7c165..cb1125e 100644
--- a/src/sync-name-info.h
+++ b/src/sync-name-info.h
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #ifndef SYNC_NAME_INFO_H
@@ -39,7 +39,7 @@
 {
 private:
   typedef boost::weak_ptr<const NameInfo> const_weak_ptr;
-  
+
 public:
   virtual ~NameInfo () { };
 
@@ -75,7 +75,7 @@
    */
   virtual std::string
   toString () const = 0;
-  
+
 protected:
   // actual stuff
   size_t m_id; ///< @brief Identifies NameInfo throughout the library (for hash container, doesn't need to be strictly unique)
diff --git a/src/sync-seq-no.cc b/src/sync-seq-no.cc
index fbbc53f..0d2c8e8 100644
--- a/src/sync-seq-no.cc
+++ b/src/sync-seq-no.cc
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #include "sync-seq-no.h"
diff --git a/src/sync-seq-no.h b/src/sync-seq-no.h
index bf21704..81955e2 100644
--- a/src/sync-seq-no.h
+++ b/src/sync-seq-no.h
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  *         Yingdi Yu <yingdi@cs.ucla.edu>
  */
 
@@ -45,7 +45,7 @@
     , m_seq (0)
   {
   }
-  
+
   /**
    * @brief Copy constructor
    * @param seq sequence number object to copy from
@@ -145,7 +145,7 @@
   {
     return m_valid;
   }
-  
+
   /**
    * @brief Get session id
    */
@@ -164,10 +164,10 @@
    void
    setSeq(uint64_t seq)
    { m_seq = seq; }
-  
+
 private:
   bool m_valid;
-  
+
   /**
    * @brief Session ID (e.g., after crash, application will choose new session ID.
    *
diff --git a/src/sync-socket.h b/src/sync-socket.h
index 8013635..abf1dfa 100644
--- a/src/sync-socket.h
+++ b/src/sync-socket.h
@@ -21,10 +21,10 @@
 #ifndef _SYNC_SOCKET_H
 #define _SYNC_SOCKET_H
 
-#include <ndn-cpp-dev/face.hpp>
-#include <ndn-cpp-dev/security/validator.hpp>
-#include <ndn-cpp-dev/security/validator-null.hpp>
-#include <ndn-cpp-dev/security/key-chain.hpp>
+#include <ndn-cxx/face.hpp>
+#include <ndn-cxx/security/validator.hpp>
+#include <ndn-cxx/security/validator-null.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
 
 #include "sync-logic.h"
 #include "sync-seq-no.h"
@@ -51,7 +51,7 @@
 
   static const ndn::Name EMPTY_NAME;
 
-  SyncSocket(const ndn::Name& syncPrefix, 
+  SyncSocket(const ndn::Name& syncPrefix,
              const ndn::Name& dataPrefix,
              uint64_t dataSession,
              bool withRoutingPrefix,
@@ -59,7 +59,7 @@
              ndn::shared_ptr<ndn::Face> face,
              const ndn::IdentityCertificate& myCertificate,
              ndn::shared_ptr<ndn::SecRuleRelative> dataRule,
-             NewDataCallback dataCallback, 
+             NewDataCallback dataCallback,
              RemoveCallback rmCallback);
 
   ~SyncSocket();
@@ -67,10 +67,10 @@
   void
   publishData(const uint8_t* buf, size_t len, int freshness, bool isCert = false);
 
-  void 
-  leave() 
-  { 
-    m_syncLogic->remove(m_withRoutingPrefix ? m_routableDataPrefix : m_dataPrefix); 
+  void
+  leave()
+  {
+    m_syncLogic->remove(m_withRoutingPrefix ? m_routableDataPrefix : m_dataPrefix);
   }
 
   void
@@ -79,13 +79,13 @@
     m_syncLogic->remove(prefix);
   }
 
-  void 
+  void
   fetchData(const ndn::Name &prefix, const SeqNo &seq, const ndn::OnDataValidated& onValidated, int retry = 0);
 
-  std::string 
-  getRootDigest() 
-  { 
-    return m_syncLogic->getRootDigest(); 
+  std::string
+  getRootDigest()
+  {
+    return m_syncLogic->getRootDigest();
   }
 
   uint64_t
@@ -93,7 +93,7 @@
   {
     // If DNS works, we should use pure m_dataprefix rather than the one with routing prefix.
     SequenceLog::iterator i = m_sequenceLog.find (m_withRoutingPrefix ? m_routableDataPrefix : m_dataPrefix);
-    
+
     if (i != m_sequenceLog.end ())
       {
         SeqNo s = i->second;
@@ -104,9 +104,9 @@
   }
 
   SyncLogic &
-  getLogic() 
-  { 
-    return *m_syncLogic; 
+  getLogic()
+  {
+    return *m_syncLogic;
   }
 
   void
@@ -149,16 +149,16 @@
   // // make this a static function so we don't have to create socket instance without
   // // knowing the local prefix. it's a wrong place for this function anyway
   // static std::string
-  // GetLocalPrefix (); 
-  
+  // GetLocalPrefix ();
+
 private:
   void
   publishDataInternal(ndn::shared_ptr<ndn::Data> data, bool isCert);
 
-  void 
-  passCallback(const std::vector<MissingDataInfo> &v) 
-  { 
-    m_newDataCallback(v, this); 
+  void
+  passCallback(const std::vector<MissingDataInfo> &v)
+  {
+    m_newDataCallback(v, this);
   }
 
   void
diff --git a/src/sync-state-leaf-container.h b/src/sync-state-leaf-container.h
index 48819aa..d14e635 100644
--- a/src/sync-state-leaf-container.h
+++ b/src/sync-state-leaf-container.h
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #ifndef SYNC_STATE_LEAF_CONTAINER
@@ -66,7 +66,7 @@
   }
 };
 
-/// @cond include_hidden 
+/// @cond include_hidden
 struct hashed { };
 struct ordered { };
 /// @endcond
@@ -85,7 +85,7 @@
       NameInfoHash,
       NameInfoEqual
       >,
-        
+
     mi::ordered_unique<
       mi::tag<ordered>,
       mi::const_mem_fun<Leaf, NameInfoConstPtr, &Leaf::getInfo>,
diff --git a/src/sync-state.cc b/src/sync-state.cc
index 6c374a4..839825b 100644
--- a/src/sync-state.cc
+++ b/src/sync-state.cc
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #include "sync-state.h"
@@ -33,7 +33,7 @@
 // using namespace std;
 using namespace boost;
 
-typedef error_info<struct tag_errmsg, std::string> info_str; 
+typedef error_info<struct tag_errmsg, std::string> info_str;
 
 using namespace Sync::Error;
 
@@ -44,7 +44,7 @@
 operator << (std::ostream &os, const State &state)
 {
   os << "<state>"; DEBUG_ENDL;
-  
+
   BOOST_FOREACH (shared_ptr<const Leaf> leaf, state.getLeaves ().get<ordered> ())
     {
       shared_ptr<const DiffLeaf> diffLeaf = dynamic_pointer_cast<const DiffLeaf> (leaf);
@@ -106,7 +106,7 @@
 
   if (doc.RootElement() == 0)
         BOOST_THROW_EXCEPTION (SyncXmlDecodingFailure () << info_str ("Empty XML"));
-  
+
   for (TiXmlElement *iterator = doc.RootElement()->FirstChildElement ("item");
        iterator != 0;
        iterator = iterator->NextSiblingElement("item"))
@@ -114,15 +114,15 @@
       TiXmlElement *name = iterator->FirstChildElement ("name");
       if (name == 0 || name->GetText() == 0)
         BOOST_THROW_EXCEPTION (SyncXmlDecodingFailure () << info_str ("<name> element is missing"));
-        
+
       NameInfoConstPtr info = StdNameInfo::FindOrCreate (name->GetText());
-      
+
       if (iterator->Attribute("action") == 0 || strcmp(iterator->Attribute("action"), "update") == 0)
         {
           TiXmlElement *seq = iterator->FirstChildElement ("seq");
           if (seq == 0)
             BOOST_THROW_EXCEPTION (SyncXmlDecodingFailure () << info_str ("<seq> element is missing"));
-          
+
           TiXmlElement *session = seq->FirstChildElement ("session");
           TiXmlElement *seqno = seq->FirstChildElement ("seqno");
 
diff --git a/src/sync-state.h b/src/sync-state.h
index 54ac9d9..a5a0f62 100644
--- a/src/sync-state.h
+++ b/src/sync-state.h
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #ifndef SYNC_STATE_H
@@ -38,9 +38,9 @@
 /**
  * \ingroup sync
  * @brief this prefix will be used for the dummy node which increases its sequence number whenever
- * a remove operation happens; this is to prevent the reversion of root digest when we prune 
+ * a remove operation happens; this is to prevent the reversion of root digest when we prune
  * a branch, i.e. help the root digest to be forward only
- * No corresponding data msg would be published and no attempt would be made to retrieve the 
+ * No corresponding data msg would be published and no attempt would be made to retrieve the
  * data msg
  */
 const std::string forwarderPrefix = "/d0n0t18ak/t0ps8cr8t";
@@ -57,7 +57,7 @@
 {
 public:
   virtual ~State () { };
-  
+
   /**
    * @brief Add or update leaf to the state tree
    *
@@ -78,9 +78,9 @@
    * @brief Get state leaves
    */
   const LeafContainer &
-  getLeaves () const 
+  getLeaves () const
   { return m_leaves; }
-  
+
 protected:
   LeafContainer m_leaves;
 };
diff --git a/src/sync-std-name-info.cc b/src/sync-std-name-info.cc
index 2c0313d..9685f2d 100644
--- a/src/sync-std-name-info.cc
+++ b/src/sync-std-name-info.cc
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #include "sync-std-name-info.h"
@@ -32,9 +32,9 @@
 StdNameInfo::FindOrCreate (const std::string &key)
 {
   // std::cout << "FindOrCreate: " << m_names.size () << "\n";
-  
+
   NameInfoConstPtr ret;
-  
+
   NameMap::iterator item = m_names.find (key);
   if (item != m_names.end ())
     {
@@ -47,7 +47,7 @@
       weak_ptr<const NameInfo> value (ret);
       std::pair<NameMap::iterator,bool> inserted =
         m_names.insert (make_pair (key, value));
-      
+
       BOOST_ASSERT (inserted.second); // previous call has to insert value
       item = inserted.first;
     }
diff --git a/src/sync-std-name-info.h b/src/sync-std-name-info.h
index 83bbebb..2385074 100644
--- a/src/sync-std-name-info.h
+++ b/src/sync-std-name-info.h
@@ -17,7 +17,7 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #ifndef SYNC_STD_NAME_INFO_H
@@ -42,7 +42,7 @@
    * @brief Destructor which will clean up m_names structure
    */
   virtual ~StdNameInfo ();
-  
+
   // from NameInfo
   virtual bool
   operator == (const NameInfo &info) const;
@@ -54,7 +54,7 @@
   toString () const;
 
 private:
-  // implementing a singleton pattern. 
+  // implementing a singleton pattern.
   /**
    * @brief Disabled default constructor. NameInfo object should be created through FindOrCreate static call.
    */
@@ -65,7 +65,7 @@
   StdNameInfo () {}
   StdNameInfo& operator = (const StdNameInfo &info) { (void)info; return *this; }
   StdNameInfo (const std::string &name);
-  
+
   std::string m_name;
 };
 
diff --git a/src/sync-validator.cc b/src/sync-validator.cc
index 69e9232..72e45df 100644
--- a/src/sync-validator.cc
+++ b/src/sync-validator.cc
@@ -10,7 +10,7 @@
 
 #include "sync-validator.h"
 #include "sync-logging.h"
-#include <ndn-cpp-dev/security/certificate-cache-ttl.hpp>
+#include <ndn-cxx/security/certificate-cache-ttl.hpp>
 #include <queue>
 
 using namespace ndn;
@@ -40,7 +40,7 @@
   , m_dataRule(rule)
 {
   if(!static_cast<bool>(m_certificateCache))
-    m_certificateCache = make_shared<CertificateCacheTtl>(m_face.ioService());
+    m_certificateCache = make_shared<CertificateCacheTtl>(boost::ref(m_face.getIoService()));
 
   Name certPrefix = prefix;
   certPrefix.append("CHRONOS-INTRO-CERT");
diff --git a/src/sync-validator.h b/src/sync-validator.h
index 65f14a3..20ef3c0 100644
--- a/src/sync-validator.h
+++ b/src/sync-validator.h
@@ -12,10 +12,10 @@
 #define SYNC_VALIDATOR_H
 
 #include "sync-intro-certificate.h"
-#include <ndn-cpp-dev/security/validator.hpp>
-#include <ndn-cpp-dev/security/key-chain.hpp>
-#include <ndn-cpp-dev/security/sec-rule-relative.hpp>
-#include <ndn-cpp-dev/security/certificate-cache.hpp>
+#include <ndn-cxx/security/validator.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
+#include <ndn-cxx/security/sec-rule-relative.hpp>
+#include <ndn-cxx/security/certificate-cache.hpp>
 #include <map>
 
 namespace Sync {
diff --git a/tests/test-socket.cc b/tests/test-socket.cc
index 61519f8..a9bdf29 100644
--- a/tests/test-socket.cc
+++ b/tests/test-socket.cc
@@ -17,11 +17,11 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #include <boost/test/unit_test.hpp>
-#include <boost/test/output_test_stream.hpp> 
+#include <boost/test/output_test_stream.hpp>
 using boost::test_tools::output_test_stream;
 
 #include <boost/make_shared.hpp>
@@ -30,7 +30,7 @@
 #include "sync-logging.h"
 #include "sync-socket.h"
 #include "sync-validator.h"
-#include <ndn-cpp-dev/security/validator-null.hpp>
+#include <ndn-cxx/security/validator-null.hpp>
 
 extern "C" {
 #include <unistd.h>
@@ -42,7 +42,7 @@
 
 INIT_LOGGER ("Test.AppSocket");
 
-#define PRINT 
+#define PRINT
 // std::cout << "Line: " << __LINE__ << std::endl;
 
 class TestSocketApp {
@@ -64,7 +64,7 @@
     string str2(buf, len);
     data.insert(make_pair(name, str2));
   }
-  
+
   void setNum(const ndn::shared_ptr<const ndn::Data>& data) {
     int n = data->getContent().value_size() / 4;
     uint32_t *numbers = new uint32_t [n];
@@ -120,7 +120,7 @@
   }
 
   string toString(){
-    map<ndn::Name, string>::iterator it = data.begin(); 
+    map<ndn::Name, string>::iterator it = data.begin();
     string str = "\n";
     for (; it != data.end(); ++it){
       str += "<";
@@ -169,7 +169,7 @@
                       m_face1,
                       *m_id1,
                       m_rule,
-                      bind(&TestSocketApp::fetchAll, &m_a1, _1, _2), 
+                      bind(&TestSocketApp::fetchAll, &m_a1, _1, _2),
                       bind(&TestSocketApp::pass, &m_a1, _1)));
 
     m_s1->addParticipant(*m_id2);
@@ -189,13 +189,13 @@
                       m_face2,
                       *m_id2,
                       m_rule,
-                      bind(&TestSocketApp::fetchAll, &m_a2, _1, _2), 
+                      bind(&TestSocketApp::fetchAll, &m_a2, _1, _2),
                       bind(&TestSocketApp::pass, &m_a2, _1)));
 
     m_s2->addParticipant(*m_id1);
     m_s2->addParticipant(*m_id3);
   }
-  
+
   void
   createSyncSocket3()
   {
@@ -209,8 +209,8 @@
                       "/",
                       m_face3,
                       *m_id3,
-                      m_rule,  
-                      bind(&TestSocketApp::fetchAll, &m_a3, _1, _2), 
+                      m_rule,
+                      bind(&TestSocketApp::fetchAll, &m_a3, _1, _2),
                       bind(&TestSocketApp::pass, &m_a3, _1)));
 
     m_s3->addParticipant(*m_id2);
@@ -220,21 +220,21 @@
   publishSocket1(string data)
   {
     _LOG_DEBUG ("s1 publish");
-    m_s1->publishData (reinterpret_cast<const uint8_t*>(data.c_str()), data.size(), 1000); 
+    m_s1->publishData (reinterpret_cast<const uint8_t*>(data.c_str()), data.size(), 1000);
   }
 
   void
   publishSocket2(string data)
   {
     _LOG_DEBUG ("s2 publish");
-    m_s2->publishData (reinterpret_cast<const uint8_t*>(data.c_str()), data.size(), 1000); 
+    m_s2->publishData (reinterpret_cast<const uint8_t*>(data.c_str()), data.size(), 1000);
   }
 
   void
   publishSocket3(string data)
   {
     _LOG_DEBUG ("s3 publish");
-    m_s3->publishData (reinterpret_cast<const uint8_t*>(data.c_str()), data.size(), 1000); 
+    m_s3->publishData (reinterpret_cast<const uint8_t*>(data.c_str()), data.size(), 1000);
   }
 
   void
@@ -243,7 +243,7 @@
     _LOG_DEBUG ("a1 set");
     ndn::Name name("/irl.cs.ucla.edu");
     name.append(suffix);
-    m_a1.set (name, data.c_str(), data.size()); 
+    m_a1.set (name, data.c_str(), data.size());
   }
 
   void
@@ -252,7 +252,7 @@
     _LOG_DEBUG ("a2 set");
     ndn::Name name("/yakshi.org");
     name.append(suffix);
-    m_a2.set (name, data.c_str(), data.size()); 
+    m_a2.set (name, data.c_str(), data.size());
   }
 
   void
@@ -261,12 +261,12 @@
     _LOG_DEBUG ("a3 set");
     ndn::Name name("/google.com");
     name.append(suffix);
-    m_a3.set (name, data.c_str(), data.size()); 
+    m_a3.set (name, data.c_str(), data.size());
   }
 
   void
   check(int round)
-  { 
+  {
     BOOST_CHECK_EQUAL(m_a1.toString(), m_a2.toString());
     BOOST_CHECK_EQUAL(m_a2.toString(), m_a3.toString());
   }
@@ -315,17 +315,17 @@
   createSyncSocket1()
   {
     _LOG_DEBUG ("s1");
-    
+
     m_s1 = ndn::shared_ptr<SyncSocket>
       (new SyncSocket("/this/is/the/prefix",
                       "/xiaonei.com",
                       0,
                       false,
-                      "/",                                        
+                      "/",
                       m_face1,
                       *m_id1,
                       m_rule,
-                      bind(&TestSocketApp::fetchNumbers, &m_a1, _1, _2), 
+                      bind(&TestSocketApp::fetchNumbers, &m_a1, _1, _2),
                       bind(&TestSocketApp::pass, &m_a1, _1)));
 
     m_s1->addParticipant(*m_id2);
@@ -345,43 +345,43 @@
                       m_face2,
                       *m_id2,
                       m_rule,
-                      bind(&TestSocketApp::fetchNumbers, &m_a2, _1, _2), 
+                      bind(&TestSocketApp::fetchNumbers, &m_a2, _1, _2),
                       bind(&TestSocketApp::pass, &m_a2, _1)));
 
     m_s2->addParticipant(*m_id1);
   }
-  
+
   void
   publishSocket1(string data)
   {
     _LOG_DEBUG ("s1 publish");
-    m_s1->publishData (reinterpret_cast<const uint8_t*>(data.c_str()), data.size(), 1000); 
+    m_s1->publishData (reinterpret_cast<const uint8_t*>(data.c_str()), data.size(), 1000);
   }
 
   void
   publishSocket2(string data)
   {
     _LOG_DEBUG ("s2 publish");
-    m_s2->publishData (reinterpret_cast<const uint8_t*>(data.c_str()), data.size(), 1000); 
+    m_s2->publishData (reinterpret_cast<const uint8_t*>(data.c_str()), data.size(), 1000);
   }
 
   void
   setSocket1(const char* ptr, size_t size)
   {
     _LOG_DEBUG ("a1 setNum");
-    m_a1.setNum ("/xiaonei.com", ptr, size); 
+    m_a1.setNum ("/xiaonei.com", ptr, size);
   }
 
   void
   setSocket2(const char* ptr, size_t size)
   {
     _LOG_DEBUG ("a2 setNum");
-    m_a2.setNum ("/mitbbs.com", ptr, size); 
+    m_a2.setNum ("/mitbbs.com", ptr, size);
   }
 
   void
   check(int num)
-  { 
+  {
     _LOG_DEBUG ("codnum " << num);
     _LOG_DEBUG ("a1 sum " << m_a1.sum);
     _LOG_DEBUG ("a2 sum " << m_a2.sum);
@@ -433,17 +433,17 @@
   createSyncSocket1()
   {
     _LOG_DEBUG ("s1");
-    
+
     m_s1 = ndn::shared_ptr<SyncSocket>
       (new SyncSocket("/this/is/the/prefix",
                       "/xiaonei.com",
                       1,
                       true,
-                      "/abc",                                        
+                      "/abc",
                       m_face1,
                       *m_id1,
                       m_rule,
-                      bind(&TestSocketApp::fetchNumbers, &m_a1, _1, _2), 
+                      bind(&TestSocketApp::fetchNumbers, &m_a1, _1, _2),
                       bind(&TestSocketApp::pass, &m_a1, _1)));
 
     m_s1->addParticipant(*m_id2);
@@ -463,43 +463,43 @@
                       m_face2,
                       *m_id2,
                       m_rule,
-                      bind(&TestSocketApp::fetchNumbers, &m_a2, _1, _2), 
+                      bind(&TestSocketApp::fetchNumbers, &m_a2, _1, _2),
                       bind(&TestSocketApp::pass, &m_a2, _1)));
 
     m_s2->addParticipant(*m_id1);
   }
-  
+
   void
   publishSocket1(string data)
   {
     _LOG_DEBUG ("s1 publish");
-    m_s1->publishData (reinterpret_cast<const uint8_t*>(data.c_str()), data.size(), 1000); 
+    m_s1->publishData (reinterpret_cast<const uint8_t*>(data.c_str()), data.size(), 1000);
   }
 
   void
   publishSocket2(string data)
   {
     _LOG_DEBUG ("s2 publish");
-    m_s2->publishData (reinterpret_cast<const uint8_t*>(data.c_str()), data.size(), 1000); 
+    m_s2->publishData (reinterpret_cast<const uint8_t*>(data.c_str()), data.size(), 1000);
   }
 
   void
   setSocket1(const char* ptr, size_t size)
   {
     _LOG_DEBUG ("a1 setNum");
-    m_a1.setNum ("/xiaonei.com", ptr, size); 
+    m_a1.setNum ("/xiaonei.com", ptr, size);
   }
 
   void
   setSocket2(const char* ptr, size_t size)
   {
     _LOG_DEBUG ("a2 setNum");
-    m_a2.setNum ("/mitbbs.com", ptr, size); 
+    m_a2.setNum ("/mitbbs.com", ptr, size);
   }
 
   void
   check(int num)
-  { 
+  {
     _LOG_DEBUG ("codnum " << num);
     _LOG_DEBUG ("a1 sum " << m_a1.sum);
     _LOG_DEBUG ("a2 sum " << m_a2.sum);
@@ -543,7 +543,7 @@
   string data0 = "Very funny Scotty, now beam down my clothes";
   scheduler.scheduleEvent(ndn::time::milliseconds(150), ndn::bind(&TestSet1::publishSocket1, &testSet1, data0));
   scheduler.scheduleEvent(ndn::time::milliseconds(1150), ndn::bind(&TestSet1::setSocket1, &testSet1, "/0/1", data0));
-  scheduler.scheduleEvent(ndn::time::milliseconds(1160), ndn::bind(&TestSet1::check, &testSet1, 1)); 
+  scheduler.scheduleEvent(ndn::time::milliseconds(1160), ndn::bind(&TestSet1::check, &testSet1, 1));
   string data1 = "Yes, give me that ketchup";
   string data2 = "Don't look conspicuous, it draws fire";
   scheduler.scheduleEvent(ndn::time::milliseconds(1170), ndn::bind(&TestSet1::publishSocket1, &testSet1, data1));
diff --git a/tests/test-sync-logic.cc b/tests/test-sync-logic.cc
index d430a46..84a28cb 100644
--- a/tests/test-sync-logic.cc
+++ b/tests/test-sync-logic.cc
@@ -17,17 +17,17 @@
  *
  * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
  *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
 #include <boost/test/unit_test.hpp>
-#include <boost/test/output_test_stream.hpp> 
+#include <boost/test/output_test_stream.hpp>
 #include <map>
 using boost::test_tools::output_test_stream;
 
 #include <boost/make_shared.hpp>
 
-#include <ndn-cpp-dev/security/validator-null.hpp>
+#include <ndn-cxx/security/validator-null.hpp>
 #include "sync-logic.h"
 #include "sync-seq-no.h"
 
@@ -38,7 +38,7 @@
 struct Handler
 {
   string instance;
-  
+
   Handler (const string &_instance)
   : instance (_instance)
   {
@@ -54,7 +54,7 @@
   void onUpdate (const string &p/*prefix*/, const SeqNo &seq/*newSeq*/, const SeqNo &oldSeq/*oldSeq*/)
   {
     m_map[p] = seq.getSeq ();
-    
+
     // cout << instance << "\t";
     // if (!oldSeq.isValid ())
     //   cout << "Inserted: " << p << " (" << seq << ")" << endl;
@@ -79,10 +79,10 @@
   {
     m_l[0] = 0;
     m_l[1] = 0;
-    
+
     m_validator = ndn::make_shared<ndn::ValidatorNull>();
   }
-  
+
   ~TestCore()
   {
     if(m_l[0] != 0)
@@ -97,19 +97,19 @@
   {
     ioService->stop();
   }
-  
+
   void
-  createSyncLogic(int index, 
+  createSyncLogic(int index,
                   ndn::shared_ptr<Handler> h)
-  { 
+  {
     ndn::Name identity("/tmp-" + boost::lexical_cast<std::string>(ndn::time::toUnixTimestamp(ndn::time::system_clock::now()).count()));
     ndn::shared_ptr<ndn::IdentityCertificate> cert = m_keyChain.getCertificate(m_keyChain.createIdentity(identity));
     m_faces[index] = ndn::make_shared<ndn::Face>(m_ioService);
-    m_l[index] = new SyncLogic(ndn::Name("/bcast"), 
+    m_l[index] = new SyncLogic(ndn::Name("/bcast"),
                                *cert,
-                               m_validator, m_faces[index], 
-                               bind (&Handler::wrapper, &*h, _1), 
-                               bind (&Handler::onRemove, &*h, _1)); 
+                               m_validator, m_faces[index],
+                               bind (&Handler::wrapper, &*h, _1),
+                               bind (&Handler::onRemove, &*h, _1));
   }
 
   void
@@ -117,7 +117,7 @@
   {
     m_oldDigest = m_l[0]->getRootDigest();
   }
-  
+
   void
   getNewDigestForOne()
   {
@@ -135,7 +135,7 @@
   {
     m_l[0]->remove(name);
   }
-  
+
   void
   checkDigest()
   {
@@ -178,7 +178,7 @@
   scheduler.scheduleEvent(ndn::time::milliseconds(800), ndn::bind(&TestCore::getNewDigestForOne, &testCore));
   scheduler.scheduleEvent(ndn::time::milliseconds(900), ndn::bind(&TestCore::checkDigest, &testCore));
   scheduler.scheduleEvent(ndn::time::milliseconds(1000), ndn::bind(&TestCore::finish, &testCore, ioService));
-  
+
   ioService->run();
 
 }
diff --git a/wscript b/wscript
index ad6a1f9..dff5965 100644
--- a/wscript
+++ b/wscript
@@ -31,8 +31,8 @@
     else:
         conf.add_supported_cxxflags (cxxflags = ['-O3', '-g'])
 
-    conf.check_cfg(package='libndn-cpp-dev', args=['--cflags', '--libs'], uselib_store='NDNCPP', mandatory=True)
-    
+    conf.check_cfg(package='libndn-cxx', args=['--cflags', '--libs'], uselib_store='NDNCXX', mandatory=True)
+
     conf.check_cfg(package='openssl', args=['--cflags', '--libs'], uselib_store='OPENSSL', mandatory=True)
 
     conf.check_boost(lib='system iostreams thread unit_test_framework')
@@ -56,10 +56,10 @@
         # vnum = "1.0.0",
         features=['cxx', 'cxxshlib'],
         source =  bld.path.ant_glob (['src/**/*.cc', 'src/**/*.proto']),
-        use = 'BOOST NDNCPP OPENSSL',
+        use = 'BOOST NDNCXX OPENSSL',
         includes = ['src'],
         )
-    
+
     # Unit tests
     if bld.get_define("_TEST"):
       unittests = bld.program (
@@ -77,15 +77,15 @@
             unittests.use += ' LOG4CXX'
 
     bld.install_files (
-        dest = "%s/ChronoSync" % bld.env['INCLUDEDIR'], 
-        files = bld.path.ant_glob(['src/**/*.h']), 
+        dest = "%s/ChronoSync" % bld.env['INCLUDEDIR'],
+        files = bld.path.ant_glob(['src/**/*.h']),
         cwd = bld.path.find_dir ("src"),
         relative_trick = True,
         )
 
     bld.install_files (
-        dest = "%s/ChronoSync" % bld.env['INCLUDEDIR'], 
-        files = bld.path.get_bld().ant_glob(['src/**/*.h']), 
+        dest = "%s/ChronoSync" % bld.env['INCLUDEDIR'],
+        files = bld.path.get_bld().ant_glob(['src/**/*.h']),
         cwd = bld.path.get_bld().find_dir ("src"),
         relative_trick = True,
         )
