Small changes here and there
diff --git a/model/sync-app-data-fetch.cc b/model/sync-app-data-fetch.cc
index 76b6119..43e089b 100644
--- a/model/sync-app-data-fetch.cc
+++ b/model/sync-app-data-fetch.cc
@@ -28,16 +28,17 @@
 namespace Sync
 {
 
-void AppDataFetch::fetch(string prefix, uint32_t startSeq, uint32_t endSeq)
+void
+AppDataFetch::fetch (const string &prefix, uint32_t startSeq, uint32_t endSeq)
 {
   for (uint32_t i = startSeq; i <= endSeq; i++)
   {
     if (i == 0)
       continue;
-    string interestName = prefix;
-    interestName += i;
-    m_ccnxHandle->sendInterest(interestName, m_dataCallback);
+    ostringstream interestName;
+    interestName << prefix << "/" << i;
+    m_ccnxHandle->sendInterest (interestName.str (), m_dataCallback);
   }
 }
 
-}
\ No newline at end of file
+}
diff --git a/model/sync-app-data-fetch.h b/model/sync-app-data-fetch.h
index ae07679..3f368cb 100644
--- a/model/sync-app-data-fetch.h
+++ b/model/sync-app-data-fetch.h
@@ -22,9 +22,8 @@
 
 #ifndef SYNC_APP_DATA_FETCH_H
 #define SYNC_APP_DATA_FETCH_H
+
 #include "sync-ccnx-wrapper.h"
-#include <boost/function.hpp>
-#include <boost/shared_ptr.hpp>
 
 namespace Sync {
 
@@ -36,28 +35,40 @@
 class AppDataFetch
 {
 public:
-	/**
-	 * @param dataCallback the callback function to process data
-	 */
-	AppDataFetch(boost::shared_ptr<CcnxWrapper> ccnxHandle,
-		     boost::function<void (std::string, std::string)> dataCallback)
-	{ m_ccnxHandle = ccnxHandle; m_dataCallback = dataCallback; }
+  /**
+   * @brief Constructor
+   * @param ccnxHandle handle for CCNx
+   * @param dataCallback the callback function to process data
+   */
+  AppDataFetch (CcnxWrapperPtr ccnxHandle,
+                CcnxWrapper::DataCallback dataCallback)
+    : m_ccnxHandle (ccnxHandle)
+    , m_dataCallback (dataCallback)
+  { }
 
-	void setDataCallback(boost::function<void (std::string, std::string)> dataCallback)
-	{ m_dataCallback = dataCallback; }
+  /**
+   * @brief Set data callback
+   * @param dataCallback the callback function to process data
+   */
+  void
+  setDataCallback(CcnxWrapper::DataCallback dataCallback)
+  {
+    m_dataCallback = dataCallback;
+  }
 
-	/**
-	 * @brief fetch data for a certain name prefix
-	 *
-	 * @param prefix the prefix for the data
-	 * @param startSeq the start of sequence number range (inclusive)
-	 * @param endSeq the end of sequence number range (inclusive)
-	 */
-	void fetch(std::string prefix, uint32_t startSeq, uint32_t endSeq);
+  /**
+   * @brief Fetch data for a certain name prefix
+   *
+   * @param prefix the prefix for the data
+   * @param startSeq the start of sequence number range (inclusive)
+   * @param endSeq the end of sequence number range (inclusive)
+   */
+  void
+  fetch (const std::string &prefix, uint32_t startSeq, uint32_t endSeq);
 
 private:
-	boost::shared_ptr<CcnxWrapper> m_ccnxHandle;
-	boost::function<void (std::string, std::string)> m_dataCallback;
+  CcnxWrapperPtr m_ccnxHandle;
+  CcnxWrapper::DataCallback m_dataCallback;
 };
 
 
diff --git a/model/sync-app-data-publish.cc b/model/sync-app-data-publish.cc
index d05bcbe..77b9160 100644
--- a/model/sync-app-data-publish.cc
+++ b/model/sync-app-data-publish.cc
@@ -28,26 +28,29 @@
 namespace Sync
 {
 
-string AppDataPublish::getRecentData(string prefix, uint32_t session)
+string
+AppDataPublish::getRecentData (const string &prefix, uint32_t session)
 {
-
+  return "";
 }
 
-uint32_t AppDataPublish::getHighestSeq(string prefix, uint32_t session)
+uint32_t
+AppDataPublish::getHighestSeq (const string &prefix, uint32_t session)
 {
   unordered_map<string, Seq>::iterator i = m_sequenceLog.find(prefix);
 
   if (i != m_sequenceLog.end())
-  {
-    Seq s = i->second;
-    if (s.session == session)
-      return s.seq;
-  }
+    {
+      Seq s = i->second;
+      if (s.session == session)
+        return s.seq;
+    }
 
   return 0;
 }
 
-bool AppDataPublish::publishData(string name, uint32_t session, string dataBuffer, int freshness)
+bool
+AppDataPublish::publishData (const string &name, uint32_t session, const string &dataBuffer, int freshness)
 {
   uint32_t seq = getHighestSeq(name, session);
   if (seq == 0)
@@ -61,12 +64,12 @@
   s.seq = seq;
   m_sequenceLog[name] = s;
 
-  string contentName = name;
-  contentName += seq;
+  ostringstream contentNameWithSeqno;
+  contentNameWithSeqno << name << "/" << seq;
 
-  m_ccnxHandle->publishData(contentName, dataBuffer, freshness);
+  m_ccnxHandle->publishData (contentNameWithSeqno.str (), dataBuffer, freshness);
 
   return true;
 }
 
-}
\ No newline at end of file
+}
diff --git a/model/sync-app-data-publish.h b/model/sync-app-data-publish.h
index 1082904..d00588a 100644
--- a/model/sync-app-data-publish.h
+++ b/model/sync-app-data-publish.h
@@ -22,16 +22,11 @@
 
 #ifndef SYNC_APP_DATA_PUBLISH_H
 #define SYNC_APP_DATA_PUBLISH_H
-#include <boost/shared_ptr.hpp>
+
 #include <boost/unordered_map.hpp>
 #include "sync-seq-no.h"
 #include "sync-ccnx-wrapper.h"
 
-/**
- * \defgroup sync SYNC protocol
- *
- * Implementation of SYNC protocol
- */
 namespace Sync {
 
 struct Seq
@@ -49,39 +44,45 @@
 class AppDataPublish
 {
 public:
-	AppDataPublish(boost::shared_ptr<CcnxWrapper> ccnxHandle)
-	{ m_ccnxHandle = ccnxHandle; }
-	~AppDataPublish() {};
+  AppDataPublish (CcnxWrapperPtr ccnxHandle)
+  : m_ccnxHandle (ccnxHandle)
+  { }
 
-	/**
-	 * @brief get the name (including sequence number) and the content
-	 * (unencoded, just XML stanza) of the most recent published data
-	 *
-	 * @param prefix the name prefix to look for
-	 * @return the pair of name and content
-	 */
-	std::string getRecentData(std::string prefix, uint32_t session);
+  /**
+   * @brief get the name (including sequence number) and the content
+   * (unencoded, just XML stanza) of the most recent published data
+   *
+   * @param prefix the name prefix to look for
+   * @param session session
+   * @return the pair of name and content
+   */
+  std::string
+  getRecentData (const std::string &prefix, uint32_t session);
 
-	/**
-	 * brief get the most recent sequence number for a name prefix
-	 */
-	 u_int32_t getHighestSeq(std::string prefix, uint32_t session);
+  /**
+   * @brief get the most recent sequence number for a name prefix
+   * @param prefix the name prefix to look for
+   * @param session session
+   */
+  uint32_t
+  getHighestSeq (const std::string &prefix, uint32_t session);
 
-	/**
-	 * @brief publish data for a name prefix, updates the corresponding
-	 * sequence number and recent data
-	 *
-	 * @param name data prefix
-	 * @param dataBuffer the data itself
-	 * @param freshness the freshness for the data object
-	 * @return whether the publish succeeded
-	 */
-	bool publishData(std::string name, uint32_t session, std::string dataBuffer, int freshness);
+  /**
+   * @brief publish data for a name prefix, updates the corresponding
+   * sequence number and recent data
+   *
+   * @param name data prefix
+   * @param session session to which data is published
+   * @param dataBuffer the data itself
+   * @param freshness the freshness for the data object
+   * @return whether the publish succeeded
+   */
+  bool publishData (const std::string &name, uint32_t session, const std::string &dataBuffer, int freshness);
 
 private:
-	boost::unordered_map<std::string, Seq> m_sequenceLog;
-	boost::shared_ptr<CcnxWrapper> m_ccnxHandle;
-	boost::unordered_map<std::string, std::string> m_recentData;
+  boost::unordered_map<std::string, Seq> m_sequenceLog;
+  CcnxWrapperPtr m_ccnxHandle;
+  boost::unordered_map<std::string, std::string> m_recentData;
 };
 
 } // Sync
diff --git a/model/sync-app-socket.cc b/model/sync-app-socket.cc
index c349aeb..d703e76 100644
--- a/model/sync-app-socket.cc
+++ b/model/sync-app-socket.cc
@@ -28,27 +28,24 @@
 namespace Sync
 {
 
-SyncAppSocket::SyncAppSocket(string syncPrefix, function<void (string, string)> dataCallback)
+SyncAppSocket::SyncAppSocket (const string &syncPrefix, CcnxWrapper::DataCallback dataCallback)
+  : m_ccnxHandle (new CcnxWrapper())
+  , m_fetcher (m_ccnxHandle, dataCallback)
+  , m_publisher (m_ccnxHandle)
+  , m_syncLogic (syncPrefix,
+                 bind (&AppDataFetch::fetch, m_fetcher, _1, _2, _3),
+                 m_ccnxHandle)
 {
-  m_ccnxHandle.reset(new CcnxWrapper());
-  m_fetcher = new AppDataFetch(m_ccnxHandle, dataCallback);
-  m_publisher = new AppDataPublish(m_ccnxHandle);
-
-  function<void (string, uint32_t, uint32_t)> f(bind(&AppDataFetch::fetch, m_fetcher, _1, _2, _3));
-  m_syncLogic = new SyncLogic(syncPrefix, f, m_ccnxHandle);
 }
 
 SyncAppSocket::~SyncAppSocket()
 {
-  delete m_syncLogic;
-  delete m_fetcher;
-  delete m_publisher;
 }
 
-bool SyncAppSocket::publish(string prefix, uint32_t session, string dataBuffer, int freshness)
+bool SyncAppSocket::publish (const string &prefix, uint32_t session, const string &dataBuffer, int freshness)
 {
-  m_publisher->publishData(prefix, session, dataBuffer, freshness);
-  m_syncLogic->addLocalNames(prefix, session, m_publisher->getHighestSeq(prefix, session));
+  m_publisher.publishData (prefix, session, dataBuffer, freshness);
+  m_syncLogic.addLocalNames (prefix, session, m_publisher.getHighestSeq (prefix, session));
 }
 
-}
\ No newline at end of file
+}
diff --git a/model/sync-app-socket.h b/model/sync-app-socket.h
index 3b2c62c..38a2657 100644
--- a/model/sync-app-socket.h
+++ b/model/sync-app-socket.h
@@ -37,37 +37,37 @@
 class SyncAppSocket
 {
 public:
-	/**
-	 * @brief the constructor for SyncAppSocket; the parameter syncPrefix
-	 * should be passed to the constructor of m_syncAppWrapper; the other
-	 * parameter should be passed to the constructor of m_fetcher; furthermore,
-	 * the fetch function of m_fetcher should be a second paramter passed to
-	 * the constructor of m_syncAppWrapper, so that m_syncAppWrapper can tell
-	 * m_fetcher to fetch the actual app data after it learns the names
-	 *
-	 * @param syncPrefix the name prefix for Sync Interest
-	 * @param dataCallback the callback to process data
-	 */
-	SyncAppSocket(std::string syncPrefix, boost::function<void (std::string, std::string)>
-	dataCallback);
+  /**
+   * @brief the constructor for SyncAppSocket; the parameter syncPrefix
+   * should be passed to the constructor of m_syncAppWrapper; the other
+   * parameter should be passed to the constructor of m_fetcher; furthermore,
+   * the fetch function of m_fetcher should be a second paramter passed to
+   * the constructor of m_syncAppWrapper, so that m_syncAppWrapper can tell
+   * m_fetcher to fetch the actual app data after it learns the names
+   *
+   * @param syncPrefix the name prefix for Sync Interest
+   * @param dataCallback the callback to process data
+   */
+  SyncAppSocket (const std::string &syncPrefix, CcnxWrapper::DataCallback dataCallback);
+  ~SyncAppSocket ();
 
-	~SyncAppSocket();
-
-	/**
-	 * @brief publish data from local client and tell SyncLogic to update
-	 * the sync tree by adding the local names
-	 *
-	 * @param prefix the name prefix for the data
-	 * @param dataBuffer the data itself
-	 * @param freshness the freshness time for the data (in seconds)
-	 */
-	bool publish(std::string prefix, uint32_t session, std::string dataBuffer, int freshness);
+  /**
+   * @brief publish data from local client and tell SyncLogic to update
+   * the sync tree by adding the local names
+   *
+   * @param prefix the name prefix for the data
+   * @param session session to which data is published
+   * @param dataBuffer the data itself
+   * @param freshness the freshness time for the data (in seconds)
+   */
+  bool publish (const std::string &prefix, uint32_t session, const std::string &dataBuffer, int freshness);
 
 private:
-	AppDataFetch *m_fetcher;
-	AppDataPublish *m_publisher;
-	SyncLogic *m_syncLogic;
-	boost::shared_ptr<CcnxWrapper> m_ccnxHandle;
+  CcnxWrapperPtr m_ccnxHandle;
+
+  AppDataFetch   m_fetcher;
+  AppDataPublish m_publisher;
+  SyncLogic      m_syncLogic;
 };
 
 } // Sync
diff --git a/model/sync-ccnx-wrapper.cc b/model/sync-ccnx-wrapper.cc
index 0acde7f..b901a43 100644
--- a/model/sync-ccnx-wrapper.cc
+++ b/model/sync-ccnx-wrapper.cc
@@ -45,50 +45,58 @@
 {
   m_running = false;
   m_thread.join();
-  ccn_disconnect(m_handle);
-  ccn_destroy(&m_handle);
-  ccn_charbuf_destroy(&m_keyLoactor);
-  ccn_keystore_destroy(&m_keyStore);
+  ccn_disconnect (m_handle);
+  ccn_destroy (&m_handle);
+  ccn_charbuf_destroy (&m_keyLoactor);
+  ccn_keystore_destroy (&m_keyStore);
 }
 
-void CcnxWrapper::createKeyLocator()
+/// @cond include_hidden
+
+void
+CcnxWrapper::createKeyLocator ()
 {
   m_keyLoactor = ccn_charbuf_create();
-  ccn_charbuf_append_tt(m_keyLoactor, CCN_DTAG_KeyLocator, CCN_DTAG);
-  ccn_charbuf_append_tt(m_keyLoactor, CCN_DTAG_Key, CCN_DTAG);
-  int res = ccn_append_pubkey_blob(m_keyLoactor, ccn_keystore_public_key(m_keyStore));
+  ccn_charbuf_append_tt (m_keyLoactor, CCN_DTAG_KeyLocator, CCN_DTAG);
+  ccn_charbuf_append_tt (m_keyLoactor, CCN_DTAG_Key, CCN_DTAG);
+  int res = ccn_append_pubkey_blob (m_keyLoactor, ccn_keystore_public_key(m_keyStore));
   if (res >= 0)
     {
-      ccn_charbuf_append_closer(m_keyLoactor); /* </Key> */
-      ccn_charbuf_append_closer(m_keyLoactor); /* </KeyLocator> */
+      ccn_charbuf_append_closer (m_keyLoactor); /* </Key> */
+      ccn_charbuf_append_closer (m_keyLoactor); /* </KeyLocator> */
     }
 }
 
-const ccn_pkey* CcnxWrapper::getPrivateKey()
+const ccn_pkey*
+CcnxWrapper::getPrivateKey ()
 {
-  return ccn_keystore_private_key(m_keyStore);
+  return ccn_keystore_private_key (m_keyStore);
 }
 
-const unsigned char* CcnxWrapper::getPublicKeyDigest()
+const unsigned char*
+CcnxWrapper::getPublicKeyDigest ()
 {
   return ccn_keystore_public_key_digest(m_keyStore);
 }
 
-ssize_t CcnxWrapper::getPublicKeyDigestLength()
+ssize_t
+CcnxWrapper::getPublicKeyDigestLength ()
 {
   return ccn_keystore_public_key_digest_length(m_keyStore);
 }
 
-void CcnxWrapper::initKeyStore()
+void
+CcnxWrapper::initKeyStore ()
 {
-  ccn_charbuf *temp = ccn_charbuf_create();
-  m_keyStore = ccn_keystore_create();
-  ccn_charbuf_putf(temp, "%s/.ccnx/.ccnx_keystore", getenv("HOME"));
-  ccn_keystore_init(m_keyStore, ccn_charbuf_as_string(temp), (char*)"Th1s1sn0t8g00dp8ssw0rd.");
-  ccn_charbuf_destroy(&temp);
+  ccn_charbuf *temp = ccn_charbuf_create ();
+  m_keyStore = ccn_keystore_create ();
+  ccn_charbuf_putf (temp, "%s/.ccnx/.ccnx_keystore", getenv("HOME"));
+  ccn_keystore_init (m_keyStore, ccn_charbuf_as_string(temp), (char*)"Th1s1sn0t8g00dp8ssw0rd.");
+  ccn_charbuf_destroy (&temp);
 }
 
-void CcnxWrapper::ccnLoop()
+void
+CcnxWrapper::ccnLoop ()
 {
   pollfd pfds[1];
   int res = ccn_run(m_handle, 0);
@@ -110,7 +118,10 @@
     }
 }
 
-int CcnxWrapper::publishData(string name, string dataBuffer, int freshness)
+/// @endcond
+
+int
+CcnxWrapper::publishData (const string &name, const string &dataBuffer, int freshness)
 {
   ccn_charbuf *pname = ccn_charbuf_create();
   ccn_charbuf *signed_info = ccn_charbuf_create();
@@ -126,27 +137,28 @@
 			 NULL,
 			 m_keyLoactor);
   ccn_encode_ContentObject(content, pname, signed_info,
-			   dataBuffer.c_str(), dataBuffer.length(),
+			   dataBuffer.c_str(), dataBuffer.length (),
 			   NULL, getPrivateKey());
   recursive_mutex::scoped_lock lock(m_mutex);
   ccn_put(m_handle, content->buf, content->length);
 
-  ccn_charbuf_destroy(&pname);
-  ccn_charbuf_destroy(&signed_info);
-  ccn_charbuf_destroy(&content);
+  ccn_charbuf_destroy (&pname);
+  ccn_charbuf_destroy (&signed_info);
+  ccn_charbuf_destroy (&content);
 }
 
 
-static ccn_upcall_res incomingInterest(
-                                       ccn_closure *selfp,
-                                       ccn_upcall_kind kind,
-                                       ccn_upcall_info *info)
+static ccn_upcall_res
+incomingInterest(ccn_closure *selfp,
+                 ccn_upcall_kind kind,
+                 ccn_upcall_info *info)
 {
-  function<void (string)> f = *(function<void (string)> *)selfp->data;
+  CcnxWrapper::InterestCallback *f = static_cast<CcnxWrapper::InterestCallback*> (selfp->data);
 
   switch (kind)
     {
     case CCN_UPCALL_FINAL:
+      delete f;
       delete selfp;
       return CCN_UPCALL_RESULT_OK;
 
@@ -166,20 +178,21 @@
       ccn_name_comp_get(info->interest_ccnb, info->interest_comps, i, (const unsigned char **)&comp, &size);
       interest += comp;
     }
-  f(interest);
+  (*f) (interest);
   return CCN_UPCALL_RESULT_OK;
 }
 
-static ccn_upcall_res incomingData(
-                                   ccn_closure *selfp,
-                                   ccn_upcall_kind kind,
-                                   ccn_upcall_info *info)
+static ccn_upcall_res
+incomingData(ccn_closure *selfp,
+             ccn_upcall_kind kind,
+             ccn_upcall_info *info)
 {
-  function<void (string, string)> f = *(function<void (string, string)> *)selfp->data;
+  CcnxWrapper::DataCallback *f = static_cast<CcnxWrapper::DataCallback*> (selfp->data);
 
   switch (kind)
     {
     case CCN_UPCALL_FINAL:
+      delete f; // this never called in unit tests... 
       delete selfp;
       return CCN_UPCALL_RESULT_OK;
 
@@ -203,35 +216,34 @@
       name += comp; // this will also crash if name doesn't have \0 ending
     }
   // this will crash when content doesn't have \0 ending
-  f(name, (string)pcontent);
+  (*f) (name, (string)pcontent);
   return CCN_UPCALL_RESULT_OK;
 }
 
-int CcnxWrapper::sendInterest(string strInterest, function<void (string, string)> dataCallback)
+int CcnxWrapper::sendInterest (const string &strInterest, const DataCallback &dataCallback)
 {
   ccn_charbuf *pname = ccn_charbuf_create();
   ccn_closure *dataClosure = new ccn_closure;
-  function<void (string, string)> *f = new function<void (string, string)>(dataCallback);
-
-  ccn_name_from_uri(pname, strInterest.c_str());
-  dataClosure->data = f;
+  
+  ccn_name_from_uri (pname, strInterest.c_str());
+  dataClosure->data = new DataCallback (dataCallback); // should be removed when closure is removed
+  
   dataClosure->p = &incomingData;
   recursive_mutex::scoped_lock lock(m_mutex);
-  ccn_express_interest(m_handle, pname, dataClosure, NULL);
+  ccn_express_interest (m_handle, pname, dataClosure, NULL);
 
-  ccn_charbuf_destroy(&pname);
+  ccn_charbuf_destroy (&pname);
 }
 
-int CcnxWrapper::setInterestFilter(string prefix, function<void (string)> interestCallback)
+int CcnxWrapper::setInterestFilter (const string &prefix, const InterestCallback &interestCallback)
 {
   ccn_charbuf *pname = ccn_charbuf_create();
   ccn_closure *interestClosure = new ccn_closure;
-  function<void (string)> *f = new function<void (string)>(interestCallback);
 
-  ccn_name_from_uri(pname, prefix.c_str());
-  interestClosure->data = f;
+  ccn_name_from_uri (pname, prefix.c_str());
+  interestClosure->data = new InterestCallback (interestCallback); // should be removed when closure is removed
   interestClosure->p = &incomingInterest;
-  ccn_set_interest_filter(m_handle, pname, interestClosure);
+  ccn_set_interest_filter (m_handle, pname, interestClosure);
 
   ccn_charbuf_destroy(&pname);
 }
diff --git a/model/sync-ccnx-wrapper.h b/model/sync-ccnx-wrapper.h
index 00b5cd5..84893d8 100644
--- a/model/sync-ccnx-wrapper.h
+++ b/model/sync-ccnx-wrapper.h
@@ -51,7 +51,9 @@
  */
 class CcnxWrapper {
 public:
-
+  typedef boost::function<void (std::string, std::string)> DataCallback;
+  typedef boost::function<void (std::string)> InterestCallback;
+  
   /**
    * @brief initialize the wrapper; a lot of things needs to be done. 1) init
    * keystore 2) init keylocator 3) start a thread to hold a loop of ccn_run
@@ -68,8 +70,7 @@
    * @return the return code of ccn_express_interest
    */
   int
-  sendInterest(std::string strInterest, boost::function<void
-  (std::string, std::string)> dataCallback);
+  sendInterest (const std::string &strInterest, const DataCallback &dataCallback);
 
   /**
    * @brief set Interest filter (specify what interest you want to receive
@@ -79,8 +80,7 @@
    * @return the return code of ccn_set_interest_filter
    */
   int
-  setInterestFilter(std::string prefix, boost::function<void (std::string)>
-                    interestCallback);
+  setInterestFilter (const std::string &prefix, const InterestCallback &interestCallback);
 
   /**
    * @brief publish data and put it to local ccn content store; need to grab
@@ -92,7 +92,7 @@
    * @return code generated by ccnx library calls, >0 if success
    */
   int
-  publishData(std::string name, std::string dataBuffer, int freshness);
+  publishData (const std::string &name, const std::string &dataBuffer, int freshness);
 
 private:
   /// @cond include_hidden 
diff --git a/model/sync-logic.cc b/model/sync-logic.cc
index f3c6aa2..20e5411 100644
--- a/model/sync-logic.cc
+++ b/model/sync-logic.cc
@@ -29,7 +29,7 @@
 {
 
 SyncLogic::SyncLogic (const string &syncPrefix,
-                      SyncCallback fetch,
+                      LogicCallback fetch,
                       CcnxWrapperPtr ccnxHandle)
   : m_syncPrefix (syncPrefix)
   , m_fetch (fetch)
@@ -70,15 +70,11 @@
 void
 SyncLogic::sendSyncInterest ()
 {
-  function<void (string, string)> f = bind(&SyncLogic::processSyncData, this, _1, _2);
-  stringstream os;
-  os << m_syncPrefix;
-  os << "/";
-  DigestConstPtr digest = m_state.getDigest();
-  os << digest;
-  string name;
-  os >> name;
-  m_ccnxHandle->sendInterest (name, f);
+  ostringstream os;
+  os << m_syncPrefix << "/" << m_state.getDigest();
+  
+  m_ccnxHandle->sendInterest (os.str (),
+                              bind (&SyncLogic::processSyncData, this, _1, _2));
 }
 
 }
diff --git a/model/sync-logic.h b/model/sync-logic.h
index 62bf485..101a4ab 100644
--- a/model/sync-logic.h
+++ b/model/sync-logic.h
@@ -42,15 +42,16 @@
 class SyncLogic
 {
 public:
-  typedef boost::function<void (const std::string &,uint32_t, uint32_t)> SyncCallback;
+  typedef boost::function<void (const std::string &,uint32_t, uint32_t)> LogicCallback;
   
   /**
-   * @brief constructor for this class;
+   * @brief Constructor
    * @param syncPrefix the name prefix to use for the Sync Interest
    * @param fetch the fetch function, which will be called to actually fetch
+   * @param ccnxHandle ccnx handle
    * the app data when new remote names are learned
    */
-  SyncLogic (const std::string &syncPrefix, SyncCallback fetch, CcnxWrapperPtr ccnxHandle);
+  SyncLogic (const std::string &syncPrefix, LogicCallback fetch, CcnxWrapperPtr ccnxHandle);
 
   ~SyncLogic ();
   
@@ -67,6 +68,7 @@
 
   /**
    * @brief process the fetched sync data
+   * @param name name ???
    * @param dataBuffer the sync data
    */
   void processSyncData (const std::string &name, const std::string &dataBuffer);
@@ -80,7 +82,7 @@
   SyncInterestTable m_syncInterestTable;
 
   std::string m_syncPrefix;
-  SyncCallback m_fetch;
+  LogicCallback m_fetch;
   CcnxWrapperPtr m_ccnxHandle;
 };
 
diff --git a/model/sync-state.h b/model/sync-state.h
index 7c0b98e..bfe2517 100644
--- a/model/sync-state.h
+++ b/model/sync-state.h
@@ -80,11 +80,10 @@
 
 /**
  * @brief Parses an XML representation to the state
- * @param DataBuffer input data
+ * @param in input data stream
  * @param state state
+ * @returns input stream
  */
-// void
-// operator >> (const std::string &DataBuffer, State &state);
 std::istream &
 operator >> (std::istream &in, State &state);