diff --git a/ChronoSync b/ChronoSync
index 46c9f1a..6e235db 160000
--- a/ChronoSync
+++ b/ChronoSync
@@ -1 +1 @@
-Subproject commit 46c9f1a1c1f64ed429a4b1f3a9cb67a99d5486a2
+Subproject commit 6e235db7ec1df8e6a26c28345b9e9341f84823ce
diff --git a/src/browsecontactdialog.cpp b/src/browsecontactdialog.cpp
index ee783e5..58396ba 100644
--- a/src/browsecontactdialog.cpp
+++ b/src/browsecontactdialog.cpp
@@ -45,8 +45,8 @@
 
   connect(ui->ContactList->selectionModel(), SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)),
           this, SLOT(updateSelection(const QItemSelection &, const QItemSelection &)));
-  connect(&*m_contactManager, SIGNAL(contactCertificateFetched(const ndn::security::IdentityCertificate &)),
-	  this, SLOT(onCertificateFetched(const ndn::security::IdentityCertificate &)));
+  connect(&*m_contactManager, SIGNAL(contactCertificateFetched(const ndn::IdentityCertificate &)),
+	  this, SLOT(onCertificateFetched(const ndn::IdentityCertificate &)));
   connect(&*m_contactManager, SIGNAL(contactCertificateFetchFailed(const ndn::Name&)),
           this, SLOT(onCertificateFetchFailed(const ndn::Name&)));
   connect(&*m_contactManager, SIGNAL(warning(QString)),
@@ -71,7 +71,7 @@
   try{
     using namespace boost::asio::ip;
     tcp::iostream request_stream;
-    request_stream.expires_from_now(boost::posix_time::milliseconds(3000));
+    request_stream.expires_from_now(boost::posix_time::milliseconds(5000));
     request_stream.connect("ndncert.named-data.net","80");
     if(!request_stream)
       {
@@ -137,6 +137,11 @@
 {
   vector<string> certNameList;
   getCertNames(certNameList);
+  _LOG_DEBUG("Get Certificate Name List");
+  for(int i = 0; i < certNameList.size(); i++)
+    {
+      _LOG_DEBUG(" " << certNameList[i]);
+    }
   
   if(filter)
     {
@@ -198,6 +203,8 @@
   int count = 0;
   for(; it != m_certificateNameList.end(); it++)
     {
+      _LOG_DEBUG("fetch " << it->toUri());
+      usleep(1000);
       m_contactManager->fetchIdCertificate(*it);
     }
 }
@@ -205,8 +212,8 @@
 void
 BrowseContactDialog::onCertificateFetched(const IdentityCertificate& identityCertificate)
 {
-  Name certName = identityCertificate.getName();
-  Name certNameNoVersion = certName.getPrefix(certName.size()-1);
+  Name certNameNoVersion = identityCertificate.getName().getPrefix(-1);
+  _LOG_DEBUG("Fetch: " << certNameNoVersion.toUri());
   m_certificateMap.insert(pair<Name, IdentityCertificate>(certNameNoVersion, identityCertificate));
   m_profileMap.insert(pair<Name, Profile>(certNameNoVersion, Profile(identityCertificate)));
   string name = m_profileMap[certNameNoVersion].getProfileEntry("name");
@@ -221,7 +228,9 @@
 
 void
 BrowseContactDialog::onCertificateFetchFailed(const Name& identity)
-{}
+{
+  _LOG_DEBUG("Cannot fetch " << identity.toUri());
+}
 
 void
 BrowseContactDialog::refreshList()
diff --git a/src/chatdialog.cpp b/src/chatdialog.cpp
index 5a6d483..c2d498d 100644
--- a/src/chatdialog.cpp
+++ b/src/chatdialog.cpp
@@ -35,6 +35,7 @@
 Q_DECLARE_METATYPE(size_t)
 
 ChatDialog::ChatDialog(ndn::ptr_lib::shared_ptr<ContactManager> contactManager,
+                       ndn::ptr_lib::shared_ptr<ndn::IdentityManager> identityManager,
                        const ndn::Name& chatroomPrefix,
 		       const ndn::Name& localPrefix,
                        const ndn::Name& defaultIdentity,
@@ -48,6 +49,7 @@
   , m_localPrefix(localPrefix)
   , m_defaultIdentity(defaultIdentity)
   , m_invitationPolicyManager(new InvitationPolicyManager(m_chatroomPrefix.get(-1).toEscapedString(), m_defaultIdentity))
+  , m_identityManager(identityManager)
   , m_nick(nick)
   , m_sock(NULL)
   , m_lastMsgTime(0)
@@ -85,13 +87,10 @@
 
   m_timer = new QTimer(this);
 
+  startFace();
+
   ndn::Name certificateName = m_identityManager->getDefaultCertificateNameForIdentity(m_defaultIdentity);
-  m_syncPolicyManager = ndn::ptr_lib::make_shared<SyncPolicyManager>(m_defaultIdentity, certificateName, m_chatroomPrefix);
-
-  m_transport = ndn::ptr_lib::make_shared<ndn::TcpTransport>();
-  m_face = ndn::ptr_lib::make_shared<ndn::Face>(m_transport, ndn::ptr_lib::make_shared<ndn::TcpTransport::ConnectionInfo>("localhost"));
-
-  connectToDaemon();
+  m_syncPolicyManager = ndn::ptr_lib::make_shared<SyncPolicyManager>(m_defaultIdentity, certificateName, m_chatroomPrefix, m_face, m_transport);
 
   connect(ui->inviteButton, SIGNAL(clicked()),
           this, SLOT(openInviteListDialog()));
@@ -129,10 +128,48 @@
       delete m_sock;
       m_sock = NULL;
     }
+  shutdownFace();
+}
+
+void
+ChatDialog::startFace()
+{
+  m_transport = ndn::ptr_lib::make_shared<ndn::TcpTransport>();
+  m_face = ndn::ptr_lib::make_shared<ndn::Face>(m_transport, ndn::ptr_lib::make_shared<ndn::TcpTransport::ConnectionInfo>("localhost"));
+  
+  connectToDaemon();
+
+  m_running = true;
+  m_thread = boost::thread (&ChatDialog::eventLoop, this);  
+}
+
+void
+ChatDialog::shutdownFace()
+{
+  {
+    boost::unique_lock<boost::recursive_mutex> lock(m_mutex);
+    m_running = false;
+  }
+  
+  m_thread.join();
   m_face->shutdown();
 }
 
 void
+ChatDialog::eventLoop()
+{
+  while (m_running)
+    {
+      try{
+        m_face->processEvents();
+        usleep(1000);
+      }catch(std::exception& e){
+        _LOG_DEBUG(" " << e.what() );
+      }
+    }
+}
+
+void
 ChatDialog::connectToDaemon()
 {
   //Hack! transport does not connect to daemon unless an interest is expressed.
@@ -314,7 +351,12 @@
   ndn::ptr_lib::shared_ptr<const ndn::Sha256WithRsaSignature> sha256sig = ndn::ptr_lib::dynamic_pointer_cast<const ndn::Sha256WithRsaSignature>(m_identityManager->signByCertificate(signedBlob.buf(), signedBlob.size(), certificateName));
   const ndn::Blob& sigBits = sha256sig->getSignature();
 
+  _LOG_DEBUG("size A: " << interestName.size());
+
   interestName.append(sigBits);
+
+  _LOG_DEBUG("size B: " << interestName.size());
+
   //TODO... remove version from invitation interest
   //  interestName.appendVersion();
 
@@ -421,6 +463,8 @@
   
   m_sock = new Sync::SyncSocket(m_chatroomPrefix.toUri(),
                                 m_syncPolicyManager,
+                                m_face,
+                                m_transport,
                                 boost::bind(&ChatDialog::processTreeUpdateWrapper, this, _1, _2),
                                 boost::bind(&ChatDialog::processRemoveWrapper, this, _1));
   
@@ -854,6 +898,8 @@
       usleep(100000);
       m_sock = new Sync::SyncSocket(m_chatroomPrefix.toUri(),
                                     m_syncPolicyManager,
+                                    m_face,
+                                    m_transport,
                                     bind(&ChatDialog::processTreeUpdateWrapper, this, _1, _2),
                                     bind(&ChatDialog::processRemoveWrapper, this, _1));
       usleep(100000);
diff --git a/src/chatdialog.h b/src/chatdialog.h
index 0c06783..be2c89b 100644
--- a/src/chatdialog.h
+++ b/src/chatdialog.h
@@ -33,6 +33,10 @@
 #include <sync-seq-no.h>
 #include "chatbuf.pb.h"
 #include "digesttreescene.h"
+
+#include <boost/thread/locks.hpp>
+#include <boost/thread/recursive_mutex.hpp>
+#include <boost/thread/thread.hpp>
 #endif
 
 typedef ndn::func_lib::function<void()> OnEventualTimeout;
@@ -49,6 +53,7 @@
 
 public:
   explicit ChatDialog(ndn::ptr_lib::shared_ptr<ContactManager> contactManager,
+                      ndn::ptr_lib::shared_ptr<ndn::IdentityManager> identityManager,
                       const ndn::Name& chatroomPrefix,
                       const ndn::Name& localPrefix,
                       const ndn::Name& defaultIdentity,
@@ -110,6 +115,15 @@
 
 private:
 
+  void 
+  startFace();
+
+  void
+  shutdownFace();
+
+  void
+  eventLoop();
+
   void
   connectToDaemon();
 
@@ -334,6 +348,10 @@
   ndn::ptr_lib::shared_ptr<ndn::Face> m_face;
   ndn::ptr_lib::shared_ptr<ndn::Transport> m_transport;
 
+  boost::recursive_mutex m_mutex;
+  boost::thread m_thread;
+  bool m_running;
+
   ndn::Name m_newLocalPrefix;
   bool m_newLocalPrefixReady;
 
diff --git a/src/chronos-invitation.cpp b/src/chronos-invitation.cpp
index 28d36e1..fb9d918 100644
--- a/src/chronos-invitation.cpp
+++ b/src/chronos-invitation.cpp
@@ -22,7 +22,7 @@
 ChronosInvitation::ChronosInvitation(const ndn::Name& originalInterestName)
   : m_interestName(originalInterestName)
 {
-  Name interestName = originalInterestName.getPrefix(-1);
+  Name interestName = originalInterestName;
   if(interestName.get(0).toEscapedString() != string("ndn")
      || interestName.get(1).toEscapedString() != string("broadcast")
      || interestName.get(2).toEscapedString() != string("chronos")
diff --git a/src/contact-manager.cpp b/src/contact-manager.cpp
index 25c32a1..b940bd8 100644
--- a/src/contact-manager.cpp
+++ b/src/contact-manager.cpp
@@ -28,48 +28,47 @@
 
 INIT_LOGGER("ContactManager");
 
-ContactManager::ContactManager(shared_ptr<IdentityManager> identityManager, QObject* parent)
-  : QObject(parent)
+ContactManager::ContactManager(shared_ptr<IdentityManager> identityManager, 
+                               shared_ptr<Face> face,
+                               shared_ptr<Transport> transport,
+                               QObject* parent)
+  : QObject(parent),
+    m_face(face),
+    m_transport(transport)
 {
   m_identityManager = identityManager;
   m_contactStorage = make_shared<ContactStorage>();
   m_dnsStorage = make_shared<DnsStorage>();
 
-  m_transport = make_shared<TcpTransport>();
-  m_face = make_shared<Face>(m_transport, make_shared<TcpTransport::ConnectionInfo>("localhost"));
-  
-  connectToDaemon();
-
   initializeSecurity();
 }
 
 ContactManager::~ContactManager()
-{
-}
+{}
 
-void
-ContactManager::connectToDaemon()
-{
-  //Hack! transport does not connect to daemon unless an interest is expressed.
-  Name name("/ndn");
-  shared_ptr<ndn::Interest> interest = make_shared<ndn::Interest>(name);
-  m_face->expressInterest(*interest, 
-                          bind(&ContactManager::onConnectionData, this, _1, _2),
-                          bind(&ContactManager::onConnectionDataTimeout, this, _1));
-}
+// void
+// ContactManager::connectToDaemon()
+// {
+//   //Hack! transport does not connect to daemon unless an interest is expressed.
+//   Name name("/ndn");
+//   shared_ptr<ndn::Interest> interest = make_shared<ndn::Interest>(name);
+//   m_face->expressInterest(*interest, 
+//                           bind(&ContactManager::onConnectionData, this, _1, _2),
+//                           bind(&ContactManager::onConnectionDataTimeout, this, _1));
+// }
 
-void
-ContactManager::onConnectionData(const shared_ptr<const ndn::Interest>& interest,
-                            const shared_ptr<Data>& data)
-{
-  _LOG_DEBUG("onConnectionData");
-}
+// void
+// ContactManager::onConnectionData(const shared_ptr<const ndn::Interest>& interest,
+//                             const shared_ptr<Data>& data)
+// {
+//   _LOG_DEBUG("onConnectionData");
+// }
 
-void
-ContactManager::onConnectionDataTimeout(const shared_ptr<const ndn::Interest>& interest)
-{
-  _LOG_DEBUG("onConnectionDataTimeout");
-}
+// void
+// ContactManager::onConnectionDataTimeout(const shared_ptr<const ndn::Interest>& interest)
+// {
+//   _LOG_DEBUG("onConnectionDataTimeout");
+// }
 
 void
 ContactManager::initializeSecurity()
@@ -291,7 +290,7 @@
 }
 
 void
-ContactManager::fetchIdCertificate(const ndn::Name& certName)
+ContactManager::fetchIdCertificate(const Name& certName)
 {
   Name interestName = certName;
   
@@ -308,7 +307,9 @@
 
 void
 ContactManager::onIdCertificateTimeoutNotify(const Name& identity)
-{ emit contactCertificateFetchFailed (identity); }
+{ 
+  emit contactCertificateFetchFailed (identity); 
+}
 
 
 void
@@ -320,7 +321,9 @@
 
 void
 ContactManager::onIdCertificateVerifyFailed(const shared_ptr<Data>& data, const Name& identity)
-{ emit contactCertificateFetchFailed (identity); }
+{ 
+  emit contactCertificateFetchFailed (identity); 
+}
 
 void
 ContactManager::onTargetData(const shared_ptr<const ndn::Interest>& interest, 
@@ -405,7 +408,7 @@
                              int retry /* = 1 */,
                              int stepCount /* = 0 */)
 {
-  m_face->expressInterest(interest, 
+  uint64_t id = m_face->expressInterest(interest, 
                           boost::bind(&ContactManager::onTargetData, 
                                       this,
                                       _1,
@@ -422,6 +425,8 @@
                                       onVerified,
                                       onVerifyFailed,
                                       timeoutNotify));
+
+  _LOG_DEBUG("id: " << id << " entry id: " << m_face->getNode().getEntryIndexForExpressedInterest(interest.getName()));
 }
 
 void
diff --git a/src/contact-manager.h b/src/contact-manager.h
index 0c4cc06..d096abf 100644
--- a/src/contact-manager.h
+++ b/src/contact-manager.h
@@ -31,6 +31,8 @@
 
 public:
   ContactManager(ndn::ptr_lib::shared_ptr<ndn::IdentityManager> identityManager,
+                 ndn::ptr_lib::shared_ptr<ndn::Face> m_face,
+                 ndn::ptr_lib::shared_ptr<ndn::Transport> m_transport,
                  QObject* parent = 0);
 
   ~ContactManager();
@@ -89,15 +91,15 @@
   { return m_identityManager; }
 
 private:
-  void 
-  connectToDaemon();
+  // void 
+  // connectToDaemon();
 
-  void
-  onConnectionData(const ndn::ptr_lib::shared_ptr<const ndn::Interest>& interest,
-                   const ndn::ptr_lib::shared_ptr<ndn::Data>& data);
+  // void
+  // onConnectionData(const ndn::ptr_lib::shared_ptr<const ndn::Interest>& interest,
+  //                  const ndn::ptr_lib::shared_ptr<ndn::Data>& data);
  
-  void
-  onConnectionDataTimeout(const ndn::ptr_lib::shared_ptr<const ndn::Interest>& interest);
+  // void
+  // onConnectionDataTimeout(const ndn::ptr_lib::shared_ptr<const ndn::Interest>& interest);
   
   void
   initializeSecurity();
diff --git a/src/contactpanel.cpp b/src/contactpanel.cpp
index f3ad618..d9f3324 100644
--- a/src/contactpanel.cpp
+++ b/src/contactpanel.cpp
@@ -56,14 +56,16 @@
 {
   qRegisterMetaType<IdentityCertificate>("IdentityCertificate");
   qRegisterMetaType<ChronosInvitation>("ChronosInvitation");
-  
+
+  startFace();  
+
   createAction();
 
   shared_ptr<BasicIdentityStorage> publicStorage = make_shared<BasicIdentityStorage>();
   shared_ptr<OSXPrivateKeyStorage> privateStorage = make_shared<OSXPrivateKeyStorage>();
   m_identityManager = make_shared<IdentityManager>(publicStorage, privateStorage);
 
-  m_contactManager = make_shared<ContactManager>(m_identityManager);
+  m_contactManager = make_shared<ContactManager>(m_identityManager, m_face, m_transport);
 
   connect(&*m_contactManager, SIGNAL(noNdnConnection(const QString&)),
           this, SLOT(showError(const QString&)));
@@ -96,10 +98,6 @@
  
   ui->setupUi(this);
 
-  m_transport = make_shared<TcpTransport>();
-  m_face = make_shared<Face>(m_transport, make_shared<TcpTransport::ConnectionInfo>("localhost"));
-  
-  connectToDaemon();
   
   m_localPrefix = Name("/private/local");
   setLocalPrefix();
@@ -201,6 +199,46 @@
   map<Name, ChatDialog*>::iterator it = m_chatDialogs.begin();
   for(; it != m_chatDialogs.end(); it++)
     delete it->second;
+
+  shutdownFace();
+}
+
+void
+ContactPanel::startFace()
+{
+  m_transport = make_shared<TcpTransport>();
+  m_face = make_shared<Face>(m_transport, make_shared<TcpTransport::ConnectionInfo>("localhost"));
+  
+  connectToDaemon();
+
+  m_running = true;
+  m_thread = boost::thread (&ContactPanel::eventLoop, this);  
+}
+
+void
+ContactPanel::shutdownFace()
+{
+  {
+    boost::unique_lock<boost::recursive_mutex> lock(m_mutex);
+    m_running = false;
+  }
+  
+  m_thread.join();
+  m_face->shutdown();
+}
+
+void
+ContactPanel::eventLoop()
+{
+  while (m_running)
+    {
+      try{
+        m_face->processEvents();
+        usleep(100);
+      }catch(std::exception& e){
+        _LOG_DEBUG(" " << e.what() );
+      }
+    }
 }
 
 void
@@ -251,6 +289,7 @@
   vector<shared_ptr<ContactItem> >::const_iterator it = m_contactList.begin();
   for(; it != m_contactList.end(); it++)
     {
+      _LOG_DEBUG("load contact: " << (*it)->getNameSpace().toUri());
       m_policyManager->addTrustAnchor((*it)->getSelfEndorseCertificate());
     }
 }
@@ -419,6 +458,7 @@
                            uint64_t registeredPrefixId)
 {
   _LOG_DEBUG("Receive invitation!" << interest->getName().toUri());
+
   
   shared_ptr<ChronosInvitation> invitation;
   try{
@@ -465,6 +505,8 @@
       return;
     }
 
+  _LOG_DEBUG("Cannot find the inviter's key in trust anchors");
+
   Interest newInterest(invitation->getInviterCertificateName());
   OnVerified onVerified = boost::bind(&ContactPanel::onInvitationCertVerified, this, _1, invitation);
   OnVerifyFailed onVerifyFailed = boost::bind(&ContactPanel::onInvitationCertVerifyFailed, this, _1);
@@ -818,7 +860,7 @@
   Name inviteeNamespace(invitee.toStdString());
   shared_ptr<ContactItem> inviteeItem = m_contactManager->getContact(inviteeNamespace);
 
-  ChatDialog* chatDialog = new ChatDialog(m_contactManager, chatroomName, m_localPrefix, m_defaultIdentity, m_nickName);
+  ChatDialog* chatDialog = new ChatDialog(m_contactManager, m_identityManager, chatroomName, m_localPrefix, m_defaultIdentity, m_nickName);
   m_chatDialogs.insert(pair <Name, ChatDialog*> (chatroomName, chatDialog));
 
   connect(chatDialog, SIGNAL(closeChatDialog(const ndn::Name&)),
@@ -844,7 +886,7 @@
   Name chatroomName("/ndn/broadcast/chronos");
   chatroomName.append(invitation.getChatroom());
 
-  ChatDialog* chatDialog = new ChatDialog(m_contactManager, chatroomName, m_localPrefix, m_defaultIdentity, m_nickName, true);
+  ChatDialog* chatDialog = new ChatDialog(m_contactManager, m_identityManager, chatroomName, m_localPrefix, m_defaultIdentity, m_nickName, true);
 
   connect(chatDialog, SIGNAL(closeChatDialog(const ndn::Name&)),
           this, SLOT(removeChatDialog(const ndn::Name&)));
@@ -867,7 +909,12 @@
 ContactPanel::acceptInvitation(const ChronosInvitation& invitation, 
                                const IdentityCertificate& identityCertificate)
 {
-  Data data(invitation.getInterestName());
+  Name dataName = invitation.getInterestName();
+  time_t nowSeconds = time(NULL);
+  struct tm current = *gmtime(&nowSeconds);
+  MillisecondsSince1970 version = timegm(&current) * 1000.0;
+  dataName.appendVersion(version);
+  Data data(dataName);
   string content = m_localPrefix.toUri();
   data.setContent((const uint8_t *)&content[0], content.size());
   data.getMetaInfo().setTimestampMilliseconds(time(NULL) * 1000.0);
diff --git a/src/contactpanel.h b/src/contactpanel.h
index 1c2c9fc..615a836 100644
--- a/src/contactpanel.h
+++ b/src/contactpanel.h
@@ -32,6 +32,9 @@
 #include "contact-manager.h"
 #include "chronos-invitation.h"
 #include "panel-policy-manager.h"
+#include <boost/thread/locks.hpp>
+#include <boost/thread/recursive_mutex.hpp>
+#include <boost/thread/thread.hpp>
 #endif
 
 
@@ -49,6 +52,16 @@
   ~ContactPanel();
 
 private:
+  
+  void 
+  startFace();
+
+  void
+  shutdownFace();
+
+  void
+  eventLoop();
+  
   void 
   connectToDaemon();
 
@@ -275,6 +288,11 @@
   ndn::ptr_lib::shared_ptr<ndn::IdentityManager> m_identityManager;
   ndn::ptr_lib::shared_ptr<ndn::Transport> m_transport;
   ndn::ptr_lib::shared_ptr<ndn::Face> m_face;
+
+  boost::recursive_mutex m_mutex;
+  boost::thread m_thread;
+  bool m_running;
+
   uint64_t m_invitationListenerId;
 
   ndn::Name m_defaultIdentity;
diff --git a/src/invitation-policy-manager.cpp b/src/invitation-policy-manager.cpp
index cd86cbd..0885e25 100644
--- a/src/invitation-policy-manager.cpp
+++ b/src/invitation-policy-manager.cpp
@@ -79,20 +79,20 @@
   if(m_invitationPolicyRule->satisfy(*data))
     {
       // Name keyName = IdentityCertificate::certificateNameToPublicKeyName(keyLocatorName);
-      // map<Name, Publickey>::iterator it = m_trustAnchors.find(keyName);
+      // map<Name, PublicKey>::iterator it = m_trustAnchors.find(keyName);
       // if(m_trustAnchors.end() != it)
       //   {
-      //     if(verifySignature(*data, it->second))
-      //       verifiedCallback(data);
+      //     if(Sha256WithRsaHandler::verifySignature(*data, it->second))
+      //       onVerified(data);
       //     else
-      //       unverifiedCallback(data);
+      //       onVerifyFailed(data);
 
-      //     return NULL;
+      //     return CHRONOCHAT_NULL_VALIDATIONREQUEST_PTR;
       //   }
 
       shared_ptr<const Certificate> trustedCert = m_certificateCache.getCertificate(keyLocatorName);
       
-      if(!trustedCert){
+      if(trustedCert != ndn::TCC_NULL_CERTIFICATE_PTR){
 	if(Sha256WithRsaHandler::verifySignature(*data, trustedCert->getPublicKeyInfo()))
 	  onVerified(data);
 	else
diff --git a/src/null-ptrs.h b/src/null-ptrs.h
index 0dfd3f2..0120a2f 100644
--- a/src/null-ptrs.h
+++ b/src/null-ptrs.h
@@ -19,6 +19,7 @@
 #include "profile.h"
 #include <ndn-cpp/security/certificate/identity-certificate.hpp>
 #include <ndn-cpp/security/policy/validation-request.hpp>
+#include <ndn-cpp/security/certificate/certificate.hpp>
 
 
 static std::string CHRONOCHAT_NULL_STR;
@@ -31,5 +32,6 @@
 static ndn::ptr_lib::shared_ptr<Profile> CHRONOCHAT_NULL_PROFILE_PTR;
 static ndn::ptr_lib::shared_ptr<ndn::PublicKey> CHRONOCHAT_NULL_PUBLICKEY_PTR;
 static ndn::ptr_lib::shared_ptr<ndn::ValidationRequest> CHRONOCHAT_NULL_VALIDATIONREQUEST_PTR;
+static ndn::ptr_lib::shared_ptr<const ndn::Certificate> CHRONOCHAT_NULL_CONST_CERTIFICATE_PTR;
 
 #endif
diff --git a/src/panel-policy-manager.cpp b/src/panel-policy-manager.cpp
index 8d6300d..92511ed 100644
--- a/src/panel-policy-manager.cpp
+++ b/src/panel-policy-manager.cpp
@@ -171,7 +171,7 @@
 void
 PanelPolicyManager::addTrustAnchor(const EndorseCertificate& selfEndorseCertificate)
 { 
-  // _LOG_DEBUG("Add Anchor: " << selfEndorseCertificate.getPublicKeyName().toUri());
+  _LOG_DEBUG("Add Anchor: " << selfEndorseCertificate.getPublicKeyName().toUri());
   m_trustAnchors.insert(pair <Name, PublicKey > (selfEndorseCertificate.getPublicKeyName(), selfEndorseCertificate.getPublicKeyInfo())); 
 }
 
@@ -185,6 +185,7 @@
 PanelPolicyManager::getTrustedKey(const Name& inviterCertName)
 {
   Name keyLocatorName = inviterCertName.getPrefix(-1);
+  _LOG_DEBUG("inviter cert name: " << inviterCertName.toUri());
   m_keyNameRegex->match(keyLocatorName);
   Name keyName = m_keyNameRegex->expand();
 
diff --git a/src/profile-data.cpp b/src/profile-data.cpp
index 6bb70cc..0e17552 100644
--- a/src/profile-data.cpp
+++ b/src/profile-data.cpp
@@ -44,11 +44,11 @@
 
 }
 
-ProfileData::ProfileData(const ProfileData& profileData)
-  : Data(profileData)
-  , m_identity(profileData.m_identity)
-  , m_profile(profileData.m_profile)
-{}
+// ProfileData::ProfileData(const ProfileData& profileData)
+//   : Data(profileData)
+//   , m_identity(profileData.m_identity)
+//   , m_profile(profileData.m_profile)
+// {}
 
 ProfileData::ProfileData(const Data& data)
   : Data(data)
diff --git a/src/profile-data.h b/src/profile-data.h
index dcde0d8..dbe4ca5 100644
--- a/src/profile-data.h
+++ b/src/profile-data.h
@@ -21,7 +21,7 @@
 
   ProfileData(const Profile& profile);
 
-  ProfileData(const ProfileData& profileData);
+  // ProfileData(const ProfileData& profileData);
 
   ProfileData(const ndn::Data& data);
 
