diff --git a/src/addcontactpanel.cpp b/src/addcontactpanel.cpp
index 34eb2e9..a3dabf7 100644
--- a/src/addcontactpanel.cpp
+++ b/src/addcontactpanel.cpp
@@ -26,8 +26,8 @@
           this, SLOT(onCancelClicked()));
   connect(ui->searchButton, SIGNAL(clicked()),
           this, SLOT(onSearchClicked()));
-  connect(&*m_contactManager, SIGNAL(contactFetched(Ptr<EndorseCertificate>)),
-          this, SLOT(selfEndorseCertificateFetched(Ptr<EndorseCertificate>)));
+  connect(&*m_contactManager, SIGNAL(contactFetched(ndn::Ptr<EndorseCertificate>)),
+          this, SLOT(selfEndorseCertificateFetched(ndn::Ptr<EndorseCertificate>)));
 }
 
 AddContactPanel::~AddContactPanel()
diff --git a/src/contact-manager.cpp b/src/contact-manager.cpp
index b525215..7b07824 100644
--- a/src/contact-manager.cpp
+++ b/src/contact-manager.cpp
@@ -20,14 +20,19 @@
 #include <ndn.cxx/security/cache/ttl-certificate-cache.h>
 #include <ndn.cxx/security/encryption/basic-encryption-manager.h>
 #include <fstream>
+#include "logging.h"
 #endif
 
 using namespace ndn;
 using namespace ndn::security;
 
+INIT_LOGGER("ContactManager");
+
 ContactManager::ContactManager(Ptr<ContactStorage> contactStorage,
-                               Ptr<DnsStorage> dnsStorage)
-  : m_contactStorage(contactStorage)
+                               Ptr<DnsStorage> dnsStorage,
+                               QObject* parent)
+  : QObject(parent)
+  , m_contactStorage(contactStorage)
   , m_dnsStorage(dnsStorage)
 {
   setKeychain();
@@ -134,7 +139,7 @@
       // _LOG_DEBUG("Signing DONE!");
       if(NULL == newEndorseCertificate)
         return;
-
+      _LOG_DEBUG("About to update");
       m_contactStorage->updateSelfEndorseCertificate(newEndorseCertificate, identity);
 
       publishSelfEndorseCertificateInDNS(newEndorseCertificate);
@@ -145,7 +150,7 @@
       // _LOG_DEBUG("Signing DONE!");
       if(NULL == newEndorseCertificate)
         return;
-      
+      _LOG_DEBUG("About to Insert");
       m_contactStorage->addSelfEndorseCertificate(newEndorseCertificate, identity);
 
       publishSelfEndorseCertificateInDNS(newEndorseCertificate);
@@ -249,6 +254,8 @@
   data->setContent(content);
 
   m_keychain->signByIdentity(*data, identity);
+
+  m_dnsStorage->updateDnsSelfProfileData(*data, identity);
   
   Ptr<Blob> dnsBlob = data->encodeToWire();
 
diff --git a/src/contact-manager.h b/src/contact-manager.h
index 1cde4bc..3cc816d 100644
--- a/src/contact-manager.h
+++ b/src/contact-manager.h
@@ -17,7 +17,7 @@
 #include "contact-storage.h"
 #include "dns-storage.h"
 #include "endorse-certificate.h"
-#include "ndn.cxx/wrapper/wrapper.h"
+#include <ndn.cxx/wrapper/wrapper.h>
 #endif
 
 
@@ -27,7 +27,8 @@
 
 public:
   ContactManager(ndn::Ptr<ContactStorage> contactStorage,
-                 ndn::Ptr<DnsStorage> dnsStorage);
+                 ndn::Ptr<DnsStorage> dnsStorage,
+                 QObject* parent = 0);
 
   ~ContactManager();
 
diff --git a/src/contact-storage.cpp b/src/contact-storage.cpp
index 989702a..5c6dc31 100644
--- a/src/contact-storage.cpp
+++ b/src/contact-storage.cpp
@@ -34,15 +34,15 @@
 CREATE INDEX sp_index ON SelfProfile(profile_identity,profile_type); \n \
 ";
 
-const string INIT_PD_TABLE = "\
+const string INIT_SE_TABLE = "\
 CREATE TABLE IF NOT EXISTS                                           \n \
-  ProfileData(                                                       \n \
+  SelfEndorse(                                                       \n \
       identity          BLOB NOT NULL UNIQUE,                        \n \
-      profile_data      BLOB NOT NULL,                               \n \
+      endorse_data      BLOB NOT NULL,                               \n \
                                                                      \
       PRIMARY KEY (identity)                                         \n \
   );                                                                 \n \
-CREATE INDEX pd_index ON ProfileData(identity);                      \n \
+CREATE INDEX se_index ON SelfEndorse(identity);                      \n \
 ";
 
 const string INIT_TC_TABLE = "\
@@ -99,21 +99,21 @@
         throw LnException("Init \"error\" in SelfProfile");
     }
 
-  // Check if ProfileData table exists
-  sqlite3_prepare_v2 (m_db, "SELECT name FROM sqlite_master WHERE type='table' And name='ProfileData'", -1, &stmt, 0);
+  // Check if SelfEndorse table exists
+  sqlite3_prepare_v2 (m_db, "SELECT name FROM sqlite_master WHERE type='table' And name='SelfEndorse'", -1, &stmt, 0);
   res = sqlite3_step (stmt);
 
-  bool pdTableExist = false;
+  bool seTableExist = false;
   if (res == SQLITE_ROW)
-      pdTableExist = true;
+      seTableExist = true;
   sqlite3_finalize (stmt);
 
-  if(!pdTableExist)
+  if(!seTableExist)
     {
       char *errmsg = 0;
-      res = sqlite3_exec (m_db, INIT_PD_TABLE.c_str (), NULL, NULL, &errmsg);
+      res = sqlite3_exec (m_db, INIT_SE_TABLE.c_str (), NULL, NULL, &errmsg);
       if (res != SQLITE_OK && errmsg != 0)
-        throw LnException("Init \"error\" in ProfileData");
+        throw LnException("Init \"error\" in SelfEndorse");
     }
 
 
@@ -360,7 +360,7 @@
 ContactStorage::getSelfEndorseCertificate(const Name& identity)
 {
   sqlite3_stmt *stmt;
-  sqlite3_prepare_v2 (m_db, "SELECT profile_data FROM ProfileData where identity=?", -1, &stmt, 0);
+  sqlite3_prepare_v2 (m_db, "SELECT endorse_data FROM SelfEndorse where identity=?", -1, &stmt, 0);
   sqlite3_bind_text(stmt, 1, identity.toUri().c_str(), identity.toUri().size(), SQLITE_TRANSIENT);
 
   Ptr<Blob> result = NULL;
@@ -378,7 +378,7 @@
   Ptr<Blob> newEndorseCertificateBlob = newEndorseCertificate->encodeToWire();
 
   sqlite3_stmt *stmt;
-  sqlite3_prepare_v2 (m_db, "UPDATE ProfileData SET profile_data=? WHERE identity=?", -1, &stmt, 0);
+  sqlite3_prepare_v2 (m_db, "UPDATE SelfEndorse SET endorse_data=? WHERE identity=?", -1, &stmt, 0);
   sqlite3_bind_text(stmt, 1, newEndorseCertificateBlob->buf(), newEndorseCertificateBlob->size(), SQLITE_TRANSIENT);
   sqlite3_bind_text(stmt, 2, identity.toUri().c_str(), identity.toUri().size(), SQLITE_TRANSIENT);
   sqlite3_step(stmt);
@@ -390,7 +390,7 @@
   Ptr<Blob> newEndorseCertificateBlob = newEndorseCertificate->encodeToWire();
 
   sqlite3_stmt *stmt;
-  sqlite3_prepare_v2 (m_db, "INSERT INTO ProfileData (identity, profile_data) values (?, ?)", -1, &stmt, 0);
+  sqlite3_prepare_v2 (m_db, "INSERT INTO SelfEndorse (identity, endorse_data) values (?, ?)", -1, &stmt, 0);
   sqlite3_bind_text(stmt, 1, identity.toUri().c_str(), identity.toUri().size(), SQLITE_TRANSIENT);
   sqlite3_bind_text(stmt, 2, newEndorseCertificateBlob->buf(), newEndorseCertificateBlob->size(), SQLITE_TRANSIENT);
   sqlite3_step(stmt);
diff --git a/src/dns-storage.cpp b/src/dns-storage.cpp
index c71789f..13a8f25 100644
--- a/src/dns-storage.cpp
+++ b/src/dns-storage.cpp
@@ -12,12 +12,15 @@
 #include "exception.h"
 
 #include <boost/filesystem.hpp>
+#include "logging.h"
 
 
 using namespace std;
 using namespace ndn;
 namespace fs = boost::filesystem;
 
+INIT_LOGGER("DnsStorage");
+
 const string INIT_DD_TABLE = "\
 CREATE TABLE IF NOT EXISTS                                           \n \
   DnsData(                                                           \n \
@@ -77,6 +80,7 @@
 
   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);
@@ -89,6 +93,7 @@
     }
   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);
