diff --git a/chatdialog.cpp b/chatdialog.cpp
index 065986e..38750c6 100644
--- a/chatdialog.cpp
+++ b/chatdialog.cpp
@@ -53,7 +53,6 @@
   connect(treeButton, SIGNAL(pressed()), this, SLOT(treeButtonPressed()));
   connect(this, SIGNAL(dataReceived(QString, const char *, size_t, bool)), this, SLOT(processData(QString, const char *, size_t, bool)));
   connect(this, SIGNAL(treeUpdated(const std::vector<Sync::MissingDataInfo>)), this, SLOT(processTreeUpdate(const std::vector<Sync::MissingDataInfo>)));
-  //connect(this, SIGNAL(removeReceived(QString)), this, SLOT(processRemove(QString)));
   connect(m_timer, SIGNAL(timeout()), this, SLOT(replot()));
   connect(m_scene, SIGNAL(replot()), this, SLOT(replot()));
   connect(trayIcon, SIGNAL(messageClicked()), this, SLOT(showNormal()));
@@ -78,7 +77,6 @@
     }
   }
   
-//testDraw();
 }
 
 ChatDialog::~ChatDialog()
@@ -86,8 +84,7 @@
   if (m_sock != NULL) 
   {
     SyncDemo::ChatMessage msg;
-    formHelloMessage(msg);
-    msg.set_type(SyncDemo::ChatMessage::LEAVE);
+    formControlMessage(msg, SyncDemo::ChatMessage::LEAVE);
     sendMsg(msg);
     sleep(1);
     m_sock->remove(m_user.getPrefix().toStdString());
@@ -118,8 +115,7 @@
   while(it.hasNext())
   {
     SyncDemo::ChatMessage msg;
-    formHelloMessage(msg);
-    msg.set_type(SyncDemo::ChatMessage::LEAVE);
+    formControlMessage(msg, SyncDemo::ChatMessage::LEAVE);
     msg.set_from(it.next().toStdString());
     appendMessage(msg);
   }
@@ -442,13 +438,13 @@
 }
 
 void 
-ChatDialog::formHelloMessage(SyncDemo::ChatMessage &msg)
+ChatDialog::formControlMessage(SyncDemo::ChatMessage &msg, SyncDemo::ChatMessage::ChatMessageType type)
 {
   msg.set_from(m_user.getNick().toStdString());
   msg.set_to(m_user.getChatroom().toStdString());
   time_t seconds = time(NULL);
   msg.set_timestamp(seconds);
-  msg.set_type(SyncDemo::ChatMessage::HELLO);
+  msg.set_type(type);
 }
 
 static std::string chars("qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789");
@@ -564,8 +560,7 @@
 ChatDialog::sendJoin()
 {
   SyncDemo::ChatMessage msg;
-  formHelloMessage(msg);
-  msg.set_type(SyncDemo::ChatMessage::JOIN);
+  formControlMessage(msg, SyncDemo::ChatMessage::JOIN);
   sendMsg(msg);
   QTimer::singleShot(m_randomizedInterval, this, SLOT(sendHello()));
 }
@@ -578,7 +573,7 @@
   if (elapsed >= m_randomizedInterval / 1000)
   {
     SyncDemo::ChatMessage msg;
-    formHelloMessage(msg);
+    formControlMessage(msg, SyncDemo::ChatMessage::HELLO);
     sendMsg(msg);
     QTimer::singleShot(m_randomizedInterval, this, SLOT(sendHello()));
   }
