diff --git a/src/addcontactpanel.cpp b/src/addcontactpanel.cpp
index c5c80e4..8e90f66 100644
--- a/src/addcontactpanel.cpp
+++ b/src/addcontactpanel.cpp
@@ -130,6 +130,7 @@
   }catch(exception& e){
     m_warningDialog->setMsg(e.what());
     m_warningDialog->show();
+    _LOG_ERROR("Exception: " << e.what());
     return;
   }
   emit newContactAdded();
@@ -139,7 +140,14 @@
 void 
 AddContactPanel::selfEndorseCertificateFetched(const EndorseCertificate& endorseCertificate)
 {
-  m_currentEndorseCertificate = Ptr<EndorseCertificate>(new EndorseCertificate(endorseCertificate));
+  try{
+    m_currentEndorseCertificate = Ptr<EndorseCertificate>(new EndorseCertificate(endorseCertificate));
+  }catch(exception& e){
+    m_warningDialog->setMsg(e.what());
+    m_warningDialog->show();
+    _LOG_ERROR("Exception: " << e.what());
+    return;
+  }
   m_currentEndorseCertificateReady = true;
 
   if(m_currentCollectEndorseReady == true)
@@ -156,7 +164,14 @@
 void
 AddContactPanel::onContactKeyFetched(const EndorseCertificate& endorseCertificate)
 {
-  m_currentEndorseCertificate = Ptr<EndorseCertificate>(new EndorseCertificate(endorseCertificate));
+  try{
+    m_currentEndorseCertificate = Ptr<EndorseCertificate>(new EndorseCertificate(endorseCertificate));
+  }catch(exception& e){
+    m_warningDialog->setMsg(e.what());
+    m_warningDialog->show();
+    _LOG_ERROR("Exception: " << e.what());
+    return;
+  }
 
   m_currentCollectEndorseReady = NULL;
 
@@ -193,7 +208,7 @@
 void
 AddContactPanel::displayContactInfo()
 {
-  _LOG_TRACE("displayContactInfo");
+  // _LOG_TRACE("displayContactInfo");
   const Profile& profile = m_currentEndorseCertificate->getProfileData()->getProfile();
   const Blob& profileBlob = m_currentEndorseCertificate->getProfileData()->content();
 
@@ -201,7 +216,6 @@
 
   if(m_currentCollectEndorse != NULL)
     {
-      _LOG_DEBUG("CollectEndorse fetched");
       boost::iostreams::stream
         <boost::iostreams::array_source> is (m_currentCollectEndorse->content().buf(), m_currentCollectEndorse->content().size());
   
@@ -212,10 +226,16 @@
       for(int i = 0; i < children.size(); i++)
         {
           Ptr<Blob> dataBlob = boost::any_cast<Ptr<Blob> >(children[i]->accept(simpleVisitor));
-          Ptr<Data> data = Data::decodeFromWire(dataBlob);
-          Ptr<EndorseCertificate> endorseCert = Ptr<EndorseCertificate>(new EndorseCertificate(*data));
-          _LOG_DEBUG("endorseCert name: " << endorseCert->getName().toUri());
           
+          Ptr<Data> data = NULL;
+          Ptr<EndorseCertificate> endorseCert = NULL;
+          try{
+            data = Data::decodeFromWire(dataBlob);
+            endorseCert = Ptr<EndorseCertificate>(new EndorseCertificate(*data));
+          }catch(exception& e){
+            continue;
+          }
+
           Name signerKeyName = endorseCert->getSigner();
           Name signerName = signerKeyName.getPrefix(signerKeyName.size()-1);
           
@@ -239,12 +259,6 @@
             endorseCount[*it] += 1;
         }
     }
-
-  // map<string, int>::iterator tmp_it = endorseCount.begin();
-  // for(; tmp_it != endorseCount.end(); tmp_it++)
-  //   {
-  //     _LOG_DEBUG("Entry: " << tmp_it->first << " " << tmp_it->second);
-  //   }
   
   ui->infoView->setColumnCount(3);
   Profile::const_iterator it = profile.begin();
diff --git a/src/chat-policy-rule.cpp b/src/chat-policy-rule.cpp
index 201cf70..76d0cf1 100644
--- a/src/chat-policy-rule.cpp
+++ b/src/chat-policy-rule.cpp
@@ -36,7 +36,15 @@
 bool 
 ChatPolicyRule::matchSignerName(const Data & data)
 { 
-  Ptr<const signature::Sha256WithRsa> sigPtr = DynamicCast<const signature::Sha256WithRsa> (data.getSignature());
+  Ptr<const Signature> sig = data.getSignature();
+
+  if(NULL == sig)
+    return false;
+
+  Ptr<const signature::Sha256WithRsa> sigPtr = DynamicCast<const signature::Sha256WithRsa> (sig);
+  if(KeyLocator::KEYNAME != sigPtr->getKeyLocator().getType())
+    return false;
+
   Name signerName = sigPtr->getKeyLocator ().getKeyName ();
   return m_signerRegex->match(signerName); 
 }
diff --git a/src/chatdialog.cpp b/src/chatdialog.cpp
index 1e30f87..fd3179c 100644
--- a/src/chatdialog.cpp
+++ b/src/chatdialog.cpp
@@ -46,7 +46,7 @@
   , m_chatroomPrefix(chatroomPrefix)
   , m_localPrefix(localPrefix)
   , m_defaultIdentity(defaultIdentity)
-  , m_invitationPolicyManager(ndn::Ptr<InvitationPolicyManager>(new InvitationPolicyManager(m_chatroomPrefix.get(-1).toUri())))
+  , m_invitationPolicyManager(ndn::Ptr<InvitationPolicyManager>(new InvitationPolicyManager(m_chatroomPrefix.get(-1).toUri(), m_defaultIdentity)))
   , m_nick(nick)
   , m_sock(NULL)
   , m_lastMsgTime(0)
@@ -328,7 +328,6 @@
   QTimer::singleShot(2200, this, SLOT(enableTreeDisplay()));
   // Sync::CcnxWrapperPtr handle = boost::make_shared<Sync::CcnxWrapper> ();
   // handle->setInterestFilter(m_user.getPrefix().toStdString(), bind(&ChatDialog::respondHistoryRequest, this, _1));
-  // _LOG_DEBUG("initializeSync is done!");
 }
 
 void
diff --git a/src/chronos-invitation.cpp b/src/chronos-invitation.cpp
index 5a392a1..f918342 100644
--- a/src/chronos-invitation.cpp
+++ b/src/chronos-invitation.cpp
@@ -42,8 +42,6 @@
     throw LnException("Wrong ChronosInvitation Name, No chatroom tag");
   m_inviteeNameSpace = interestName.getSubName(inviteeBegin, i - inviteeBegin);
 
-  _LOG_DEBUG(m_inviteeNameSpace.toUri());
-
   string inviterPrefixStr("inviter-prefix");
   int chatroomBegin = (++i);
   for(; i < size;  i++)
@@ -54,8 +52,6 @@
     throw LnException("Wrong ChronosInvitation Name, No inviter-prefix tag");
   m_chatroom = interestName.getSubName(chatroomBegin, i - chatroomBegin);
 
-  _LOG_DEBUG(m_chatroom.toUri());
-
   string inviterStr("inviter");
   int inviterPrefixBegin = (++i);
   for(; i < size; i++)
@@ -66,12 +62,8 @@
     throw LnException("Wrong ChronosInvitation Name, No inviter tag");
   m_inviterPrefix = interestName.getSubName(inviterPrefixBegin, i - inviterPrefixBegin);
 
-  _LOG_DEBUG(m_inviterPrefix.toUri());
-
   int inviterCertBegin = (++i);
   m_inviterCertificateName = interestName.getSubName(inviterCertBegin, size - 1 - inviterCertBegin);
-
-  _LOG_DEBUG(m_inviterCertificateName.toUri());
   
   string signature = interestName.get(-1).toBlob();
   m_signatureBits.insert(m_signatureBits.end(), signature.begin(), signature.end());
diff --git a/src/contact-item.cpp b/src/contact-item.cpp
index 839988c..9ce1b66 100644
--- a/src/contact-item.cpp
+++ b/src/contact-item.cpp
@@ -28,41 +28,14 @@
   , m_isIntroducer(isIntroducer)
 {
   Name endorsedkeyName = selfEndorseCertificate.getPublicKeyName();
-  // Ptr<const signature::Sha256WithRsa> endorseSig = boost::dynamic_pointer_cast<const signature::Sha256WithRsa>(selfEndorseCertificate.getSignature());
-  // const Name& signingKeyName = endorseSig->getKeyLocator().getKeyName();
-  
-  // int i = 0;
-  // int j = -1;
-  // string keyString("KEY");
-  // string idString("ID-CERT");
-  // for(; i < signingKeyName.size(); i++)
-  //   {
-  //     if(keyString == signingKeyName.get(i).toUri())
-  //       j = i;
-  //     if(idString == signingKeyName.get(i).toUri())
-  //       break;
-  //   }
-
-  // if(i >= signingKeyName.size() || j < 0)
-  //   throw LnException("Wrong name!");
-
-  // Name subName = signingKeyName.getSubName(0, j);
-  // subName.append(signingKeyName.getSubName(j+1, i-j-1));
-
-
-
-  // // _LOG_DEBUG("endorsedkeyName " << endorsedkeyName.toUri());
-  // // _LOG_DEBUG("subKeyName " << subName.toUri());
-
-  // if(endorsedkeyName != subName)
-  //   throw LnException("not a self-claimed");
 
   m_namespace = endorsedkeyName.getSubName(0, endorsedkeyName.size() - 1);
-  m_alias = alias.empty() ? m_namespace.toUri() : alias;
+
 
   Ptr<ProfileData> profileData = selfEndorseCertificate.getProfileData();
   Ptr<const Blob> nameBlob = profileData->getProfile().getProfileEntry("name");
   m_name = string(nameBlob->buf(), nameBlob->size());
+  m_alias = alias.empty() ? m_name : alias;
   Ptr<const Blob> institutionBlob = profileData->getProfile().getProfileEntry("institution");
   m_institution = string(institutionBlob->buf(), institutionBlob->size());
 }
diff --git a/src/contact-manager.cpp b/src/contact-manager.cpp
index 2b834c6..651ab82 100644
--- a/src/contact-manager.cpp
+++ b/src/contact-manager.cpp
@@ -232,11 +232,17 @@
   Name certificateName = identityManager->getDefaultCertificateName ();
   identityManager->signByCertificate(*profileData, certificateName);
 
-  EndorseCertificate endorseCertificate(identityCertificate, profileData);
+  Ptr<EndorseCertificate> endorseCertificate = NULL;
+  try{
+    endorseCertificate = Ptr<EndorseCertificate>(new EndorseCertificate(identityCertificate, profileData));
+  }catch(exception& e){
+    _LOG_ERROR("Exception: " << e.what());
+    return;
+  }
 
-  identityManager->signByCertificate(endorseCertificate, certificateName);
+  identityManager->signByCertificate(*endorseCertificate, certificateName);
 
-  emit contactKeyFetched (endorseCertificate); 
+  emit contactKeyFetched (*endorseCertificate); 
 }
 
 void
@@ -250,7 +256,6 @@
 void
 ContactManager::updateProfileData(const Name& identity)
 {
-  // _LOG_DEBUG("updateProfileData: " << identity.toUri());
   // Get current profile;
   Ptr<Profile> newProfile = m_contactStorage->getSelfProfile(identity);
   if(NULL == newProfile)
@@ -261,19 +266,26 @@
   Ptr<Blob> profileDataBlob = m_contactStorage->getSelfEndorseCertificate(identity);
   if(NULL != profileDataBlob)
     {
-      Ptr<Data> plainData = Data::decodeFromWire(profileDataBlob);
-      EndorseCertificate oldEndorseCertificate(*plainData);    
-      // _LOG_DEBUG("Certificate converted!");
-      const Blob& oldProfileBlob = oldEndorseCertificate.getProfileData()->content();
+      
+      Ptr<EndorseCertificate> oldEndorseCertificate = NULL;
+      try{
+        Ptr<Data> plainData = Data::decodeFromWire(profileDataBlob);
+        oldEndorseCertificate = Ptr<EndorseCertificate>(new EndorseCertificate(*plainData));
+      }catch(exception& e){
+        _LOG_ERROR("Exception: " << e.what());
+        return;
+      }
+
+      const Blob& oldProfileBlob = oldEndorseCertificate->getProfileData()->content();
 
       if(oldProfileBlob == *newProfileBlob)
         return;
 
       Ptr<EndorseCertificate> newEndorseCertificate = getSignedSelfEndorseCertificate(identity, *newProfile);
-      // _LOG_DEBUG("Signing DONE!");
+
       if(NULL == newEndorseCertificate)
         return;
-      // _LOG_DEBUG("About to update");
+
       m_contactStorage->updateSelfEndorseCertificate(newEndorseCertificate, identity);
 
       publishSelfEndorseCertificateInDNS(newEndorseCertificate);
@@ -281,10 +293,10 @@
   else
     {
       Ptr<EndorseCertificate> newEndorseCertificate = getSignedSelfEndorseCertificate(identity, *newProfile);
-      // _LOG_DEBUG("Signing DONE!");
+
       if(NULL == newEndorseCertificate)
         return;
-      // _LOG_DEBUG("About to Insert");
+
       m_contactStorage->addSelfEndorseCertificate(newEndorseCertificate, identity);
 
       publishSelfEndorseCertificateInDNS(newEndorseCertificate);
@@ -298,9 +310,15 @@
   Ptr<EndorseCertificate> newEndorseCertificate = generateEndorseCertificate(identity, signerIdentity);
   if(NULL != oldEndorseCertificateBlob)
     {
-      Ptr<Data> plainData = Data::decodeFromWire(oldEndorseCertificateBlob);
-      EndorseCertificate oldEndorseCertificate(*plainData);
-      const Blob& oldEndorseContent = oldEndorseCertificate.content();
+      Ptr<EndorseCertificate> oldEndorseCertificate = NULL;
+      try{
+        Ptr<Data> plainData = Data::decodeFromWire(oldEndorseCertificateBlob);
+        oldEndorseCertificate = Ptr<EndorseCertificate>(new EndorseCertificate(*plainData));
+      }catch(exception& e){
+        _LOG_ERROR("Exception: " << e.what());
+        return;
+      }
+      const Blob& oldEndorseContent = oldEndorseCertificate->content();
       const Blob& newEndorseContent = newEndorseCertificate->content();
       if(oldEndorseContent == newEndorseContent)
         return;
@@ -327,7 +345,13 @@
 
   vector<string> endorseList = m_contactStorage->getEndorseList(identity);
 
-  Ptr<EndorseCertificate> cert = Ptr<EndorseCertificate>(new EndorseCertificate(contact->getSelfEndorseCertificate(), signerKeyName, endorseList)); 
+  Ptr<EndorseCertificate> cert = NULL;
+  try{
+    cert = Ptr<EndorseCertificate>(new EndorseCertificate(contact->getSelfEndorseCertificate(), signerKeyName, endorseList)); 
+  }catch(exception& e){
+    _LOG_ERROR("Exception: " << e.what());
+    return NULL;
+  } 
   identityManager->signByCertificate(*cert, signerCertName);
 
   return cert;
@@ -384,9 +408,16 @@
   for(; it != profile.end(); it++)
     endorseList.push_back(it->first);
   
-  Ptr<EndorseCertificate> selfEndorseCertificate = Ptr<EndorseCertificate>(new EndorseCertificate(*kskCert,
-                                                                                                  profileData,
-                                                                                                  endorseList));
+  Ptr<EndorseCertificate> selfEndorseCertificate = NULL;
+  try{
+    selfEndorseCertificate = Ptr<EndorseCertificate>(new EndorseCertificate(*kskCert,
+                                                                            profileData,
+                                                                            endorseList));
+  }catch(exception& e){
+    _LOG_ERROR("Exception: " << e.what());
+    return NULL;
+  } 
+
   identityManager->signByCertificate(*selfEndorseCertificate, kskCert->getName());
 
   return selfEndorseCertificate;
@@ -398,9 +429,15 @@
 {
   Ptr<Blob> dataContentBlob = Ptr<Blob>(new Blob(data->content().buf(), data->content().size()));
 
-  Ptr<Data> plainData = Data::decodeFromWire(dataContentBlob);
-
-  Ptr<EndorseCertificate> selfEndorseCertificate = Ptr<EndorseCertificate>(new EndorseCertificate(*plainData));
+  Ptr<Data> plainData = NULL;
+  Ptr<EndorseCertificate> selfEndorseCertificate = NULL;
+  try{
+    plainData = Data::decodeFromWire(dataContentBlob);
+    selfEndorseCertificate = Ptr<EndorseCertificate>(new EndorseCertificate(*plainData));
+  }catch(exception& e){
+    _LOG_ERROR("Exception: " << e.what());
+    return;
+  }
 
   const security::Publickey& ksk = selfEndorseCertificate->getPublicKeyInfo();
 
diff --git a/src/contactpanel.cpp b/src/contactpanel.cpp
index de35f51..57d8c80 100644
--- a/src/contactpanel.cpp
+++ b/src/contactpanel.cpp
@@ -55,14 +55,9 @@
   
   createAction();
 
-  openDB();    
-
   m_contactManager = contactManager;
-  m_profileEditor = new ProfileEditor(m_contactManager);
-  m_addContactPanel = new AddContactPanel(contactManager);
-  m_setAliasDialog = new SetAliasDialog(contactManager);
- 
-  ui->setupUi(this);
+
+  openDB();    
 
   refreshContactList();
 
@@ -72,6 +67,14 @@
   m_nickName = m_defaultIdentity.get(-1).toUri();
   m_settingDialog->setIdentity(m_defaultIdentity.toUri(), m_nickName);
 
+  m_profileEditor = new ProfileEditor(m_contactManager);
+  m_profileEditor->setCurrentIdentity(m_defaultIdentity);
+
+  m_addContactPanel = new AddContactPanel(contactManager);
+  m_setAliasDialog = new SetAliasDialog(contactManager);
+ 
+  ui->setupUi(this);
+
   m_handler = Ptr<Wrapper>(new Wrapper(m_keychain));  
 
   setLocalPrefix();
@@ -184,7 +187,9 @@
 
   vector<Ptr<ContactItem> >::const_iterator it = m_contactList.begin();
   for(; it != m_contactList.end(); it++)
-    m_panelPolicyManager->addTrustAnchor((*it)->getSelfEndorseCertificate());
+    {
+      m_panelPolicyManager->addTrustAnchor((*it)->getSelfEndorseCertificate());
+    }
 
   m_keychain = Ptr<security::Keychain>(new security::Keychain(Ptr<security::IdentityManager>::Create(), 
                                                               m_panelPolicyManager, 
@@ -243,15 +248,21 @@
 ContactPanel::onInvitation(Ptr<Interest> interest)
 {
   _LOG_DEBUG("Receive invitation!" << interest->getName().toUri());
-
-  Ptr<ChronosInvitation> invitation = Ptr<ChronosInvitation>(new ChronosInvitation(interest->getName()));
-
+  
+  Ptr<ChronosInvitation> invitation = NULL;
+  try{
+    invitation = Ptr<ChronosInvitation>(new ChronosInvitation(interest->getName()));
+  }catch(exception& e){
+    _LOG_ERROR("Exception: " << e.what());
+    return;
+  }
+  
   Name chatroomName("/ndn/broadcast/chronos");
   chatroomName.append(invitation->getChatroom());
   map<Name, ChatDialog*>::iterator it = m_chatDialogs.find(chatroomName);
   if(it != m_chatDialogs.end())
     {
-      _LOG_DEBUG("Exisiting chatroom!");
+      _LOG_ERROR("Exisiting chatroom!");
       return;
     }
 
@@ -485,6 +496,7 @@
 ContactPanel::updateDefaultIdentity(const QString& identity, const QString& nickName)
 { 
   m_defaultIdentity = Name(identity.toStdString());
+  m_profileEditor->setCurrentIdentity(m_defaultIdentity);
   m_nickName = nickName.toStdString();
   m_handler->clearInterestFilter(m_inviteListenPrefix);
   setInvitationListener();
diff --git a/src/dns-storage.cpp b/src/dns-storage.cpp
index 70d04fe..52a23b2 100644
--- a/src/dns-storage.cpp
+++ b/src/dns-storage.cpp
@@ -80,7 +80,6 @@
 
   if(sqlite3_step (stmt) != SQLITE_ROW)
     {
-      _LOG_DEBUG("INSERT");
       sqlite3_finalize(stmt);
       sqlite3_prepare_v2 (m_db, "INSERT INTO DnsData (dns_identity, dns_name, dns_type, dns_value, data_name) VALUES (?, ?, ?, ?, ?)", -1, &stmt, 0);
       sqlite3_bind_text(stmt, 1, identity.c_str(), identity.size(), SQLITE_TRANSIENT);
@@ -93,7 +92,6 @@
     }
   else
     {
-      _LOG_DEBUG("UPDATE");
       sqlite3_finalize(stmt);
       sqlite3_prepare_v2 (m_db, "UPDATE DnsData SET dns_value=?, data_name=? WHERE dns_identity=? and dns_name=?, dns_type=?", -1, &stmt, 0);
       sqlite3_bind_text(stmt, 1, data.buf(), data.size(), SQLITE_TRANSIENT);
@@ -148,10 +146,13 @@
   
   if(sqlite3_step (stmt) == SQLITE_ROW)
     {
-      Blob dnsDataBlob(reinterpret_cast<const char *>(sqlite3_column_text(stmt, 0)), sqlite3_column_bytes (stmt, 0));
-      boost::iostreams::stream
-        <boost::iostreams::array_source> is (dnsDataBlob.buf(), dnsDataBlob.size());
-      return Data::decodeFromWire(is);
+      Ptr<Blob> dnsDataBlob = Ptr<Blob>(new Blob(reinterpret_cast<const char *>(sqlite3_column_text(stmt, 0)), sqlite3_column_bytes (stmt, 0)));
+      // boost::iostreams::stream
+      //   <boost::iostreams::array_source> is (dnsDataBlob.buf(), dnsDataBlob.size());
+      sqlite3_finalize(stmt);
+      return Data::decodeFromWire(dnsDataBlob);
     }
+  sqlite3_finalize(stmt);
+
   return NULL;
 }
diff --git a/src/endorse-certificate.cpp b/src/endorse-certificate.cpp
index 20e2aff..80ff165 100644
--- a/src/endorse-certificate.cpp
+++ b/src/endorse-certificate.cpp
@@ -39,10 +39,8 @@
 Ptr<ProfileData>
 ProfileExtension::getProfileData()
 {
-  // _LOG_DEBUG("size: " << m_extnValue.size ());
-  boost::iostreams::stream
-    <boost::iostreams::array_source> is (m_extnValue.buf (), m_extnValue.size ());
-  return Ptr<ProfileData>(new ProfileData(*Data::decodeFromWire(is)));
+  Ptr<Blob> dataBlob = Ptr<Blob>(new Blob(m_extnValue.buf (), m_extnValue.size ()));
+  return Ptr<ProfileData>(new ProfileData(*Data::decodeFromWire(dataBlob)));
 }
 
 EndorseExtension::EndorseExtension(const vector<string>& endorsedList)
@@ -97,35 +95,6 @@
   return blobStream.buf ();
 }
 
-// EndorseCertificate::EndorseCertificate(const IdentityCertificate& kskCertificate)
-//   : Certificate()
-//   , m_keyName(kskCertificate.getPublicKeyName())
-//   , m_signer(kskCertificate.getPublicKeyName())
-// {
-//   Profile profile(m_keyName.getPrefix(m_keyName.size()-1), 
-//                   m_keyName.get(-2).toUri(),
-//                   m_keyName.get(m_keyName.size()-2).toUri());
-  
-//   Ptr<ProfileData> profileData = Ptr<ProfileData>(new ProfileData(m_keyName.getPrefix(m_keyName.size()-1),
-//                                                                   profile));
-
-//   m_profileData = profileData;
-
-//   Name dataName = m_keyName;
-//   dataName.append("PROFILE-CERT").append(m_signer).appendVersion();
-//   setName(dataName);
-
-//   setNotBefore(kskCertificate.getNotBefore());
-//   setNotAfter(kskCertificate.getNotAfter());
-//   addSubjectDescription(CertificateSubDescrypt("2.5.4.41", m_keyName.toUri()));
-//   setPublicKeyInfo(kskCertificate.getPublicKeyInfo());  
-//   addExtension(ProfileExtension(*m_profileData));
-//   addExtension(EndorseExtension(m_endorseList));
-  
-//   encode();
-// }
-
-
 EndorseCertificate::EndorseCertificate(const IdentityCertificate& kskCertificate,
                                        Ptr<ProfileData> profileData,
                                        const vector<string>& endorseList)
@@ -183,11 +152,8 @@
 EndorseCertificate::EndorseCertificate(const Data& data)
   : Certificate(data)
 {
-  // _LOG_DEBUG("0");
   const Name& dataName = data.getName();
-  // _LOG_DEBUG("1");
   name::Component certFlag(string("PROFILE-CERT"));  
-  // _LOG_DEBUG("2");
   int profileIndex = -1;
   for(int i = 0; i < dataName.size(); i++)
     {
@@ -197,35 +163,25 @@
 	  break;
 	}
     }
-  // _LOG_DEBUG("3");
   if(profileIndex < 0)
     throw LnException("No PROFILE-CERT component in data name!");
 
   m_keyName = dataName.getSubName(0, profileIndex);
   m_signer = dataName.getSubName(profileIndex + 1, dataName.size() - profileIndex - 2);
 
-  // _LOG_DEBUG("keyName: " << m_keyName.toUri());
-  // _LOG_DEBUG("signer: " << m_signer.toUri());
-
   OID profileExtensionOID("1.3.6.1.5.32.2.1");
   OID endorseExtensionOID("1.3.6.1.5.32.2.2");
 
-  // _LOG_DEBUG("OID ready");
   ExtensionList::iterator it = m_extnList.begin();
   for(; it != m_extnList.end(); it++)
     {
-      // _LOG_DEBUG("entry");
       if(profileExtensionOID == it->getOID())
 	{
-          // _LOG_DEBUG("ProfileExtn");
           ProfileExtension profileExtension(*it);
-          // _LOG_DEBUG("ProfileExtn created");
 	  m_profileData = profileExtension.getProfileData();
-          // _LOG_DEBUG("get profileDate");
 	}
       if(endorseExtensionOID == it->getOID())
         {
-          // _LOG_DEBUG("EndorseExtn");
           EndorseExtension endorseExtension(*it);
           m_endorseList = endorseExtension.getEndorsedList();
         }
diff --git a/src/endorse-certificate.h b/src/endorse-certificate.h
index 1b9b897..99d9d65 100644
--- a/src/endorse-certificate.h
+++ b/src/endorse-certificate.h
@@ -57,8 +57,6 @@
 public:
   EndorseCertificate() {}
 
-  // EndorseCertificate(const ndn::security::IdentityCertificate& kskCertificate);
-
   EndorseCertificate(const ndn::security::IdentityCertificate& kskCertificate,
                      ndn::Ptr<ProfileData> profileData,
                      const std::vector<std::string>& endorseList = std::vector<std::string>());
diff --git a/src/endorse-combobox-delegate.cpp b/src/endorse-combobox-delegate.cpp
index e909e3d..a70a772 100644
--- a/src/endorse-combobox-delegate.cpp
+++ b/src/endorse-combobox-delegate.cpp
@@ -44,7 +44,6 @@
 {
   QComboBox *comboBox = static_cast<QComboBox*>(editor);
   int value = index.model()->data(index, Qt::EditRole).toUInt();
-  _LOG_DEBUG("value: " << value);
   comboBox->setCurrentIndex(value);
 }
  
@@ -52,7 +51,6 @@
 EndorseComboBoxDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
 {
   QComboBox *comboBox = static_cast<QComboBox*>(editor);
-  _LOG_DEBUG("currentIndex: " << comboBox->currentIndex());
   model->setData(index, comboBox->currentIndex(), Qt::EditRole);
 }
  
diff --git a/src/invitation-policy-manager.cpp b/src/invitation-policy-manager.cpp
index ca4ae5b..58c9fcc 100644
--- a/src/invitation-policy-manager.cpp
+++ b/src/invitation-policy-manager.cpp
@@ -21,9 +21,11 @@
 INIT_LOGGER("InvitationPolicyManager");
 
 InvitationPolicyManager::InvitationPolicyManager(const string& chatroomName,
-                                             int stepLimit,
-					     Ptr<CertificateCache> certificateCache)
+                                                 const Name& signingIdentity,
+                                                 int stepLimit,
+                                                 Ptr<CertificateCache> certificateCache)
   : m_chatroomName(chatroomName)
+  , m_signingIdentity(signingIdentity)
   , m_stepLimit(stepLimit)
   , m_certificateCache(certificateCache)
 {
@@ -62,7 +64,7 @@
 {
   if(m_stepLimit == stepCount)
     {
-      _LOG_DEBUG("reach the maximum steps of verification");
+      _LOG_ERROR("Reach the maximum steps of verification!");
       unverifiedCallback(data);
       return NULL;
     }
@@ -71,6 +73,7 @@
 
   if(KeyLocator::KEYNAME != sha256sig->getKeyLocator().getType())
     {
+      _LOG_ERROR("KeyLocator is not name!");
       unverifiedCallback(data);
       return NULL;
     }
@@ -102,8 +105,6 @@
 	return NULL;
       }
 
-      _LOG_DEBUG("KeyLocator has not been cached and validated!");
-
       DataCallback recursiveVerifiedCallback = boost::bind(&InvitationPolicyManager::onDskCertificateVerified, 
                                                            this, 
                                                            _1, 
@@ -131,17 +132,13 @@
 
   if(m_kskRegex->match(data->getName()))
     {
-      _LOG_DEBUG("is ksk");
       Name keyName = m_kskRegex->expand();
-      _LOG_DEBUG("ksk name: " << keyName.toUri());
       map<Name, Publickey>::iterator it = m_trustAnchors.find(keyName);
       if(m_trustAnchors.end() != it)
         {
-          _LOG_DEBUG("found key!");
           Ptr<IdentityCertificate> identityCertificate = Ptr<IdentityCertificate>(new IdentityCertificate(*data));
           if(it->second.getKeyBlob() == identityCertificate->getPublicKeyInfo().getKeyBlob())
             {
-              _LOG_DEBUG("same key!");
               verifiedCallback(data);
             }
           else
@@ -177,15 +174,13 @@
 InvitationPolicyManager::checkSigningPolicy(const Name& dataName, 
 					  const Name& certificateName)
 {
-  //TODO:
   return true;
 }
     
 Name 
 InvitationPolicyManager::inferSigningIdentity(const Name& dataName)
 {
-  //TODO:
-  return Name();
+  return m_signingIdentity;
 }
 
 void
@@ -215,9 +210,9 @@
 
 void 
 InvitationPolicyManager::onDskCertificateVerified(Ptr<Data> certData, 
-					     Ptr<Data> originalData,
-					     const DataCallback& verifiedCallback, 
-					     const UnverifiedCallback& unverifiedCallback)
+                                                  Ptr<Data> originalData,
+                                                  const DataCallback& verifiedCallback, 
+                                                  const UnverifiedCallback& unverifiedCallback)
 {
   Ptr<IdentityCertificate> certificate = Ptr<IdentityCertificate>(new IdentityCertificate(*certData));
 
diff --git a/src/invitation-policy-manager.h b/src/invitation-policy-manager.h
index cc37d7b..f2cfc1c 100644
--- a/src/invitation-policy-manager.h
+++ b/src/invitation-policy-manager.h
@@ -24,8 +24,9 @@
 {
 public:
   InvitationPolicyManager(const std::string& chatroomName,
-                        int stepLimit = 10,
-                        ndn::Ptr<ndn::security::CertificateCache> certificateCache = NULL);
+                          const ndn::Name& signingIdentity,
+                          int stepLimit = 10,
+                          ndn::Ptr<ndn::security::CertificateCache> certificateCache = NULL);
   
   virtual
   ~InvitationPolicyManager();
@@ -73,6 +74,7 @@
 
 private:
   std::string m_chatroomName;
+  ndn::Name m_signingIdentity;
 
   int m_stepLimit;
 
diff --git a/src/invitationdialog.cpp b/src/invitationdialog.cpp
index 9194bcc..1522314 100644
--- a/src/invitationdialog.cpp
+++ b/src/invitationdialog.cpp
@@ -40,10 +40,10 @@
   m_inviterAlias = alias;
   string msg = alias;
   msg.append(" invites you to join the chat room: ");
-  ui->msgLabel->setText(QString::fromUtf8(msg.c_str()));
+  ui->msgLabel->setText(QString::fromStdString(msg));
 
   m_invitation = invitation;
-  ui->chatroomLine->setText(QString::fromUtf8(invitation->getChatroom().get(0).toUri().c_str()));
+  ui->chatroomLine->setText(QString::fromStdString(invitation->getChatroom().get(0).toUri()));
 
   m_identityCertificate = identityCertificate;
 }
diff --git a/src/invitelistdialog.cpp b/src/invitelistdialog.cpp
index 797a312..c3d12af 100644
--- a/src/invitelistdialog.cpp
+++ b/src/invitelistdialog.cpp
@@ -43,7 +43,7 @@
 { 
   string msg("invite to chatroom:\n");
   msg += label;
-  ui->inviteLabel->setText(QString::fromUtf8(msg.c_str())); 
+  ui->inviteLabel->setText(QString::fromStdString(msg)); 
   refreshContactList();
 }
 
@@ -54,7 +54,7 @@
   QStringList contactNameList;
   for(int i = 0; i < m_contactList.size(); i++)
     {
-      contactNameList << QString::fromUtf8(m_contactList[i]->getAlias().c_str());
+      contactNameList << QString::fromStdString(m_contactList[i]->getAlias());
     }
 
   m_contactListModel->setStringList(contactNameList);
@@ -65,7 +65,7 @@
 {
   QModelIndexList selected = ui->contactListView->selectionModel()->selectedIndexes();
   QString text = m_contactListModel->data(selected.first(), Qt::DisplayRole).toString();
-  string alias = text.toUtf8().constData();
+  string alias = text.toStdString();
 
   int i = 0;
   for(; i < m_contactList.size(); i++)
@@ -74,7 +74,7 @@
         break;
     }
 
-  QString invitedContactNamespace = QString::fromUtf8(m_contactList[i]->getNameSpace().toUri().c_str());
+  QString invitedContactNamespace = QString::fromStdString(m_contactList[i]->getNameSpace().toUri());
 
   bool isIntroducer = true;
 
diff --git a/src/main.cpp b/src/main.cpp
index 44a67ee..0ed7fc2 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -11,7 +11,6 @@
 #include <QApplication>
 #include <QSystemTrayIcon>
 
-#include "chronochat.h"
 #include "contactpanel.h"
 #include "contact-storage.h"
 #include "dns-storage.h"
@@ -54,13 +53,15 @@
   // app.setWindowIcon(QIcon(":/demo.icns"));
 
   Ptr<ContactStorage> contactStorage = NULL;
+  Ptr<DnsStorage> dnsStorage = NULL;
   try{
     contactStorage = Ptr<ContactStorage>::Create();
+    dnsStorage = Ptr<DnsStorage>::Create();
   }catch(std::exception& e){
     std::cerr << e.what() << std::endl;
     exit(1);
   }
-  Ptr<DnsStorage> dnsStorage = Ptr<DnsStorage>::Create();
+
   Ptr<ContactManager> contactManager = Ptr<ContactManager>(new ContactManager(contactStorage, dnsStorage));
   
   ContactPanel contactPanel(contactManager);
diff --git a/src/panel-policy-manager.cpp b/src/panel-policy-manager.cpp
index 1bbd849..679a3c9 100644
--- a/src/panel-policy-manager.cpp
+++ b/src/panel-policy-manager.cpp
@@ -82,10 +82,9 @@
 						 const DataCallback& verifiedCallback,
 						 const UnverifiedCallback& unverifiedCallback)
 {
-  _LOG_DEBUG("checkVerificationPolicy");
   if(m_stepLimit == stepCount)
     {
-      _LOG_DEBUG("reach the maximum steps of verification");
+      _LOG_ERROR("Reach the maximum steps of verification!");
       unverifiedCallback(data);
       return NULL;
     }
@@ -94,6 +93,7 @@
 
   if(KeyLocator::KEYNAME != sha256sig->getKeyLocator().getType())
     {
+      _LOG_ERROR("Keylocator is not name!");
       unverifiedCallback(data);
       return NULL;
     }
@@ -102,9 +102,7 @@
 
   if(m_kskRegex->match(data->getName()))
     {
-      _LOG_DEBUG("is ksk");
       Name keyName = m_kskRegex->expand();
-      _LOG_DEBUG("ksk name: " << keyName.toUri());
       map<Name, Publickey>::iterator it = m_trustAnchors.find(keyName);
       if(m_trustAnchors.end() != it)
         {
@@ -112,7 +110,6 @@
           Ptr<IdentityCertificate> identityCertificate = Ptr<IdentityCertificate>(new IdentityCertificate(*data));
           if(it->second.getKeyBlob() == identityCertificate->getPublicKeyInfo().getKeyBlob())
             {
-              _LOG_DEBUG("same key!");
               verifiedCallback(data);
             }
           else
@@ -140,13 +137,10 @@
       return NULL;	
     }
 
-  _LOG_DEBUG("KEY Locator: " << keyLocatorName.toUri());
   if(m_endorseeRule->satisfy(*data))
     {
       m_keyNameRegex->match(keyLocatorName);
       Name keyName = m_keyNameRegex->expand();
-      _LOG_DEBUG("data name: " << data->getName());
-      _LOG_DEBUG("keyName: " << keyName.toUri());
       if(m_trustAnchors.end() != m_trustAnchors.find(keyName))
         if(verifySignature(*data, m_trustAnchors[keyName]))
           verifiedCallback(data);
@@ -164,26 +158,6 @@
   return NULL;
 }
 
-// void 
-// PanelPolicyManager::onCertificateVerified(Ptr<Data> certData, 
-// 					       Ptr<Data> originalData,
-// 					       const DataCallback& verifiedCallback, 
-// 					       const UnverifiedCallback& unverifiedCallback)
-// {
-//   IdentityCertificate certificate(*certData);
-
-//   if(verifySignature(*originalData, certificate.getPublicKeyInfo()))
-//     verifiedCallback(originalData);
-//   else
-//     unverifiedCallback(originalData);
-// }
-
-// void
-// PanelPolicyManager::onCertificateUnverified(Ptr<Data> certData, 
-// 						 Ptr<Data> originalData,
-// 						 const UnverifiedCallback& unverifiedCallback)
-// { unverifiedCallback(originalData); }
-
 bool 
 PanelPolicyManager::checkSigningPolicy(const Name & dataName, const Name & certificateName)
 {
@@ -202,6 +176,6 @@
 void
 PanelPolicyManager::addTrustAnchor(const EndorseCertificate& selfEndorseCertificate)
 { 
-  _LOG_DEBUG(selfEndorseCertificate.getPublicKeyName().toUri());
+  // _LOG_DEBUG("Add Anchor: " << selfEndorseCertificate.getPublicKeyName().toUri());
   m_trustAnchors.insert(pair <Name, Publickey > (selfEndorseCertificate.getPublicKeyName(), selfEndorseCertificate.getPublicKeyInfo())); 
 }
diff --git a/src/profile-data.cpp b/src/profile-data.cpp
index ef067f9..e839f0f 100644
--- a/src/profile-data.cpp
+++ b/src/profile-data.cpp
@@ -57,7 +57,6 @@
 ProfileData::ProfileData(const Data& data)
   : Data()
 {
-  // _LOG_DEBUG("ProfileData constructor");
   const Name& dataName = data.getName();
   name::Component appFlag(string("PROFILE"));  
 
@@ -91,7 +90,7 @@
   setSignature(newSig);
   setContent(data.getContent());
   setSignedBlob(newSignedBlob);
-  // _LOG_DEBUG("Decode Profile");
+
   m_profile = *Profile::fromDerBlob(data.content());
-  // _LOG_DEBUG("Profile Decoded");
+
 }
diff --git a/src/profileeditor.cpp b/src/profileeditor.cpp
index d3d2608..7014794 100644
--- a/src/profileeditor.cpp
+++ b/src/profileeditor.cpp
@@ -32,8 +32,8 @@
 {
   ui->setupUi(this);
   
-  Name defaultIdentity = contactManager->getDefaultIdentity();
-  ui->identityInput->setText(defaultIdentity.toUri().c_str());
+  m_currentIdentity = contactManager->getDefaultIdentity();
+  ui->identityInput->setText(m_currentIdentity.toUri().c_str());
 
   connect(ui->addRowButton, SIGNAL(clicked()),
           this, SLOT(onAddClicked()));
@@ -94,7 +94,6 @@
   m_currentIdentity = Name(inputIdentity.toUtf8().constData());
   string filter("profile_identity = '");
   filter.append(m_currentIdentity.toUri()).append("'");
-  _LOG_DEBUG("filter: " << filter);
 
   m_tableModel->setEditStrategy(QSqlTableModel::OnManualSubmit);
   m_tableModel->setTable("SelfProfile");
@@ -104,8 +103,6 @@
   m_tableModel->setHeaderData(1, Qt::Horizontal, QObject::tr("Type"));
   m_tableModel->setHeaderData(2, Qt::Horizontal, QObject::tr("Value"));
 
-  _LOG_DEBUG("row count: " << m_tableModel->rowCount());
-
   ui->profileTable->setModel(m_tableModel);
   ui->profileTable->setColumnHidden(0, true);
   ui->profileTable->show();
diff --git a/src/profileeditor.h b/src/profileeditor.h
index 196a263..92ceaeb 100644
--- a/src/profileeditor.h
+++ b/src/profileeditor.h
@@ -31,6 +31,10 @@
                          QWidget *parent = 0);
   
   ~ProfileEditor();
+
+  inline void
+  setCurrentIdentity(const ndn::Name& name)
+  { m_currentIdentity = name; }
   
 private slots:
   void
@@ -50,7 +54,6 @@
   Ui::ProfileEditor *ui;
   QSqlTableModel* m_tableModel;
   ndn::Ptr<ContactManager> m_contactManager;
-  ndn::Name m_defaultIdentity;
   ndn::Name m_currentIdentity;
 };
 
diff --git a/src/setaliasdialog.cpp b/src/setaliasdialog.cpp
index 38e70d9..c615127 100644
--- a/src/setaliasdialog.cpp
+++ b/src/setaliasdialog.cpp
@@ -38,7 +38,7 @@
 SetAliasDialog::onOkClicked()
 {
   QString text = ui->aliasInput->text();
-  string alias = text.toUtf8().constData();
+  string alias = text.toStdString();
   
   m_contactManager->getContactStorage()->updateAlias(Name(m_target), alias);
 
@@ -57,7 +57,7 @@
   m_target = name; 
   string msg("Set alias for ");
   msg.append(name).append(":");
-  ui->introLabel->setText(QString::fromUtf8(msg.c_str()));
+  ui->introLabel->setText(QString::fromStdString(msg));
   ui->aliasInput->clear();
 }
 
diff --git a/src/startchatdialog.cpp b/src/startchatdialog.cpp
index 02d88f0..64795c0 100644
--- a/src/startchatdialog.cpp
+++ b/src/startchatdialog.cpp
@@ -33,14 +33,14 @@
 StartChatDialog::setInvitee(const string& invitee, const string& chatroom)
 { 
   m_invitee = invitee;
-  ui->chatroomInput->setText(QString::fromUtf8(chatroom.c_str()));
+  ui->chatroomInput->setText(QString::fromStdString(chatroom));
 }
 
 void 
 StartChatDialog::onOkClicked()
 {
   QString chatroom = ui->chatroomInput->text();
-  QString invitee = QString::fromUtf8(m_invitee.c_str());
+  QString invitee = QString::fromStdString(m_invitee);
   // bool isIntroducer = ui->introCheckBox->isChecked();
   bool isIntroducer = true;
   emit chatroomConfirmed(chatroom, invitee, isIntroducer);
diff --git a/src/warningdialog.cpp b/src/warningdialog.cpp
index 6c7eb8a..6dcae60 100644
--- a/src/warningdialog.cpp
+++ b/src/warningdialog.cpp
@@ -30,7 +30,7 @@
 
 void
 WarningDialog::setMsg(const string& msg)
-{ ui->message->setText(QApplication::translate("WarningDialog",msg.c_str(), 0, QApplication::UnicodeUTF8)); }
+{ ui->message->setText(QString::fromStdString(msg)); }
 
 void
 WarningDialog::onOkClicked()
diff --git a/wscript b/wscript
index 98451fa..f7bdf1c 100644
--- a/wscript
+++ b/wscript
@@ -2,9 +2,11 @@
 VERSION='0.1'
 APPNAME='QT-Test'
 
-from waflib import Configure
+from waflib import Configure, Utils
 
 def options(opt):
+    opt.add_option('--debug',action='store_true',default=False,dest='debug',help='''debugging mode''')
+    
     opt.load('compiler_c compiler_cxx boost protoc qt4')
 
     opt.load('tinyxml', tooldir=['waf-tools'])
@@ -13,8 +15,19 @@
 def configure(conf):
     conf.load("compiler_c compiler_cxx boost protoc qt4 tinyxml cryptopp")
 
-    conf.add_supported_cxxflags (cxxflags = ['-O0', '-g'])
-
+    if conf.options.debug:
+        conf.define ('_DEBUG', 1)
+        conf.add_supported_cxxflags (cxxflags = ['-O0',
+                                                 '-Wall',
+                                                 '-Wno-unused-variable',
+                                                 '-g3',
+                                                 '-Wno-unused-private-field', # only clang supports
+                                                 '-fcolor-diagnostics',       # only clang supports
+                                                 '-Qunused-arguments',        # only clang supports
+                                                 ])
+    else:
+        conf.add_supported_cxxflags (cxxflags = ['-O3', '-g', '-Wno-tautological-compare', '-Wno-unused-function'])
+        
     conf.check_tinyxml(path=conf.options.tinyxml_dir)
     conf.check_cfg(package='libndn.cxx', args=['--cflags', '--libs'], uselib_store='NDNCXX', mandatory=True)
     conf.check_cfg(package='sqlite3', args=['--cflags', '--libs'], uselib_store='SQLITE3', mandatory=True)
@@ -46,6 +59,44 @@
         use = "SQLITE3 NDNCXX BOOST BOOST_FILESYSTEM LOG4CXX",
         )
 
+    if Utils.unversioned_sys_platform () == "darwin":
+        app_plist = '''<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+    <key>CFBundlePackageType</key>
+    <string>APPL</string>
+    <key>CFBundleIconFile</key>
+    <string>demo.icns</string>
+    <key>CFBundleGetInfoString</key>
+    <string>Created by Waf</string>
+    <key>CFBundleIdentifier</key>
+    <string>edu.ucla.cs.irl.Contacts</string>
+    <key>CFBundleSignature</key>
+    <string>????</string>
+    <key>NOTE</key>
+    <string>THIS IS A GENERATED FILE, DO NOT MODIFY</string>
+    <key>CFBundleExecutable</key>
+    <string>%s</string>
+    <key>LSUIElement</key>
+    <string>1</string>
+    <key>SUPublicDSAKeyFile</key>
+    <string>dsa_pub.pem</string>
+    <key>CFBundleIconFile</key>
+    <string>demo.icns</string>
+</dict>
+</plist>'''
+
+        qt.mac_app = "Contacts.app"
+        qt.mac_plist = app_plist % "Contacts"
+        qt.mac_resources = 'demo.icns'
+
+
+from waflib import TaskGen
+@TaskGen.extension('.mm')
+def m_hook(self, node):
+    """Alias .mm files to be compiled the same as .cc files, gcc/clang will do the right thing."""
+    return self.create_compiled_task('cxx', node)
 
 @Configure.conf
 def add_supported_cxxflags(self, cxxflags):
