Checkpoint
diff --git a/model/sync-app-data-fetch.cc b/model/sync-app-data-fetch.cc
deleted file mode 100644
index 5cfabce..0000000
--- a/model/sync-app-data-fetch.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
-/*
- * Copyright (c) 2012 University of California, Los Angeles
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation;
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
- *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
- */
-
-#include "sync-app-data-fetch.h"
-#include "sync-log.h"
-
-using namespace std;
-using namespace boost;
-
-namespace Sync
-{
-
-INIT_LOGGER ("AppDataFetch");
-
-void
-AppDataFetch::onUpdate (const std::string &prefix, const SeqNo &newSeq, const SeqNo &oldSeq)
-{
-  _LOG_FUNCTION (this << ", " << prefix << ", " << newSeq << ", " << oldSeq);
-  
-  // sequence number logic here
-  uint32_t start = 0;
-  if (oldSeq.isValid () && oldSeq.getSession() == newSeq.getSession())
-    {
-      start = oldSeq.getSeq () + 1;
-    }
-  uint32_t end = newSeq.getSeq ();
-
-  //
-  // add logic for wrap around
-  //
-
-  for (uint32_t i = start; i <= end; i++)
-    {
-      ostringstream interestName;
-      interestName << prefix << "/" << newSeq.getSession () << "/" << i;
-      m_ccnxHandle->sendInterest (interestName.str (), m_dataCallback);
-    }
-}
-
-void
-AppDataFetch::onRemove (const std::string &prefix)
-{
-  _LOG_FUNCTION (this << ", " << prefix);
-  
-  // I guess this should be somewhere in app
-}
-
-}
diff --git a/model/sync-app-data-fetch.h b/model/sync-app-data-fetch.h
deleted file mode 100644
index 1e42860..0000000
--- a/model/sync-app-data-fetch.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
-/*
- * Copyright (c) 2012 University of California, Los Angeles
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation;
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
- *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
- */
-
-#ifndef SYNC_APP_DATA_FETCH_H
-#define SYNC_APP_DATA_FETCH_H
-
-#include "sync-ccnx-wrapper.h"
-#include "sync-seq-no.h"
-
-namespace Sync {
-
-/**
- * \ingroup sync
- * @brief fetch application data, by default it will try to fetch every piece
- * of data
- */
-class AppDataFetch
-{
-public:
-  /**
-   * @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)
-  { }
-
-  /**
-   * @brief Set data callback
-   * @param dataCallback the callback function to process data
-   */
-  void
-  setDataCallback(CcnxWrapper::DataCallback dataCallback)
-  {
-    m_dataCallback = dataCallback;
-  }
-
-  /**
-   * @brief Fired from SyncLogic when new data is available
-   *
-   * @param prefix the prefix for the data
-   * @param newSeq old session ID/sequence number
-   * @param oldSeq new session ID/sequence number
-   */
-  void
-  onUpdate (const std::string &prefix, const SeqNo &newSeq, const SeqNo &oldSeq);
-
-  /**
-   * @brief Fired from SyncLogic when data is removed
-   *
-   * @param prefix the prefix for the data
-   */
-  void
-  onRemove (const std::string &prefix);
-  
-private:
-  CcnxWrapperPtr m_ccnxHandle;
-  CcnxWrapper::DataCallback m_dataCallback;
-};
-
-
-} // Sync
-
-#endif // SYNC_APP_DATA_FETCH_H
diff --git a/model/sync-app-data-publish.cc b/model/sync-app-data-publish.cc
deleted file mode 100644
index e7bee97..0000000
--- a/model/sync-app-data-publish.cc
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
-/*
- * Copyright (c) 2012 University of California, Los Angeles
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation;
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
- *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
- */
-
-#include "sync-app-data-publish.h"
-#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;
-
-using namespace std;
-using namespace boost;
-
-namespace Sync
-{
-
-
-string
-AppDataPublish::getRecentData (const string &prefix, uint32_t session)
-{
-  if (m_recentData.find(make_pair(prefix, session)) != m_recentData.end())
-    return m_recentData[make_pair(prefix, session)];
-  else
-    return "";
-}
-
-uint32_t
-AppDataPublish::getNextSeq (const string &prefix, uint32_t session)
-{
-  SequenceLog::iterator i = m_sequenceLog.find (prefix);
-
-  if (i != m_sequenceLog.end ())
-    {
-      Seq s = i->second;
-      if (s.session == session)
-        return s.seq;
-    }
-  return 0;
-}
-
-uint32_t
-AppDataPublish::publishData (const string &name, uint32_t session, const string &dataBuffer, int freshness)
-{
-  uint32_t seq = getNextSeq (name, session);
-
-  ostringstream contentNameWithSeqno;
-  contentNameWithSeqno << name << "/" << session << "/" << seq;
-
-  m_ccnxHandle->publishData (contentNameWithSeqno.str (), dataBuffer, freshness);
-
-  Seq s;
-  s.session = session;
-  s.seq = seq + 1;
-  m_sequenceLog[name] = s;
-
-  unordered_map<pair<string, uint32_t>, string>::iterator it = m_recentData.find(make_pair(name, session));
-   if (it != m_recentData.end()) 
-     m_recentData.erase(it);
-   m_recentData.insert(make_pair(make_pair(name, session), dataBuffer));
-
-  return seq;
-}
-
-} // Sync
diff --git a/model/sync-app-data-publish.h b/model/sync-app-data-publish.h
deleted file mode 100644
index ec95a60..0000000
--- a/model/sync-app-data-publish.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
-/*
- * Copyright (c) 2012 University of California, Los Angeles
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation;
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
- *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
- */
-
-#ifndef SYNC_APP_DATA_PUBLISH_H
-#define SYNC_APP_DATA_PUBLISH_H
-
-#include <boost/unordered_map.hpp>
-#include "sync-seq-no.h"
-#include "sync-ccnx-wrapper.h"
-#include <utility>
-#include <map>
-
-namespace Sync {
-
-struct Seq
-{
-  uint32_t session;
-  uint32_t seq;
-};
-
-struct GetSeqException : virtual boost::exception, virtual std::exception { };
-
-/**
- * \ingroup sync
- * @brief publishes application data using incrementing sequence number (for
- * each sequence namber and keeps track of most recently published data for
- * each name prefix
- */
-class AppDataPublish
-{
-public:
-  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
-   * @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
-   * @param prefix the name prefix to look for
-   * @param session session
-   */
-  uint32_t
-  getNextSeq (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 session session to which data is published
-   * @param dataBuffer the data itself
-   * @param freshness the freshness for the data object
-   * @return published sequence number, will throw an exception if something wrong happened
-   */
-  uint32_t publishData (const std::string &name, uint32_t session, const std::string &dataBuffer, int freshness);
-
-private:
-  typedef boost::unordered_map<std::string, Seq> SequenceLog;
-  typedef boost::unordered_map<std::pair<std::string, uint32_t>, std::string> RecentData;
-  
-  CcnxWrapperPtr m_ccnxHandle;
-  SequenceLog m_sequenceLog;
-  RecentData m_recentData;
-};
-
-} // Sync
-
-#endif // SYNC_APP_DATA_PUBLISH_H
diff --git a/model/sync-app-socket-c.cc b/model/sync-app-socket-c.cc
deleted file mode 100644
index 4bdf384..0000000
--- a/model/sync-app-socket-c.cc
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
-/*
- * Copyright (c) 2012 University of California, Los Angeles
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation;
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
- *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
- */
-
-#include "sync-app-socket.h"
-using namespace std;
-using namespace Sync;
-
-class CallbackHolder{
-private:
-  void (*m_callback)(const char *, const char *);
-
-public:
-  CallbackHolder(void (*callback)(const char*, const char*)):m_callback(callback){};
-  void callbackWrapper(string name, string data) {
-    m_callback(name.c_str(), data.c_str());
-  }
-};
-
-struct SyncAppSocketStruct;
-
-extern "C"
-SyncAppSocketStruct *
-create_sync_app_socket(const char *prefix, void (*callback)(const char *, const char *)) 
-{
-  CallbackHolder *holder = new CallbackHolder(callback);
-  boost::function<void (string, string)> cb = bind(&CallbackHolder::callbackWrapper, holder, _1, _2);
-  SyncAppSocket *sock = new SyncAppSocket(prefix, cb);
-  return (SyncAppSocketStruct *) sock;
-}
-
-extern "C"
-void
-delete_sync_app_socket(SyncAppSocketStruct **sock) {
-  SyncAppSocket *temp = *((SyncAppSocket **)sock);
-  delete temp;
-  temp = NULL;
-}
-
-// assume char *buf ends with '\0', or otherwise it's going to crash;
-// should fix this "feature"
-extern "C" 
-int
-sync_app_socket_publish(SyncAppSocketStruct *sock, const char *prefix, int session, const char *buf, int freshness) 
-{
-  SyncAppSocket *temp = (SyncAppSocket *)sock;
-  return temp->publish(prefix, session, buf, freshness);
-}
-
-extern "C"
-void
-sync_app_socket_remove(SyncAppSocketStruct *sock, const char *prefix) 
-{
-  SyncAppSocket *temp = (SyncAppSocket *)sock;
-  temp->remove(prefix);
-}
diff --git a/model/sync-app-socket.cc b/model/sync-app-socket.cc
deleted file mode 100644
index 848a6d0..0000000
--- a/model/sync-app-socket.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
-/*
- * Copyright (c) 2012 University of California, Los Angeles
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation;
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
- *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
- */
-
-#include "sync-app-socket.h"
-
-using namespace std;
-using namespace boost;
-
-namespace Sync
-{
-
-SyncAppSocket::SyncAppSocket (const string &syncPrefix, CcnxWrapper::DataCallback dataCallback)
-	: m_appHandle (new CcnxWrapper())
-  , m_fetcher (m_appHandle, dataCallback)
-  , m_publisher (m_appHandle)
-  , m_syncLogic (syncPrefix,
-                 bind (&AppDataFetch::onUpdate, m_fetcher, _1, _2, _3),
-                 bind (&AppDataFetch::onRemove, m_fetcher, _1))
-{
-}
-
-SyncAppSocket::~SyncAppSocket()
-{
-}
-
-bool SyncAppSocket::publish (const string &prefix, uint32_t session, const string &dataBuffer, int freshness)
-{
-  uint32_t sequence = m_publisher.publishData (prefix, session, dataBuffer, freshness);
-  m_syncLogic.addLocalNames (prefix, session, sequence);
-}
-
-}
diff --git a/model/sync-app-socket.h b/model/sync-app-socket.h
deleted file mode 100644
index d17857c..0000000
--- a/model/sync-app-socket.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
-/*
- * Copyright (c) 2012 University of California, Los Angeles
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation;
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
- *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
- */
-
-#ifndef SYNC_APP_SOCKET_H
-#define SYNC_APP_SOCKET_H
-
-#include "sync-logic.h"
-#include "sync-app-data-fetch.h"
-#include "sync-app-data-publish.h"
-#include <boost/function.hpp>
-
-namespace Sync {
-
-/**
- * \ingroup sync
- * @brief A simple interface to interact with client code
- */
-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 (const std::string &syncPrefix, CcnxWrapper::DataCallback dataCallback);
-  ~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 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);
-
-  /**
-   * @brief delete a participant's subtree from the sync tree; SyncLogic will do the work
-   * this is just a wrapper
-   *
-   * @param prefix the prefix for the participant
-   */
-  void remove (const std::string &prefix) {m_syncLogic.remove(prefix);}
-
-private:
-  CcnxWrapperPtr m_appHandle;
-
-  AppDataFetch   m_fetcher;
-  AppDataPublish m_publisher;
-  SyncLogic      m_syncLogic;
-};
-
-} // Sync
-
-#endif // SYNC_APP_SOCKET_H
diff --git a/model/sync-app-socket-c.h b/model/sync-event.h
similarity index 61%
rename from model/sync-app-socket-c.h
rename to model/sync-event.h
index 53ffab1..7808947 100644
--- a/model/sync-app-socket-c.h
+++ b/model/sync-event.h
@@ -20,20 +20,16 @@
  *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
-#ifndef SYNC_APP_SOCKET_C_H
-#define SYNC_APP_SOCKET_C_H
+#ifndef SYNC_EVENT_H
+#define SYNC_EVENT_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-  typedef struct SyncAppSocketStruct SyncAppSocketStruct;
+#include <boost/function.hpp>
 
-  SyncAppSocketStruct *create_sync_app_socket(const char *prefix, void (*callback)(const char *, const char *));
-  void delete_sync_app_socket(SyncAppSocketStruct **sock);
-  int sync_app_socket_publish(SyncAppSocketStruct *sock, const char *prefix, int session, const char *buf, int freshness);
-  void sync_app_socket_remove(SyncAppSocketStruct *sock, const char *prefix);
-#ifdef __cplusplus
-}
-#endif
+namespace Sync
+{
 
-#endif // SYNC_APP_SOCKET_C_H
+typedef boost::function< void ( ) > Event;
+
+} // Sync
+
+#endif // SYNC_EVENT_H
diff --git a/model/sync-logic-event-container.h b/model/sync-logic-event-container.h
deleted file mode 100644
index 65c8ab2..0000000
--- a/model/sync-logic-event-container.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
-/*
- * Copyright (c) 2012 University of California, Los Angeles
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation;
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
- *         Chaoyi Bian <bcy@pku.edu.cn>
- *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
- */
-
-#ifndef SYNC_LOGIC_EVENT_CONTAINER_H
-#define SYNC_LOGIC_EVENT_CONTAINER_H
-
-#include <boost/function.hpp>
-#include <boost/date_time/posix_time/posix_time_types.hpp>
-
-#include <boost/multi_index_container.hpp>
-// #include <boost/multi_index/tag.hpp>
-#include <boost/multi_index/ordered_index.hpp>
-// #include <boost/multi_index/composite_key.hpp>
-// #include <boost/multi_index/hashed_index.hpp>
-// #include <boost/multi_index/random_access_index.hpp>
-#include <boost/multi_index/member.hpp>
-// #include <boost/multi_index/mem_fun.hpp>
-
-namespace mi = boost::multi_index;
-
-namespace Sync
-{
-
-typedef boost::function< void ( ) > Event;
-
-struct LogicEvent
-{
-  LogicEvent (const boost::system_time &_time, Event _event, uint32_t _label)
-    : time (_time)
-    , event (_event)
-    , lbl (_label)
-  { }
-  
-  boost::system_time time;
-  Event event;
-  uint32_t lbl;
-};
-
-/// @cond include_hidden
-struct byLabel { } ;
-/// @endcond
-
-/**
- * \ingroup sync
- * @brief ???
- */
-struct EventsContainer : public mi::multi_index_container<
-  LogicEvent,
-  mi::indexed_by<
-
-    mi::ordered_non_unique<
-      mi::member<LogicEvent, boost::system_time, &LogicEvent::time>
-      >,
-
-    mi::ordered_non_unique<
-      mi::tag<byLabel>,
-      mi::member<LogicEvent, uint32_t, &LogicEvent::lbl>
-      >
-    >
-  >
-{
-};
-
-} // Sync
-
-#endif // SYNC_LOGIC_EVENT_CONTAINER_H
diff --git a/model/sync-logic.cc b/model/sync-logic.cc
index 1e99e84..773f368 100644
--- a/model/sync-logic.cc
+++ b/model/sync-logic.cc
@@ -34,7 +34,9 @@
 using namespace std;
 using namespace boost;
 
-// INIT_LOGGER ("SyncLogic");
+#ifndef _STANDALONE
+INIT_LOGGER ("SyncLogic");
+#endif
 
 namespace Sync
 {
@@ -49,6 +51,7 @@
   , m_randomGenerator (static_cast<unsigned int> (std::time (0)))
   , m_rangeUniformRandom (m_randomGenerator, uniform_int<> (20,80))
 {
+#ifdef _STANDALONE
 #ifdef _DEBUG
 #ifdef HAVE_LOG4CXX
   // _LOG_FUNCTION (syncPrefix);
@@ -57,6 +60,7 @@
   id ++;
 #endif
 #endif
+#endif
   
   m_ccnxHandle->setInterestFilter (m_syncPrefix,
                                    bind (&SyncLogic::respondSyncInterest, this, _1));