Index: orxonox/trunk/src/lib/gui/gui/orxonox_gui_exec.cc
===================================================================
--- orxonox/trunk/src/lib/gui/gui/orxonox_gui_exec.cc	(revision 4025)
+++ orxonox/trunk/src/lib/gui/gui/orxonox_gui_exec.cc	(revision 4026)
@@ -26,5 +26,4 @@
 #include "orxonox_gui_exec.h"
 
-#include <iostream>
 #include <string>
 
@@ -230,5 +229,5 @@
 	strcpy(Buffer, static_cast<Option*>(widget)->title);
 	if(strchr(Buffer, '_'))
-	  cout << "Warning Optionname" << Buffer << " is not Valid for Saving, because it includes an underscore" << endl;
+	  PRINTF(2)("Optionname %s is not Valid for Saving, because it includes an underscore\n", Buffer);
 	while(space2under = strchr(Buffer, ' '))
 	  {
@@ -263,9 +262,9 @@
 	      if((groupWidget = locateGroup(widget, Buffer, 1))==NULL)
 		{
-		  cout << "!!There is no group called " << Buffer << " in this GUI.\n First best Widget will get the Infos assigned.\n Config-File will be updated in next Save\n";
+		  PRINTF(2)("!!There is no group called %s in this GUI.\n First best Widget will get the Infos assigned.\n Config-File will be updated in next Save\n", Buffer);
 		  groupWidget = widget;
 		}
 	      else
-		PRINT(3)("Group %s located.\n", static_cast<Packer*>(groupWidget)->groupName);
+		PRINT(5)("Group %s located.\n", static_cast<Packer*>(groupWidget)->groupName);
 	    }
 	  // option-setting //
@@ -300,5 +299,5 @@
   if(widget->title && !strcmp(widget->title, info->variableName))
     {
-      PRINT(3)("Located Option %s.\n", widget->title);
+      PRINT(5)("Located Option %s.\n", widget->title);
       if(widget->isOption >= 1)
 	  static_cast<Option*>(widget)->load(info->variableValue);
Index: orxonox/trunk/src/lib/gui/gui/orxonox_gui_exec.h
===================================================================
--- orxonox/trunk/src/lib/gui/gui/orxonox_gui_exec.h	(revision 4025)
+++ orxonox/trunk/src/lib/gui/gui/orxonox_gui_exec.h	(revision 4026)
@@ -10,5 +10,4 @@
 #include "orxonox_gui_element.h"
 
-#include <stdio.h>
 using namespace std;
 
Index: orxonox/trunk/src/lib/gui/gui/orxonox_gui_gtk.cc
===================================================================
--- orxonox/trunk/src/lib/gui/gui/orxonox_gui_gtk.cc	(revision 4025)
+++ orxonox/trunk/src/lib/gui/gui/orxonox_gui_gtk.cc	(revision 4026)
@@ -28,6 +28,4 @@
 
 #include <stdarg.h>
-#include <iostream>
-
 
 using namespace std;
@@ -47,5 +45,5 @@
 #ifdef HAVE_GTK2
 #ifdef HAVE_GTHREAD
-  PRINTF(3)("Initializing the ThreadSystem of the GUI\n");
+  PRINTF(4)("Initializing the ThreadSystem of the GUI\n");
   g_thread_init(NULL);
   gdk_threads_init();
@@ -159,8 +157,8 @@
       delete []this->title;
     }
-  
-  PRINTF(4)("deleting the Widget part.\n");
-
-  PRINTF(4)("deleting recursively\n");
+    
+    PRINTF(5)("deleting the Widget part.\n");
+    
+  PRINTF(5)("deleting recursively\n");
 
   // deleting next item if existent
@@ -168,4 +166,5 @@
     delete this->next;
   this->next = NULL;
+
   //!  \todo not hiding widget, deleting.
   //  this->hide();
@@ -349,5 +348,5 @@
 {
   if (widget->isOption < 0 && static_cast<Packer*>(widget)->groupName)
-    cout << "[" << static_cast<Packer*>(widget)->groupName << "]\n";
+    PRINT(0)("[%s]\n", static_cast<Packer*>(widget)->groupName);
 }
 
@@ -360,9 +359,5 @@
 {
   if (widget->isOption < 0 && static_cast<Packer*>(widget)->groupName)
-    {
-      int* count =(int*)data;
-      *count = *count +1;
-      cout << *count <<": [" << static_cast<Packer*>(widget)->groupName << "]\n";
-    }
+    PRINT(0)("%d: [%s]\n", *(int*)data, static_cast<Packer*>(widget)->groupName);
 }
 
@@ -416,5 +411,7 @@
       bool found = false;
       // check if long flag matches
-      if ((option->flagName && strlen(name)>2 && !strncmp(name+2, option->flagName, strlen(option->flagName)) &&(name[strlen(option->flagName)+2] == '\0' || name[strlen(option->flagName)+2] == '=') ))
+      if ((option->flagName && strlen(name)>2 &&
+	   !strncmp(name+2, option->flagName, strlen(option->flagName)) &&
+	   (name[strlen(option->flagName)+2] == '\0' || name[strlen(option->flagName)+2] == '=') ))
 	{
 	  found = true;
@@ -424,5 +421,8 @@
 	    }
 	}
-      else if (option->flagNameShort && strlen(name)>1 && !strncmp(name+1, option->flagNameShort, strlen(option->flagNameShort))&&(name[strlen(option->flagNameShort)+1] == '\0' || name[strlen(option->flagNameShort)+1] == '=')) // check if short flag matches
+      // check if short flag matches
+      else if (option->flagNameShort && strlen(name)>1 &&
+	       !strncmp(name+1, option->flagNameShort, strlen(option->flagNameShort)) &&
+	       (name[strlen(option->flagNameShort)+1] == '\0' || name[strlen(option->flagNameShort)+1] == '='))
 	{
 	  found = true;
@@ -435,8 +435,8 @@
       if (found)
 	{
-	  PRINT(3)("found matching Flag %s\n", name);
+	  PRINT(4)("found matching Flag %s\n", name);
 	  if (value)
 	    {
-	      PRINT(3)("with Value %s\n", value);
+	      PRINT(4)("with Value %s\n", value);
 	      option->value = atoi(value);
 	    }
@@ -526,5 +526,5 @@
 Packer::~Packer(void)
 { 
-  PRINTF(4)("deleting the Packer part.\n");
+  PRINTF(5)("deleting the Packer part.\n");
   
   if (this->groupName)
@@ -575,5 +575,5 @@
 Container::~Container(void)
 { 
-  PRINTF(4)("deleting the Container part.\n");
+  PRINTF(5)("deleting the Container part.\n");
 }
 
@@ -650,7 +650,7 @@
 {
   if (this->title)
-    PRINTF(3)("deleting the Window: %s\n", this->title);
+    PRINTF(5)("deleting the Window: %s\n", this->title);
   else 
-    PRINTF(3)("deleting the Window.\n");
+    PRINTF(5)("deleting the Window.\n");
   //  this->hide();
 }
@@ -795,8 +795,5 @@
 Frame::~Frame(void)
 {
-  if (this->title)
-    PRINTF(3)("deleting the Frame: %s\n", this->title);
-  else 
-    PRINTF(3)("deleting the Frame.\n");
+  PRINTF(5)("deleting the Frame: %s\n", this->title);
 }
 
@@ -852,8 +849,5 @@
 EventBox::~EventBox(void)
 {
-  if (this->title)
-    PRINTF(3)("deleting the EventBox: %s\n", this->title);
-  else 
-    PRINTF(3)("deleting the EventBox.\n");
+  PRINTF(5)("deleting the EventBox: %s\n", this->title);
 }
 
@@ -895,9 +889,5 @@
 Box::~Box(void)
 {
-  if (this->title)
-    PRINTF(3)("deleting the Box: %s\n", this->title);
-  else 
-    PRINTF(3)("deleting the Box.\n");
-
+  PRINTF(5)("deleting the Box: %s\n", this->title);
 }
 
@@ -912,11 +902,7 @@
 #ifdef HAVE_GTK2
   if (boxtype == 'v')
-    {
-      this->widget = gtk_vbox_new(FALSE, 0);
-    }
+    this->widget = gtk_vbox_new(FALSE, 0);
   else
-    {
-      this->widget = gtk_hbox_new(FALSE, 0);
-    }
+    this->widget = gtk_hbox_new(FALSE, 0);
 #endif /* HAVE_GTK2 */
 }
@@ -967,5 +953,5 @@
 Option::~Option(void)
 { 
-  PRINTF(4)("deleting the Option Part.\n");
+  PRINTF(5)("deleting the Option Part.\n");
   if (this->flagName)
     delete []this->flagName;
@@ -1049,5 +1035,5 @@
 {
   this->value = atoi(loadString);
-  PRINT(3)("Loading %s: %s %d\n", this->title, loadString, value); 
+  PRINT(5)("Loading %s: %s %d\n", this->title, loadString, value); 
   this->redraw();
 }
@@ -1092,9 +1078,5 @@
 Button::~Button(void)
 {
-  if (this->title)
-    PRINTF(3)("deleting the Label: %s\n", this->title);
-  else 
-    PRINTF(3)("deleting the Label.\n");
-
+  PRINTF(5)("deleting the Label: %s\n", this->title);
 }
 
@@ -1166,7 +1148,7 @@
 {
   if (this->title)
-    PRINTF(3)("deleting the CheckButton: %s\n", this->title);
+    PRINTF(5)("deleting the CheckButton: %s\n", this->title);
   else 
-    PRINTF(3)("deleting the CheckButton.\n");
+    PRINTF(5)("deleting the CheckButton.\n");
 }
 
@@ -1214,5 +1196,5 @@
 #else /* HAVE_GTK2 */
   char tmpChar[20];
-  cout << "\nPlease give me a new value for " << this->title << " [0,1](default:" << this->defaultValue << "): ";
+  PRINT(0)("\nPlease give me a new value for %s [0,1](default:%d): ",this->title, this->defaultValue);
   cin >> tmpChar;
 
@@ -1220,5 +1202,5 @@
     this->value = 1;
 #endif /* HAVE_GTK2 */
-  cout << this->title << " set to: " << this->value << endl;
+  PRINT(0)("%s set to: %d\n", this->title, this->value);
 }
 
@@ -1258,8 +1240,5 @@
 Slider::~Slider(void)
 {
-  if (this->title)
-    PRINTF(3)("deleting the Slider: %s\n", this->title);
-  else 
-    PRINTF(3)("deleting the Slider.\n");
+  PRINTF(5)("deleting the Slider: %s\n", this->title);
 }
 
@@ -1308,5 +1287,5 @@
 #else /* HAVE_GTK2 */
   char tmpChar[20];
-  cout << "\nPlease give me a new value for " << this->title << " [" <<this->start << "-" << this->end << "](default:" << this->defaultValue << "): ";
+  PRINT(0)("\nPlease give me a new value for %s [%d-%d] (default:%d): ", this->title, this->start, this->end, this->defaultValue);
   cin >> tmpChar;
 
@@ -1316,5 +1295,5 @@
     this->value = this->start;
 #endif /* HAVE_GTK2 */
-  cout << this->title << " set to: " << this->value << endl;
+  PRINT(0)("%s set to: %d\n",this->title, this->value);
 }
 
@@ -1358,13 +1337,10 @@
 Menu::~Menu(void)
 {
-  if (this->title)
-    PRINTF(3)("deleting the Menu: %s\n", this->title);
-  else 
-    PRINTF(3)("deleting the Menu.\n");
-  //! \todo destroy menu
+  PRINTF(5)("deleting the Menu: %s\n", this->title);
   this->currItem = this->firstItem;
   while(this->currItem)
     {
       delete []this->currItem->name;
+      //! \todo destroy menu
       /*
 	#ifdef HAVE_GTK2
@@ -1427,5 +1403,5 @@
       PRINTF(2)("Sorry, but %s has not been found in the Itemlist of %s\n", loadString, this->title);
     }
-  PRINTF(3)( "Loading %s: setting to %d\n", this->title, this->value); 
+  PRINTF(4)( "Loading %s: setting to %d\n", this->title, this->value); 
   this->redraw();
 }
@@ -1466,5 +1442,5 @@
 {
 #ifdef HAVE_GTK2
- gtk_option_menu_set_history(GTK_OPTION_MENU(this->widget), this->value);
+  gtk_option_menu_set_history(GTK_OPTION_MENU(this->widget), this->value);
 #endif /* HAVE_GTK2 */
 }
@@ -1479,10 +1455,10 @@
 #else /* HAVE_GTK2 */
   char tmpChar[20];
-  cout << "\nPlease give me a new value for " << this->title << "(default:" << this->defaultValue << "): ";
+  PRINT(0)("\nPlease give me a new value for %s (default: %d): ", this->title, this->defaultValue);
   cin >> tmpChar;
   this->value = atoi(tmpChar);
 
 #endif /* HAVE_GTK2 */
-  cout << this->title << " set to: " << this->value << endl;
+  PRINT(4)("%s set to: %d\n", this->title, this->value);
 }
 
@@ -1506,8 +1482,5 @@
 OptionLabel::~OptionLabel(void)
 {
-  if (this->title)
-    PRINTF(3)("deleting the OptionLabel: %s\n", this->title);
-  else 
-    PRINTF(3)("deleting the OptionLabel.\n");
+  PRINTF(5)("deleting the OptionLabel: %s\n", this->title);
   if (this->cValue)
     delete []this->cValue;
@@ -1560,8 +1533,8 @@
   this->cValue =(char*)gtk_label_get_text(GTK_LABEL(this->widget));
 #else /* HAVE_GTK2 */
-  cout << "\nPlease give me a new input for " << this->title << ": ";
+  PRINT(0)("\nPlease give me a new input for %s: ", this->title);
   cin >> this->cValue;
 #endif /* HAVE_GTK2 */
-  cout << this->title << " set to: " << this->cValue << endl;
+  PRINT(4)("%s set to: %s\n", this->title,  this->cValue);
 }
 
@@ -1582,5 +1555,5 @@
 void OptionLabel::load(char* loadString)
 {
-  PRINTF(3)( "Loading %s: setting to %s\n", this->title, loadString); 
+  PRINTF(4)( "Loading %s: setting to %s\n", this->title, loadString); 
   this->setValue(loadString);
 }
@@ -1610,8 +1583,5 @@
 Label::~Label(void)
 {
-  if (this->title)
-    PRINTF(3)("deleting the Label: %s\n", this->title);
-  else 
-    PRINTF(3)("deleting the Label.\n");
+  PRINTF(5)("deleting the Label: %s\n", this->title);
 }
 
@@ -1667,7 +1637,5 @@
     }
   else
-    {
-      this->title = new char[strlen(textToAppend)];
-    }
+    this->title = new char[strlen(textToAppend)];
   
 #ifdef HAVE_GTK2
@@ -1722,8 +1690,5 @@
 ProgressBar::~ProgressBar(void)
 {
-  if (this->title)
-    PRINTF(3)("deleting the ProgressBar: %s\n", this->title);
-  else 
-    PRINTF(3)("deleting the ProgressBar.\n");
+  PRINTF(5)("deleting the ProgressBar: %s\n", this->title);
 }
 
@@ -1799,8 +1764,5 @@
 Image::~Image(void)
 {
-  if (this->title)
-    PRINTF(3)("deleting the Image: %s\n", this->title);
-  else 
-    PRINTF(3)("deleting the Image.\n");
+  PRINTF(5)("deleting the Image: %s\n", this->title);
 }
 
