diff --git a/src/profileeditor.cpp b/src/profileeditor.cpp
index 9b75f50..14eeff4 100644
--- a/src/profileeditor.cpp
+++ b/src/profileeditor.cpp
@@ -23,31 +23,28 @@
 
 INIT_LOGGER("ProfileEditor");
 
-ProfileEditor::ProfileEditor(Ptr<ContactStorage> contactStorage, QWidget *parent) 
+ProfileEditor::ProfileEditor(Ptr<ContactStorage> contactStorage, 
+                             QWidget *parent) 
     : QDialog(parent)
     , ui(new Ui::ProfileEditor)
     , m_tableModel(new QSqlTableModel())
     , m_contactStorage(contactStorage)
 {
-    ui->setupUi(this);
+  ui->setupUi(this);
+  
+  Name defaultIdentity = contactStorage->getIdentityManager()->getDefaultIdentity();
+  ui->identityInput->setText(defaultIdentity.toUri().c_str());
 
-    connect(ui->addRowButton, SIGNAL(clicked()),
-            this, SLOT(onAddClicked()));
-    connect(ui->deleteRowButton, SIGNAL(clicked()),
-            this, SLOT(onDeleteClicked()));
-    connect(ui->okButton, SIGNAL(clicked()),
-            this, SLOT(onOkClicked()));
-    
-    m_tableModel->setEditStrategy(QSqlTableModel::OnManualSubmit);
-    m_tableModel->setTable("SelfProfile");
-    m_tableModel->select();
-    m_tableModel->setHeaderData(0, Qt::Horizontal, QObject::tr("Index"));
-    m_tableModel->setHeaderData(1, Qt::Horizontal, QObject::tr("Type"));
-    m_tableModel->setHeaderData(2, Qt::Horizontal, QObject::tr("Value"));
+  connect(ui->addRowButton, SIGNAL(clicked()),
+          this, SLOT(onAddClicked()));
+  connect(ui->deleteRowButton, SIGNAL(clicked()),
+          this, SLOT(onDeleteClicked()));
+  connect(ui->okButton, SIGNAL(clicked()),
+          this, SLOT(onOkClicked()));
+  connect(ui->getButton, SIGNAL(clicked()),
+          this, SLOT(onGetClicked()));
 
-    ui->profileTable->setModel(m_tableModel);
-    ui->profileTable->setColumnHidden(0, true);
-    ui->profileTable->show();
+
 
 }
 
@@ -61,19 +58,12 @@
 ProfileEditor::onAddClicked()
 {
   int rowCount = m_tableModel->rowCount();
-
-  // QSqlRecord record;
-  // QSqlField typeField("profile_type", QVariant::String);
-  // QSqlField valueField("profile_value", QVariant::String);
-  // record.append(typeField);
-  // record.append(valueField);
-  // record.setValue("profile_type", QString("N/A"));
-  // record.setValue("profile_value", QString("N/A"));
-
-  // bool res = m_tableModel->insertRecord(-1, record);
-
-  // res = m_tableModel->submitAll();
+  QSqlRecord record;
+  QSqlField identityField("profile_identity", QVariant::String);
+  record.append(identityField);
+  record.setValue("profile_identity", QString(m_currentIdentity.toUri().c_str()));
   m_tableModel->insertRow(rowCount);
+  m_tableModel->setRecord(rowCount, record);
 }
 
 void
@@ -84,10 +74,8 @@
 
   int i = indexList.size() - 1;  
   for(; i >= 0; i--)
-    {
-      if(0 != indexList[i].row())
-        m_tableModel->removeRow(indexList[i].row());
-    }
+    m_tableModel->removeRow(indexList[i].row());
+    
   m_tableModel->submitAll();
 }
 
@@ -95,9 +83,31 @@
 ProfileEditor::onOkClicked()
 {
   m_tableModel->submitAll();
+  m_contactStorage->updateProfileData(m_currentIdentity);
   this->hide();
 }
 
+void
+ProfileEditor::onGetClicked()
+{
+  QString inputIdentity = ui->identityInput->text();
+  m_currentIdentity = Name(inputIdentity.toUtf8().constData());
+  string filter("profile_identity = '");
+  filter.append(m_currentIdentity.toUri()).append("'");
+
+  m_tableModel->setEditStrategy(QSqlTableModel::OnManualSubmit);
+  m_tableModel->setTable("SelfProfile");
+  m_tableModel->setFilter(filter.c_str());
+  m_tableModel->select();
+  m_tableModel->setHeaderData(0, Qt::Horizontal, QObject::tr("Identity"));
+  m_tableModel->setHeaderData(1, Qt::Horizontal, QObject::tr("Type"));
+  m_tableModel->setHeaderData(2, Qt::Horizontal, QObject::tr("Value"));
+
+  ui->profileTable->setModel(m_tableModel);
+  ui->profileTable->setColumnHidden(0, true);
+  ui->profileTable->show();
+}
+
 #if WAF
 #include "profileeditor.moc"
 #include "profileeditor.cpp.moc"
