Index: /orxonox/trunk/src/lib/gui/gui/gui_keys.cc
===================================================================
--- /orxonox/trunk/src/lib/gui/gui/gui_keys.cc	(revision 4087)
+++ /orxonox/trunk/src/lib/gui/gui/gui_keys.cc	(revision 4088)
@@ -33,16 +33,27 @@
 GuiKeys::GuiKeys(void)
 {
-  this->keysFrame = new Frame("Keyboard-Options:");
-  //  keysFrame->setGroupName("Keyboard");
-  this->keysBox = new Box('h');
-  this->player1 = new Player("player1");
-  this->player2 = new Player("player2");
-
-  this->keysBox->fill(this->player1->getOpenButton());
-  this->keysBox->fill(this->player2->getOpenButton());
-
-  this->keysFrame->fill(this->keysBox);
-
-
+  Frame* keysFrame;      //!< The Frame that holds the keyOptions.
+
+  keysFrame = new Frame("Keyboard-Options:");
+  {
+    Box* keysBox;          //!< The Frame that holds the keyOptions.
+    
+    //  keysFrame->setGroupName("Keyboard");
+    keysBox = new Box('h');
+    {
+      Player* player1;       //!< The first Player's keys.
+      Player* player2;       //!< The seconds Player's keys.
+      Button* misc;          //!< Other keyboeard options come here. \todo include some like pause, quit and so on.
+      
+      player1 = new Player("player1");
+      player2 = new Player("player2");
+      
+      keysBox->fill(player1->getOpenButton());
+      keysBox->fill(player2->getOpenButton());
+    }
+    keysFrame->fill(keysBox);
+  }
+  
+  // setting up the Input Windows that receives keystrokes.
   this->inputWindow = new Window("inputWindow");
   this->inputButton = new Button("test");
@@ -52,5 +63,5 @@
 #endif /* HAVE_GTK2 */
   this->inputWindow->fill(inputButton);
-
+  
   this->setMainWidget(keysFrame);
 }
@@ -78,34 +89,47 @@
 Player::Player(char* player)
 {
-  char* windowName = new char[strlen(player)+25];
-  strcpy(windowName, "Keyboard settings of ");
+  Window* pKeyWindow;     //!< The Window for a new Key-setting.
+
+  char* windowName = new char[strlen(player)+12];
+  strcpy(windowName, "KeySets: ");
   strcat(windowName, player);
-  this->pKeyWindow = new Window(windowName);
-  this->pKeyFrame = new Frame(windowName);
-   this->pKeysBox = new Box('v');
-   this->pKeysBox->setGroupName(player);
-    this->pKeysBox->fill(addKey(UP, "up"));
-    this->pKeysBox->fill(addKey(DOWN, "down"));
-    this->pKeysBox->fill(addKey(LEFT, "left"));
-    this->pKeysBox->fill(addKey(RIGHT, "right"));
-    this->pKeysBox->fill(addKey(SHOOT, "fire"));
-    delete windowName;
-    closeButton = new Button("close");
-#ifdef HAVE_GTK2
-    this->closeButton->connectSignal("button_press_event", this->pKeyWindow, Window::windowClose);
-#endif /* HAVE_GTK2 */
-
-    this->pKeysBox->fill(this->closeButton);
-    this->pKeyFrame->fill(this->pKeysBox);
-   this->pKeyWindow->fill(this->pKeyFrame);
-   Window::addWindow(this->pKeyWindow);
-#ifdef HAVE_GTK2
-   this->pKeyWindow->connectSignal("destroy", this->pKeyWindow, Window::windowClose);
-   this->pKeyWindow->connectSignal("delete_event", this->pKeyWindow, Window::windowClose);
-#endif /* HAVE_GTK2 */
-
+  pKeyWindow = new Window(windowName);
+  delete windowName;
+  {
+    Frame* pKeyFrame;       //!< The Frame for a new Key-setting.
+
+    pKeyFrame = new Frame(windowName);
+    {
+      Box* pKeysBox;          //!< The Box that holds the Key-settings.
+      pKeysBox = new Box('v');
+      {
+	Button* closeButton;    //!< The CloseButton for this key-settings.
+
+	pKeysBox->setGroupName(player);
+	pKeysBox->fill(addKey(UP, "up"));
+	pKeysBox->fill(addKey(DOWN, "down"));
+	pKeysBox->fill(addKey(LEFT, "left"));
+	pKeysBox->fill(addKey(RIGHT, "right"));
+	pKeysBox->fill(addKey(SHOOT, "fire"));
+	closeButton = new Button("close");
+#ifdef HAVE_GTK2
+	closeButton->connectSignal("button_press_event", pKeyWindow, Window::windowClose);
+#endif /* HAVE_GTK2 */
+
+	pKeysBox->fill(closeButton);
+      }
+      pKeyFrame->fill(pKeysBox);
+    }
+    pKeyWindow->fill(pKeyFrame);
+  }
+  Window::addWindow(pKeyWindow);
+#ifdef HAVE_GTK2
+  pKeyWindow->connectSignal("destroy", pKeyWindow, Window::windowClose);
+  pKeyWindow->connectSignal("delete_event", pKeyWindow, Window::windowClose);
+#endif /* HAVE_GTK2 */
+  
   this->openButton = new Button(player);
 #ifdef HAVE_GTK2
-  this->openButton->connectSignal("button_press_event", this->pKeyWindow, Window::windowOpen);
+  this->openButton->connectSignal("button_press_event", pKeyWindow, Window::windowOpen);
 #endif /* HAVE_GTK2 */
 }
Index: /orxonox/trunk/src/lib/gui/gui/gui_keys.h
===================================================================
--- /orxonox/trunk/src/lib/gui/gui/gui_keys.h	(revision 4087)
+++ /orxonox/trunk/src/lib/gui/gui/gui_keys.h	(revision 4088)
@@ -28,16 +28,7 @@
 };
 
-
-class Player;
 //! Class that creates the Keys-Options.
 class GuiKeys : public GuiElement
 {
- private:
-  Frame* keysFrame;      //!< The Frame that holds the keyOptions.
-  Box* keysBox;          //!< The Frame that holds the keyOptions.
-  Player* player1;       //!< The first Player's keys.
-  Player* player2;       //!< The seconds Player's keys.
-  Button* misc;          //!< Other keyboeard options come here. \todo include some like pause, quit and so on.
-
  public:
   GuiKeys(void);
@@ -47,21 +38,11 @@
   static Button* inputButton; //!< A Button that gets keyboard clicks. Static, because only one needed.
   static long keySignal;      //!< A keySignal that handles keyboard clicks. Static, because only one needed.
-
 };
 
 //! Class to hold infos about a Player
-/**
-   \todo split into subclass and superclass ButtonConfigurator
-*/
 class Player
 {
  private:
-  Window* pKeyWindow;     //!< The Window for a new Key-setting.
-  Frame* pKeyFrame;       //!< The Frame for a new Key-setting.
   Button* openButton;     //!< The OpenButton for this key-settings.
-  Button* closeButton;    //!< The CloseButton for this key-settings.
-  Box* pKeysBox;          //!< The Box that holds the Key-settings.
-
-  //  InputKey* inputKey[10];     //!< Buttons-array. \todo make it dynamic.
 
  public:
