Index: src/UIElements/Menu/TextMenu/TextMenu.hpp
===================================================================
--- src/UIElements/Menu/TextMenu/TextMenu.hpp	(revision 8f3f407211aab85d7d899e17a7d633813f02ad83)
+++ src/UIElements/Menu/TextMenu/TextMenu.hpp	(revision f0f9a60bdc0af971268af45d96cd8b8a9875cb05)
@@ -19,5 +19,5 @@
 #include "Actions/ActionRegistry.hpp"
 #include "Actions/ActionTraits.hpp"
-#include "Menu/TextMenu/TxMenu.hpp"
+#include "Menu/TextMenu/TxMenuLeaveAction.hpp"
 #include "Menu/TextMenu/ActionMenuItem.hpp"
 #include "Menu/TextMenu/SeperatorItem.hpp"
Index: src/UIElements/Menu/TextMenu/TxMenu.cpp
===================================================================
--- src/UIElements/Menu/TextMenu/TxMenu.cpp	(revision 8f3f407211aab85d7d899e17a7d633813f02ad83)
+++ src/UIElements/Menu/TextMenu/TxMenu.cpp	(revision f0f9a60bdc0af971268af45d96cd8b8a9875cb05)
@@ -24,9 +24,6 @@
 #include <iostream>
 #include <cmath>
-#include "Actions/Action.hpp"
-#include "Actions/ActionTraits.hpp"
 #include "Menu/TextMenu/TxMenu.hpp"
 #include "Menu/TextMenu/MenuItem.hpp"
-#include "Helpers/Assert.hpp"
 
 
@@ -161,71 +158,2 @@
 }
 
-/****************************** Contained Actions ****************/
-
-/** Constructor for class TxMenu::LeaveAction.
- * \param _menu pointer to the containing TxMenu
- * \param &LeaveActionTrait ActionTraits for this Action
- */
-TxMenu::LeaveAction::LeaveAction(TxMenu* const _menu, const ActionTraits & LeaveActionTrait) :
-  Action(LeaveActionTrait, true),
-  menu(_menu)
-{}
-
-/** Destructor for class TxMenu::LeaveAction.
- *
- */
-TxMenu::LeaveAction::~LeaveAction(){}
-
-/** We can't undo the leave action.
- * \return false
- */
-bool TxMenu::LeaveAction::canUndo(){
-  return false;
-}
-
-/** We should never undo the leave action.
- * \return false
- */
-bool TxMenu::LeaveAction::shouldUndo(){
-  return false;
-}
-
-/** Internal function to obtain parameters from a storage.
- * We do not use this one as we don't need any parameters.
- */
-void TxMenu::LeaveAction::getParametersfromValueStorage()
-{}
-
-/** Internal function to construct the dialog.
- * We do not need this function as there is no dialog to construct.
- */
-Dialog* TxMenu::LeaveAction::fillDialog(Dialog *dialog){
-  ASSERT(dialog,"No Dialog given when filling action dialog");
-  return dialog;
-}
-
-/** Calls TxMenu::doQuit() on the stored menu reference.
- * \return ActionState pointer with success
- */
-Action::state_ptr TxMenu::LeaveAction::performCall(){
-  menu->doQuit();
-  return Action::success;
-}
-
-/** Implementation of undo function for an Action.
- * We do not use this functionality.
- * \return ActionState pointer with failure
- */
-Action::state_ptr TxMenu::LeaveAction::performUndo(Action::state_ptr){
-  ASSERT(0,"Cannot undo leaving a menu");
-  return Action::failure;
-}
-
-/** Implementation of redo function for an Action.
- * We do not use this functionality.
- * \return ActionState pointer with failure
- */
-Action::state_ptr TxMenu::LeaveAction::performRedo(Action::state_ptr){
-  ASSERT(0,"Cannot redo leaving a menu");
-  return Action::failure;
-}
Index: src/UIElements/Menu/TextMenu/TxMenu.hpp
===================================================================
--- src/UIElements/Menu/TextMenu/TxMenu.hpp	(revision 8f3f407211aab85d7d899e17a7d633813f02ad83)
+++ src/UIElements/Menu/TextMenu/TxMenu.hpp	(revision f0f9a60bdc0af971268af45d96cd8b8a9875cb05)
@@ -14,6 +14,4 @@
 
 #include "Menu/Menu.hpp"
-#include "Actions/Action.hpp"
-#include "Actions/ActionTraits.hpp"
 #include "defs.hpp"
 
@@ -38,27 +36,5 @@
 {
 public:
-  /** This specific action is used to leave a submenu and return to an upper one.
-   * It differs from other Action's (and thus cannot be put into the usual
-   * structure) that we have to store the reference to the menu it belongs to.
-   * There, we call the doQuit() member function on performCall().
-   */
-  class LeaveAction : public Action {
-  public:
-    LeaveAction(TxMenu* const, const ActionTraits &_trait);
-    virtual ~LeaveAction();
-
-    bool canUndo();
-    bool shouldUndo();
-
-  protected:
-    virtual Dialog* fillDialog(Dialog *dialog);
-  private:
-    virtual void getParametersfromValueStorage();
-    virtual Action::state_ptr performCall();
-    virtual Action::state_ptr performUndo(Action::state_ptr);
-    virtual Action::state_ptr performRedo(Action::state_ptr);
-
-    TxMenu* const menu;
-  };
+  class LeaveAction;
 
   TxMenu(std::ostream& _outputter, const std::string _title, char _spacer=STD_MENU_TITLE_SPACER,int _length=STD_MENU_LENGTH);
Index: src/UIElements/Menu/TextMenu/TxMenuLeaveAction.cpp
===================================================================
--- src/UIElements/Menu/TextMenu/TxMenuLeaveAction.cpp	(revision f0f9a60bdc0af971268af45d96cd8b8a9875cb05)
+++ src/UIElements/Menu/TextMenu/TxMenuLeaveAction.cpp	(revision f0f9a60bdc0af971268af45d96cd8b8a9875cb05)
@@ -0,0 +1,93 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * TxMenuLeaveAction.cpp
+ *
+ *  Created on: Nov 8, 2010
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "Helpers/MemDebug.hpp"
+
+#include "Actions/Action.hpp"
+#include "Actions/ActionTraits.hpp"
+#include "Menu/TextMenu/TxMenuLeaveAction.hpp"
+#include "Helpers/Assert.hpp"
+
+/** Constructor for class TxMenu::LeaveAction.
+ * \param _menu pointer to the containing TxMenu
+ * \param &LeaveActionTrait ActionTraits for this Action
+ */
+TxMenu::LeaveAction::LeaveAction(TxMenu* const _menu, const ActionTraits & LeaveActionTrait) :
+  Action(LeaveActionTrait, true),
+  menu(_menu)
+{}
+
+/** Destructor for class TxMenu::LeaveAction.
+ *
+ */
+TxMenu::LeaveAction::~LeaveAction(){}
+
+/** We can't undo the leave action.
+ * \return false
+ */
+bool TxMenu::LeaveAction::canUndo(){
+  return false;
+}
+
+/** We should never undo the leave action.
+ * \return false
+ */
+bool TxMenu::LeaveAction::shouldUndo(){
+  return false;
+}
+
+/** Internal function to obtain parameters from a storage.
+ * We do not use this one as we don't need any parameters.
+ */
+void TxMenu::LeaveAction::getParametersfromValueStorage()
+{}
+
+/** Internal function to construct the dialog.
+ * We do not need this function as there is no dialog to construct.
+ */
+Dialog* TxMenu::LeaveAction::fillDialog(Dialog *dialog){
+  ASSERT(dialog,"No Dialog given when filling action dialog");
+  return dialog;
+}
+
+/** Calls TxMenu::doQuit() on the stored menu reference.
+ * \return ActionState pointer with success
+ */
+Action::state_ptr TxMenu::LeaveAction::performCall(){
+  menu->doQuit();
+  return Action::success;
+}
+
+/** Implementation of undo function for an Action.
+ * We do not use this functionality.
+ * \return ActionState pointer with failure
+ */
+Action::state_ptr TxMenu::LeaveAction::performUndo(Action::state_ptr){
+  ASSERT(0,"Cannot undo leaving a menu");
+  return Action::failure;
+}
+
+/** Implementation of redo function for an Action.
+ * We do not use this functionality.
+ * \return ActionState pointer with failure
+ */
+Action::state_ptr TxMenu::LeaveAction::performRedo(Action::state_ptr){
+  ASSERT(0,"Cannot redo leaving a menu");
+  return Action::failure;
+}
Index: src/UIElements/Menu/TextMenu/TxMenuLeaveAction.hpp
===================================================================
--- src/UIElements/Menu/TextMenu/TxMenuLeaveAction.hpp	(revision f0f9a60bdc0af971268af45d96cd8b8a9875cb05)
+++ src/UIElements/Menu/TextMenu/TxMenuLeaveAction.hpp	(revision f0f9a60bdc0af971268af45d96cd8b8a9875cb05)
@@ -0,0 +1,39 @@
+/*
+ * TxMenuLeaveAction.hpp
+ *
+ *  Created on: Nov 8, 2010
+ *      Author: heber
+ */
+
+#ifndef TXMENULEAVEACTION_HPP_
+#define TXMENULEAVEACTION_HPP_
+
+#include "Menu/TextMenu/TxMenu.hpp"
+#include "Actions/Action.hpp"
+#include "Actions/ActionTraits.hpp"
+
+/** This specific action is used to leave a submenu and return to an upper one.
+ * It differs from other Action's (and thus cannot be put into the usual
+ * structure) that we have to store the reference to the menu it belongs to.
+ * There, we call the doQuit() member function on performCall().
+ */
+class TxMenu::LeaveAction : public Action {
+public:
+  LeaveAction(TxMenu* const, const ActionTraits &_trait);
+  virtual ~LeaveAction();
+
+  bool canUndo();
+  bool shouldUndo();
+
+protected:
+  virtual Dialog* fillDialog(Dialog *dialog);
+private:
+  virtual void getParametersfromValueStorage();
+  virtual Action::state_ptr performCall();
+  virtual Action::state_ptr performUndo(Action::state_ptr);
+  virtual Action::state_ptr performRedo(Action::state_ptr);
+
+  TxMenu* const menu;
+};
+
+#endif /* TXMENULEAVEACTION_HPP_ */
