diff --git a/src/contactpanel.cpp b/src/contactpanel.cpp
index 4d281d6..56db0a7 100644
--- a/src/contactpanel.cpp
+++ b/src/contactpanel.cpp
@@ -64,6 +64,7 @@
   setKeychain();
 
   m_defaultIdentity = m_keychain->getDefaultIdentity();
+  m_contactManager->setDefaultIdentity(m_defaultIdentity);
   m_nickName = m_defaultIdentity.get(-1).toUri();
   m_settingDialog->setIdentity(m_defaultIdentity.toUri(), m_nickName);
 
@@ -71,6 +72,7 @@
   m_profileEditor->setCurrentIdentity(m_defaultIdentity);
 
   m_addContactPanel = new AddContactPanel(contactManager);
+  m_browseContactDialog = new BrowseContactDialog(contactManager);
   m_setAliasDialog = new SetAliasDialog(contactManager);
  
   ui->setupUi(this);
@@ -95,13 +97,21 @@
   connect(ui->EditProfileButton, SIGNAL(clicked()), 
           this, SLOT(openProfileEditor()));
 
+  // connect(ui->AddContactButton, SIGNAL(clicked()),
+  //         this, SLOT(openAddContactPanel()));
   connect(ui->AddContactButton, SIGNAL(clicked()),
-          this, SLOT(openAddContactPanel()));
+          this, SLOT(openBrowseContactDialog()));
+
+  connect(this, SIGNAL(refreshCertDirectory()),
+          m_browseContactDialog, SLOT(refreshList()));
+
+  connect(ui->DeleteContactButton, SIGNAL(clicked()),
+          this, SLOT(removeContactButton()));
    
   connect(ui->settingButton, SIGNAL(clicked()),
           this, SLOT(openSettingDialog()));
    
-  connect(m_addContactPanel, SIGNAL(newContactAdded()),
+  connect(m_browseContactDialog, SIGNAL(newContactAdded()),
           this, SLOT(refreshContactList()));
   connect(m_setAliasDialog, SIGNAL(aliasChanged()),
           this, SLOT(refreshContactList()));
@@ -144,6 +154,7 @@
 
   delete m_profileEditor;
   delete m_addContactPanel;
+  delete m_browseContactDialog;
   delete m_setAliasDialog;
 
   delete m_trustScopeModel;
@@ -499,6 +510,7 @@
   m_profileEditor->setCurrentIdentity(m_defaultIdentity);
   m_nickName = nickName.toStdString();
   m_handler->clearInterestFilter(m_inviteListenPrefix);
+  m_contactManager->setDefaultIdentity(m_defaultIdentity);
   setInvitationListener();
   collectEndorsement();
 }
@@ -512,6 +524,36 @@
 { m_addContactPanel->show(); }
 
 void
+ContactPanel::openBrowseContactDialog()
+{ 
+  m_browseContactDialog->show(); 
+  emit refreshCertDirectory();
+}
+
+void
+ContactPanel::removeContactButton()
+{
+  QItemSelectionModel* selectionModel = ui->ContactList->selectionModel();
+  QModelIndexList selectedList = selectionModel->selectedIndexes();
+  QModelIndexList::iterator it = selectedList.begin();
+  for(; it != selectedList.end(); it++)
+    {
+      string alias =  m_contactListModel->data(*it, Qt::DisplayRole).toString().toStdString();
+      vector<Ptr<ContactItem> >::iterator contactIt = m_contactList.begin();
+      for(; contactIt != m_contactList.end(); contactIt++)
+        {
+          if((*contactIt)->getAlias() == alias)
+            {
+              m_contactManager->getContactStorage()->removeContact((*contactIt)->getNameSpace());
+              m_contactList.erase(contactIt);
+              break;
+            }
+        }
+    }
+  refreshContactList();
+}
+
+void
 ContactPanel::openInvitationDialog()
 { m_invitationDialog->show(); }
 
