diff --git a/include/ccnx-closure.h b/include/ccnx-closure.h
index 54306d6..01358c4 100644
--- a/include/ccnx-closure.h
+++ b/include/ccnx-closure.h
@@ -7,7 +7,7 @@
 
 namespace Ccnx {
 
-class Closure 
+class Closure
 {
 public:
   typedef boost::function<void (const string &, const Bytes &)> DataCallback;
@@ -25,15 +25,15 @@
   int getRetry() {return m_retry;}
   void decRetry() { m_retry--;}
   virtual ~Closure();
-  virtual void 
+  virtual void
   runDataCallback(const string &name, const Bytes &content);
-  virtual TimeoutCallbackReturnValue 
+  virtual TimeoutCallbackReturnValue
   runTimeoutCallback(const string &interest);
 
 protected:
   int m_retry;
   TimeoutCallback *m_timeoutCallback;
-  DataCallback *m_dataCallback;  
+  DataCallback *m_dataCallback;
 };
 
 } // Ccnx
diff --git a/include/ccnx-pco.h b/include/ccnx-pco.h
index 1357333..829e0cc 100644
--- a/include/ccnx-pco.h
+++ b/include/ccnx-pco.h
@@ -10,7 +10,7 @@
 
 struct MisformedContentObjectException : virtual boost::exception, virtual exception { };
 
-class ParsedContentObject 
+class ParsedContentObject
 {
 public:
   ParsedContentObject(const unsigned char *data, size_t len);
diff --git a/include/ccnx-tunnel.h b/include/ccnx-tunnel.h
index af49a9b..dff2f50 100644
--- a/include/ccnx-tunnel.h
+++ b/include/ccnx-tunnel.h
@@ -6,7 +6,7 @@
 #include "ccnx-common.h"
 #include "ccnx-wrapper.h"
 
-#define _OVERRIDE 
+#define _OVERRIDE
 #ifdef __GNUC__
 #if __GNUC_MAJOR >= 4 && __GNUC_MINOR__ >= 7
   #undef _OVERRIDE
@@ -16,19 +16,19 @@
 
 using namespace std;
 
-// Eventually, Sync::CcnxWrapper should be moved to this namespace. 
+// Eventually, Sync::CcnxWrapper should be moved to this namespace.
 // It has nothing to do with Sync.
 namespace Ccnx
 {
 
-class CcnxTunnel : public CcnxWrapper 
+class CcnxTunnel : public CcnxWrapper
 {
-public: 
+public:
   typedef multimap<string, InterestCallback> RegisteredInterestTable;
   typedef multimap<string, InterestCallback>::iterator RitIter;
 
 
-  CcnxTunnel(); 
+  CcnxTunnel();
   virtual ~CcnxTunnel();
 
   // name is topology-independent
@@ -70,7 +70,7 @@
 
   void
   handleTunneledInterest(const string &tunneldInterest);
-  
+
   void
   handleTunneledData(const string &name, const Bytes &tunneledData, const Closure::DataCallback &originalDataCallback);
 
@@ -88,7 +88,7 @@
 
   TunnelClosure(const Closure *closure, CcnxTunnel *tunnel, const string &originalInterest);
 
-  virtual void 
+  virtual void
   runDataCallback(const string &name, const Bytes &content) _OVERRIDE;
 
   virtual TimeoutCallbackReturnValue
diff --git a/include/ccnx-wrapper.h b/include/ccnx-wrapper.h
index e5754da..9b50ae8 100644
--- a/include/ccnx-wrapper.h
+++ b/include/ccnx-wrapper.h
@@ -24,7 +24,7 @@
 
 struct CcnxOperationException : virtual boost::exception, virtual exception { };
 
-class CcnxWrapper 
+class CcnxWrapper
 {
 public:
   typedef boost::shared_mutex Lock;
@@ -45,10 +45,10 @@
   virtual void
   clearInterestFilter (const string &prefix);
 
-  virtual int 
+  virtual int
   sendInterest (const Interest &interest, Closure *closure);
 
-  virtual int 
+  virtual int
   publishData (const string &name, const unsigned char *buf, size_t len, int freshness);
 
   int
@@ -64,14 +64,14 @@
   Bytes
   createContentObject(const string &name, const unsigned char *buf, size_t len, int freshness);
 
-  int 
+  int
   putToCcnd (const Bytes &contentObject);
-  
+
 protected:
   void
   connectCcnd();
 
-  /// @cond include_hidden 
+  /// @cond include_hidden
   void
   createKeyLocator ();
 
@@ -110,4 +110,4 @@
 
 } // Ccnx
 
-#endif 
+#endif
diff --git a/src/ccnx-closure.cpp b/src/ccnx-closure.cpp
index 43b0d65..5b24f66 100644
--- a/src/ccnx-closure.cpp
+++ b/src/ccnx-closure.cpp
@@ -6,7 +6,7 @@
               : m_retry(retry), m_timeoutCallback(NULL)
 {
   m_timeoutCallback = new TimeoutCallback (timeoutCallback);
-  m_dataCallback = new DataCallback (dataCallback); 
+  m_dataCallback = new DataCallback (dataCallback);
 }
 
 Closure::Closure(const Closure &other)
@@ -14,7 +14,7 @@
   Closure(other.m_retry, *(other.m_dataCallback), *(other.m_timeoutCallback));
 }
 
-Closure::~Closure () 
+Closure::~Closure ()
 {
   delete m_dataCallback;
   delete m_timeoutCallback;
@@ -22,20 +22,20 @@
   m_timeoutCallback = NULL;
 }
 
-Closure::TimeoutCallbackReturnValue 
+Closure::TimeoutCallbackReturnValue
 Closure::runTimeoutCallback(const string &interest)
 {
   if ((*m_timeoutCallback).empty())
   {
     return RESULT_OK;
   }
-  
+
   return (*m_timeoutCallback)(interest);
 }
 
 
-void 
-Closure::runDataCallback(const string &name, const Bytes &content) 
+void
+Closure::runDataCallback(const string &name, const Bytes &content)
 {
   if (m_dataCallback != NULL) {
     (*m_dataCallback)(name, content);
diff --git a/src/ccnx-pco.cpp b/src/ccnx-pco.cpp
index df3bd06..1c24891 100644
--- a/src/ccnx-pco.cpp
+++ b/src/ccnx-pco.cpp
@@ -21,7 +21,7 @@
 
 ParsedContentObject::ParsedContentObject(const ParsedContentObject &other)
 {
-  ParsedContentObject(other.m_bytes); 
+  ParsedContentObject(other.m_bytes);
 }
 
 ParsedContentObject::~ParsedContentObject()
diff --git a/src/ccnx-tunnel.cpp b/src/ccnx-tunnel.cpp
index 281079f..06adae0 100644
--- a/src/ccnx-tunnel.cpp
+++ b/src/ccnx-tunnel.cpp
@@ -11,12 +11,12 @@
   refreshLocalPrefix();
 }
 
-CcnxTunnel::~CcnxTunnel() 
+CcnxTunnel::~CcnxTunnel()
 {
 }
 
 void
-CcnxTunnel::refreshLocalPrefix() 
+CcnxTunnel::refreshLocalPrefix()
 {
   string newPrefix = getLocalPrefix();
   if (!newPrefix.empty() && m_localPrefix != newPrefix)
@@ -36,7 +36,7 @@
   sendInterest(tunneledInterest, cp);
 }
 
-void 
+void
 CcnxTunnel::handleTunneledData(const string &name, const Bytes &tunneledData, const Closure::DataCallback &originalDataCallback)
 {
   ParsedContentObject pco(tunneledData);
@@ -48,7 +48,7 @@
 {
   Bytes content = createContentObject(name, buf, len, freshness);
   storeContentObject(name, content);
-  
+
   return publishContentObject(name, content, freshness);
 }
 
@@ -64,12 +64,12 @@
 CcnxTunnel::handleTunneledInterest(const string &tunneledInterest)
 {
   // The interest must have m_localPrefix as a prefix (component-wise), otherwise ccnd would not deliver it to us
-  string interest = (m_localPrefix == "/") 
+  string interest = (m_localPrefix == "/")
                     ? tunneledInterest
                     : tunneledInterest.substr(m_localPrefix.size());
 
-  ReadLock(m_ritLock); 
-  
+  ReadLock(m_ritLock);
+
   // This is linear scan, but should be acceptable under the assumption that the caller wouldn't be listening to a lot prefixes (as of now, most app listen to one or two prefixes)
   for (RitIter it = m_rit.begin(); it != m_rit.end(); it++)
   {
@@ -84,7 +84,7 @@
 bool
 CcnxTunnel::isPrefix(const string &prefix, const string &name)
 {
-  // prefix is literally prefix of name 
+  // prefix is literally prefix of name
   if (name.find(prefix) == 0)
   {
     // name and prefix are exactly the same, or the next character in name
@@ -97,7 +97,7 @@
   return false;
 }
 
-int 
+int
 CcnxTunnel::setInterestFilter(const string &prefix, const InterestCallback &interestCallback)
 {
   WriteLock(m_ritLock);
@@ -106,7 +106,7 @@
   return 0;
 }
 
-void 
+void
 CcnxTunnel::clearInterestFilter(const string &prefix)
 {
   WriteLock(m_ritLock);
@@ -127,7 +127,7 @@
 {
 }
 
-void 
+void
 TunnelClosure::runDataCallback(const string &name, const Bytes &content)
 {
   if (m_tunnel != NULL)
diff --git a/src/ccnx-wrapper.cpp b/src/ccnx-wrapper.cpp
index 041665e..d84dc0d 100644
--- a/src/ccnx-wrapper.cpp
+++ b/src/ccnx-wrapper.cpp
@@ -22,7 +22,7 @@
   if (len > 0)
   {
     bytes.resize(len);
-    memcpy(&bytes[0], src, len); 
+    memcpy(&bytes[0], src, len);
   }
 }
 
@@ -64,7 +64,7 @@
     ccn_disconnect (m_handle);
     ccn_destroy (&m_handle);
   }
-  
+
   m_handle = ccn_create ();
   if (ccn_connect(m_handle, NULL) < 0)
   {
@@ -88,7 +88,7 @@
     UniqueRecLock(m_mutex);
     m_running = false;
   }
-  
+
   m_thread.join ();
   ccn_disconnect (m_handle);
   ccn_destroy (&m_handle);
@@ -154,7 +154,7 @@
           }
 
           if (!m_running) break;
-        
+
           if (res < 0)
             BOOST_THROW_EXCEPTION (CcnxOperationException()
                                  << errmsg_info_str("ccn_run returned error"));
@@ -163,13 +163,13 @@
           pollfd pfds[1];
           {
             UniqueRecLock(m_mutex);
-          
+
             pfds[0].fd = ccn_get_connection_fd (m_handle);
             pfds[0].events = POLLIN;
             if (ccn_output_is_pending (m_handle))
               pfds[0].events |= POLLOUT;
           }
-        
+
           int ret = poll (pfds, 1, 1);
           if (ret < 0)
             {
@@ -216,9 +216,9 @@
           }
         catch (...)
           {
-            cout << "UNKNOWN EXCEPTION !!!" << endl; 
+            cout << "UNKNOWN EXCEPTION !!!" << endl;
           }
-     } 
+     }
 }
 
 Bytes
@@ -260,7 +260,7 @@
   UniqueRecLock(m_mutex);
   if (!m_running || !m_connected)
     return -1;
-  
+
 
   if (ccn_put(m_handle, head(contentObject), contentObject.size()) < 0)
   {
@@ -273,7 +273,7 @@
 int
 CcnxWrapper::publishData (const string &name, const unsigned char *buf, size_t len, int freshness)
 {
-  Bytes co = createContentObject(name, buf, len, freshness); 
+  Bytes co = createContentObject(name, buf, len, freshness);
   return putToCcnd(co);
 }
 
@@ -391,7 +391,7 @@
   UniqueRecLock(m_mutex);
   if (!m_running || !m_connected)
     return -1;
-  
+
   ccn_charbuf *pname = ccn_charbuf_create();
   ccn_closure *dataClosure = new ccn_closure;
 
@@ -456,9 +456,9 @@
     {
       return "";
     }
-  
+
   string retval = "";
-  
+
   struct ccn_charbuf *templ = ccn_charbuf_create();
   ccn_charbuf_append_tt(templ, CCN_DTAG_Interest, CCN_DTAG);
   ccn_charbuf_append_tt(templ, CCN_DTAG_Name, CCN_DTAG);
@@ -477,9 +477,9 @@
   else
     {
       struct ccn_fetch *fetch = ccn_fetch_new (tmp_handle);
-      
+
       struct ccn_fetch_stream *stream = ccn_fetch_open (fetch, name, "/local/ndn/prefix",
-                                                        NULL, 4, CCN_V_HIGHEST, 0);      
+                                                        NULL, 4, CCN_V_HIGHEST, 0);
       if (stream == NULL) {
       }
       else
@@ -490,11 +490,11 @@
           char buf[256];
           while (true) {
             res = ccn_fetch_read (stream, buf, sizeof(buf));
-            
+
             if (res == 0) {
               break;
             }
-            
+
             if (res > 0) {
               os << string(buf, res);
             } else if (res == CCN_FETCH_READ_NONE) {
@@ -525,7 +525,7 @@
 
   ccn_disconnect (tmp_handle);
   ccn_destroy (&tmp_handle);
-  
+
   return retval;
 }
 
