get rid of STANDALONE parameter; by default it should be standalone (not ns3)!
diff --git a/demo/chatdialog.h b/demo/chatdialog.h
index b4c4b24..7a837dc 100644
--- a/demo/chatdialog.h
+++ b/demo/chatdialog.h
@@ -5,6 +5,7 @@
 #include "digesttreescene.h"
 #include "ui_chatdialog.h"
 #include "chatbuf.pb.h"
+#include <sync-app-socket.h>
 
 class ChatDialog : public QDialog,  private Ui::ChatDialog 
 {
@@ -13,7 +14,7 @@
 public:
 	ChatDialog(QWidget *parent = 0);
   void appendMessage(const SyncDemo::ChatMessage &msg);
-  void processData(const std::vector<MisingDataInfo> &, SyncAppSocket *);
+  void processData(const std::vector<MissingDataInfo> &, SyncAppSocket *);
 
 private:
   void formChatMessage(const QString &text, SyncDemo::ChatMessage &msg);
diff --git a/demo/sync-demo.pro b/demo/sync-demo.pro
index 402fee2..4ff91a7 100644
--- a/demo/sync-demo.pro
+++ b/demo/sync-demo.pro
@@ -12,9 +12,9 @@
 QMAKE_CXXFLAGS *= -g 
 QMAKE_CFLAGS *= -g 
 
-QMAKE_LIBDIR *= /opt/local/lib /usr/local/lib /usr/lib ../../../third_party/OGDF/_release
-INCLUDEPATH *= /opt/local/include /usr/local/include ../../../third_party/OGDF
-LIBS *= -lccn -lssl -lcrypto -lpthread -lOGDF -lprotobuf
+QMAKE_LIBDIR *= /opt/local/lib /usr/local/lib /usr/lib ../../../third_party/OGDF/_release ../build
+INCLUDEPATH *= /opt/local/include /usr/local/include ../../../third_party/OGDF ../include
+LIBS *= -lccn -lssl -lcrypto -lpthread -lOGDF -lprotobuf -lsync
 CONFIG += console 
 
 PROTOS = chatbuf.proto
diff --git a/include/ns3/sync-ns3-name-info.h b/include/ns3/sync-ns3-name-info.h
index 347ba1a..d412fdd 100644
--- a/include/ns3/sync-ns3-name-info.h
+++ b/include/ns3/sync-ns3-name-info.h
@@ -20,7 +20,7 @@
  *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
-#ifndef STANDALONE
+#ifdef NS3_MODULE
 
 #ifndef SYNC_CCNX_NAME_INFO_H
 #define SYNC_CCNX_NAME_INFO_H
@@ -76,4 +76,4 @@
 
 #endif // SYNC_CCNX_NAME_INFO_H
 
-#endif // STANDALONE
+#endif // NS3_MODULE
diff --git a/include/sync-full-state.h b/include/sync-full-state.h
index c39ec4f..44b9248 100644
--- a/include/sync-full-state.h
+++ b/include/sync-full-state.h
@@ -23,7 +23,7 @@
 #ifndef SYNC_FULL_STATE_H
 #define SYNC_FULL_STATE_H
 
-#ifndef STANDALONE
+#ifdef NS3_MODULE 
 #include "ns3/nstime.h"
 typedef ns3::Time TimeType;
 typedef ns3::Time TimeDurationType;
@@ -31,7 +31,7 @@
 #include <boost/date_time/posix_time/posix_time_types.hpp>
 typedef boost::posix_time::ptime TimeType;
 typedef boost::posix_time::time_duration TimeDurationType;
-#endif // STANDALONE
+#endif // NS3_MODULE
 
 #include "sync-state.h"
 
diff --git a/model/sync-full-state.cc b/model/sync-full-state.cc
index 804c7b7..9b7c42c 100644
--- a/model/sync-full-state.cc
+++ b/model/sync-full-state.cc
@@ -22,9 +22,9 @@
 
 #include "sync-full-state.h"
 
-#ifndef STANDALONE
+#ifdef NS3_MODULE
 #include "ns3/simulator.h"
-#endif // STANDALONE
+#endif // NS3_MODULE
 
 #include <boost/make_shared.hpp>
 #include <boost/lambda/lambda.hpp>
@@ -41,7 +41,7 @@
 
 
 FullState::FullState ()
-// m_lastUpdated is initialized to "not_a_date_time" in STANDALONE mode and to "0" time in NS-3 mode
+// m_lastUpdated is initialized to "not_a_date_time" in normal lib mode and to "0" time in NS-3 mode
 {
 }
 
@@ -52,11 +52,11 @@
 TimeDurationType
 FullState::getTimeFromLastUpdate () const
 {
-#ifndef STANDALONE
+#ifdef NS3_MODULE
   return ns3::Simulator::Now () - m_lastUpdated;
 #else
   return boost::posix_time::second_clock::universal_time () - m_lastUpdated;
-#endif // STANDALONE
+#endif // NS3_MODULE
 }
 
 DigestConstPtr
@@ -89,11 +89,11 @@
 boost::tuple<bool/*inserted*/, bool/*updated*/, SeqNo/*oldSeqNo*/>
 FullState::update (NameInfoConstPtr info, const SeqNo &seq)
 {
-#ifndef STANDALONE  
+#ifdef NS3_MODULE
   m_lastUpdated = ns3::Simulator::Now ();
 #else
   m_lastUpdated = boost::posix_time::second_clock::universal_time ();
-#endif // STANDALONE  
+#endif // NS3_MODULE
 
   m_digest.reset ();
 
@@ -120,11 +120,11 @@
 bool
 FullState::remove (NameInfoConstPtr info)
 {
-#ifndef STANDALONE  
+#ifdef NS3_MODULE
   m_lastUpdated = ns3::Simulator::Now ();
 #else
   m_lastUpdated = boost::posix_time::second_clock::universal_time ();
-#endif // STANDALONE  
+#endif // NS3_MODULE
 
   m_digest.reset ();
 
diff --git a/ns3/sync-ns3-name-info.cc b/ns3/sync-ns3-name-info.cc
index dfd6179..7268e75 100644
--- a/ns3/sync-ns3-name-info.cc
+++ b/ns3/sync-ns3-name-info.cc
@@ -20,7 +20,7 @@
  *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
-#ifndef STANDALONE
+#ifdef NS3_MODULE
 
 #include "sync-ns3-name-info.h"
 #include "ns3/ccnx-name-components.h"
diff --git a/wscript b/wscript
index e2f05b7..ba3d730 100644
--- a/wscript
+++ b/wscript
@@ -40,7 +40,6 @@
         conf.define ('NS3_LOG_ENABLE', 1)
     else:
         conf.check_boost(lib='system iostreams test thread')
-        conf.define ('STANDALONE', 1)
 
         conf.load ('ccnx')
         conf.check_ccnx (path=conf.options.ccnx_dir)