Index: src/Actions/MapOfActions.cpp
===================================================================
--- src/Actions/MapOfActions.cpp	(revision b800215c062e714dbeab7570ef2a6df003c54c1c)
+++ src/Actions/MapOfActions.cpp	(revision b0acc3a7b5b3ca40d4aa3940fd46ba4055624f89)
@@ -22,4 +22,45 @@
 #include "verbose.hpp"
 
+#include "Actions/ActionRegistry.hpp"
+#include "Actions/AnalysisAction/MolecularVolumeAction.hpp"
+#include "Actions/AnalysisAction/PairCorrelationAction.hpp"
+#include "Actions/AnalysisAction/PrincipalAxisSystemAction.hpp"
+#include "Actions/AtomAction/AddAction.hpp"
+#include "Actions/AtomAction/ChangeElementAction.hpp"
+#include "Actions/AtomAction/RemoveAction.hpp"
+#include "Actions/CmdAction/BondLengthTableAction.hpp"
+#include "Actions/CmdAction/ElementDbAction.hpp"
+#include "Actions/CmdAction/FastParsingAction.hpp"
+#include "Actions/CmdAction/HelpAction.hpp"
+#include "Actions/CmdAction/VerboseAction.hpp"
+#include "Actions/CmdAction/VersionAction.hpp"
+#include "Actions/FragmentationAction/DepthFirstSearchAction.hpp"
+#include "Actions/FragmentationAction/SubgraphDissectionAction.hpp"
+#include "Actions/FragmentationAction/FragmentationAction.hpp"
+#include "Actions/MoleculeAction/BondFileAction.hpp"
+#include "Actions/MoleculeAction/ChangeNameAction.hpp"
+#include "Actions/MoleculeAction/FillWithMoleculeAction.hpp"
+#include "Actions/MoleculeAction/LinearInterpolationofTrajectoriesAction.hpp"
+#include "Actions/MoleculeAction/SaveAdjacencyAction.hpp"
+#include "Actions/MoleculeAction/SaveBondsAction.hpp"
+#include "Actions/MoleculeAction/SaveTemperatureAction.hpp"
+#include "Actions/MoleculeAction/TranslateAction.hpp"
+#include "Actions/MoleculeAction/VerletIntegrationAction.hpp"
+#include "Actions/ParserAction/LoadXyzAction.hpp"
+#include "Actions/ParserAction/SaveXyzAction.hpp"
+#include "Actions/TesselationAction/ConvexEnvelopeAction.hpp"
+#include "Actions/TesselationAction/NonConvexEnvelopeAction.hpp"
+#include "Actions/WorldAction/AddEmptyBoundaryAction.hpp"
+#include "Actions/WorldAction/BoundInBoxAction.hpp"
+#include "Actions/WorldAction/CenterInBoxAction.hpp"
+#include "Actions/WorldAction/CenterOnEdgeAction.hpp"
+#include "Actions/WorldAction/ChangeBoxAction.hpp"
+#include "Actions/WorldAction/InputAction.hpp"
+#include "Actions/WorldAction/OutputAction.hpp"
+#include "Actions/WorldAction/RemoveSphereOfAtomsAction.hpp"
+#include "Actions/WorldAction/RepeatBoxAction.hpp"
+#include "Actions/WorldAction/ScaleBoxAction.hpp"
+#include "Actions/WorldAction/SetDefaultNameAction.hpp"
+#include "Actions/WorldAction/SetGaussianBasisAction.hpp"
 #include "Actions/Values.hpp"
 
@@ -99,4 +140,5 @@
   DescriptionMap["save-bonds"] = "name of the bonds file to write to";
   DescriptionMap["save-temperature"] = "name of the temperature file to write to";
+  DescriptionMap["SaveXyz"] = "save world as xyz file";
   DescriptionMap["scale-box"] = "scale box and atomic positions inside";
   DescriptionMap["subgraph-dissect"] = "dissect the molecular system into molecules representing disconnected subgraphs";
@@ -245,6 +287,55 @@
   DefaultValue["periodic"] = "0";
 
-
-  // list of generic actions
+  // put action into each menu category
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("analysis", "molecular-volume") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("analysis", "pair-correlation") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("analysis", "principal-axis-system") );
+
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("atom", "add-atom") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("atom", "change-element") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("atom", "remove-atom") );
+
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("command", "bond-table") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("command", "element-db") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("command", "fastparsing") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("command", "verbose") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("command", "version") );
+
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("fragmentation", "depth-first-search") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("fragmentation", "fragment-mol") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("fragmentation", "subgraph-dissect") );
+
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "bond-file") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "change-molname") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "fill-molecule") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "linear-interpolate") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "rotate-to-pas") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "save-adjacency") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "save-bonds") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "save-temperature") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "suspend-in-water") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "translate-mol") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "verlet-integrate") );
+
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("parser", "parse-xyz") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("parser", "SaveXyz") );
+
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("tesselation", "convex-envelope") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("tesselation", "nonconvex-envelope") );
+
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "boundary") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "bound-in-box") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "center-in-box") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "center-edge") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "change-box") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "input") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "output") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "remove-sphere") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "repeat-box") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "scale-box") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "default-molname") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "set-basis") );
+
+  // put actions into command line category
 	generic.insert("add-atom");
   generic.insert("bond-file");
@@ -328,4 +419,57 @@
 }
 
+
+void MapOfActions::populateActions()
+{
+  new AnalysisMolecularVolumeAction();
+  new AnalysisPairCorrelationAction();
+  new AnalysisPrincipalAxisSystemAction();
+
+  new AtomAddAction();
+  new AtomChangeElementAction();
+  new AtomRemoveAction();
+
+  new CommandLineBondLengthTableAction();
+  new CommandLineElementDbAction();
+  new CommandLineFastParsingAction();
+  new CommandLineHelpAction();
+  new CommandLineVerboseAction();
+  new CommandLineVersionAction();
+
+  new FragmentationDepthFirstSearchAction();
+  new FragmentationFragmentationAction();
+  new FragmentationSubgraphDissectionAction();
+
+  new MoleculeBondFileAction();
+  new MoleculeChangeNameAction();
+  new MoleculeFillWithMoleculeAction();
+  new MoleculeLinearInterpolationofTrajectoriesAction();
+  new MoleculeSaveAdjacencyAction();
+  new MoleculeSaveBondsAction();
+  new MoleculeSaveTemperatureAction();
+  new MoleculeTranslateAction();
+  new MoleculeVerletIntegrationAction();
+
+  new ParserLoadXyzAction();
+  new ParserSaveXyzAction();
+
+  new TesselationConvexEnvelopeAction();
+  new TesselationNonConvexEnvelopeAction();
+
+  new WorldAddEmptyBoundaryAction();
+  new WorldBoundInBoxAction();
+  new WorldCenterInBoxAction();
+  new WorldCenterOnEdgeAction();
+  new WorldChangeBoxAction();
+  new WorldInputAction();
+  new WorldOutputAction();
+  new WorldRemoveSphereOfAtomsAction();
+  new WorldRepeatBoxAction();
+  new WorldScaleBoxAction();
+  new WorldSetDefaultNameAction();
+  new WorldSetGaussianBasisAction();
+}
+
+
 /** Adds all options to the CommandLineParser.
  *
Index: src/Actions/MapOfActions.hpp
===================================================================
--- src/Actions/MapOfActions.hpp	(revision b800215c062e714dbeab7570ef2a6df003c54c1c)
+++ src/Actions/MapOfActions.hpp	(revision b0acc3a7b5b3ca40d4aa3940fd46ba4055624f89)
@@ -11,4 +11,5 @@
 #include "Helpers/Assert.hpp"
 #include <boost/program_options.hpp>
+
 #include <map>
 #include <set>
@@ -20,4 +21,102 @@
 namespace po = boost::program_options;
 
+/** Central class for adding functionality to the code.
+ *
+ * In Molecuilder everything that can be done - such as adding atoms,
+ * translating molecules, saving bind information - is an Action.
+ *
+ * In order to reference Action's with what the user sees, this class is the
+ * mediator.
+ *
+ * An Action is described to the user by:
+ * -# a name (this is the most important information)
+ * -# a description
+ * -# a shortform (single letter for use on the command line)
+ * -# a text menu it resides in
+ * -# the type of its argument
+ * -# the command line category
+ *
+ * The Action::NAME is the most important information because every Action
+ * registers itself automatically with the ActionRegistry and can be retrieved
+ * therefrom and from this MapOfActions simply by knowing its name alone.
+ *
+ * In the constructor of MapOfActions all this is set.
+ *
+ * Note that Action will require input from the user. This is done via class
+ * Query.
+ *
+ * And note also that MapOfActions actually contains more than just all
+ * Actions: There are a number of names that actually are just arguments to
+ * actions (e.g. "output-file").
+ *
+ * <h1> Howto add an Action</h1>
+ *
+ * Let us assume your new action (class) is called SuperDuperAction, consisting
+ * of two files SuperDuperAction.cpp and SuperDuperAction.hpp.
+ *
+ * Furthermore, let's say you Action needs two values: a double value as a
+ * upper threshold and a string which is the name of the output file.
+ *
+ * <h2> Command Line preliminaries </h2>
+ *
+ * You have to decide whether (for the command line) it makes sense to have an
+ * extra argument requesting the arguments, or one should be the argument of
+ * your action. I.e. your action name is "super-duper", then the use may
+ * call your action like this:
+ *
+ * ./molecuilder --super-duper 4 --output-file test.dat
+ *
+ * Here, we have picked the threshold as the value for your action and the
+ * name of the output file is given by an additional argument. Of course,
+ * it can be the other way round or by two arguments such as here:
+ *
+ * ./molecuilder --super-duper --threshold 4 --output-file test.dat
+ *
+ * It depends on what possible arguments are already there (don't make up
+ * new ones if present ones actually make sense for your action) and which
+ * argument is more natural or closer to what your action does.
+ *
+ * <h2> Menu preliminaries </h2>
+ *
+ * Whatever you decide, your action will need some Query dialogs to request
+ * the necessary information from the user, either via a command line
+ * argument (--output-file) via a text dialog (referenced by "output-file")
+ * or via a graphical dialog (same reference). And therein, the names
+ * of the arguments have to re-appear.
+ *
+ * Then, the following steps have to be done to incorporate your Action:
+ * -# create a unique name for your action (no capital letters) to reference
+ *    it, this name has to appear in the file SuperDuperAction.cpp, e.g.
+ *    "super-duper"
+ * -# pick names the other required arguments, best if they are already
+ *    present in the MapOfActions. They have to appear in Query's in the
+ *    code of your Action.
+ * -# With this name create entries in the following maps for the action
+ *    name and for each names of a desired addtional argument if not present:
+ *   -# DescriptionMap, a catchy description of what your action does
+ *   -# TypeMap, see MapOfActions::OptionTypes for possible types of the single
+ *      argument it takes.
+ *   -# MenuContainsActionMap, in which menu should your action appear
+ *   -# ShortFormMap (optional), single letter for command line call
+ *   -# DefaultValueMap (optional), the default value (always a string)
+ * -# add to one of the command line sets by the following categories
+ *   -# generic - generic options (i.e. not one of the others)
+ *   -# config - action/argument only considers internal bevahior, user
+ *      does not have to see it while still having full functionality
+ *   -# hidden - this should be hidden from the user
+ *   -# visible - this should be visible to the user
+ *   -# inputfile - this should only be parsed from an input file, not
+ *      from command line
+ * -# add to a menu, i.e. make an entry in MenuContainsActionMap.
+ * -# add header file SuperDuperAction.hpp to MapOfActions.cpp and instantiate
+ *    your action in populateMenu() (mind the sorting: 1. menu,
+ *    2. alphabetical)
+ *
+ *  And that's.
+ *
+ *  Now, your action can be called from the command line, within the text
+ *  menu and the graphical user interface.
+ *
+ */
 class MapOfActions : public Singleton<MapOfActions> {
   friend class Singleton<MapOfActions>;
@@ -27,21 +126,26 @@
 
   // getter for the action descriptions and short forms
-  std::string getDescription(string actionname);
-  std::string getKeyAndShortForm(string actionname);
-  std::string getShortForm(string actionname);
-  map <std::string, std::string> getShortFormToActionMap();
+  std::string getDescription(std::string actionname);
+  std::string getKeyAndShortForm(std::string actionname);
+  std::string getShortForm(std::string actionname);
+  std::map <std::string, std::string> getShortFormToActionMap();
 
   void AddOptionsToParser();
 
   // check presence and getter for action type
-  bool hasValue(string actionname);
-  bool isShortFormPresent(string shortform);
-  enum OptionTypes getValueType(string actionname);
+  bool hasValue(std::string actionname);
+  bool isShortFormPresent(std::string shortform);
+  enum OptionTypes getValueType(std::string actionname);
 
-  set<string> generic;
-  set<string> config;
-  set<string> hidden;
-  set<string> visible;
-  set<string> inputfile;
+  std::set<std::string> generic;
+  std::set<std::string> config;
+  std::set<std::string> hidden;
+  std::set<std::string> visible;
+  std::set<std::string> inputfile;
+
+  std::multimap <std::string, std::string> MenuContainsActionMap;
+
+  // instantiates and puts all known actions into the ActionRegistry
+  void populateActions();
 
 private:
@@ -51,11 +155,11 @@
 
   // lookup list from our configs to the ones of CommandLineParser
-  map< set<std::string> *, po::options_description *> CmdParserLookup;
+  std::map< std::set<std::string> *, po::options_description *> CmdParserLookup;
 
   // map of the action names and their description
-  map<std::string, std::string> DefaultValue;
-  map<std::string, std::string> DescriptionMap;
-  map<std::string, std::string> ShortFormMap;
-  map<std::string, enum OptionTypes > TypeMap;
+  std::map<std::string, std::string> DefaultValue;
+  std::map<std::string, std::string> DescriptionMap;
+  std::map<std::string, std::string> ShortFormMap;
+  std::map<std::string, enum OptionTypes > TypeMap;
 };
 
Index: src/Actions/MoleculeAction/ChangeNameAction.cpp
===================================================================
--- src/Actions/MoleculeAction/ChangeNameAction.cpp	(revision b800215c062e714dbeab7570ef2a6df003c54c1c)
+++ src/Actions/MoleculeAction/ChangeNameAction.cpp	(revision b0acc3a7b5b3ca40d4aa3940fd46ba4055624f89)
@@ -36,5 +36,5 @@
 };
 
-const char MoleculeChangeNameAction::NAME[] = "Change filename of Molecule";
+const char MoleculeChangeNameAction::NAME[] = "change-molname";
 
 MoleculeChangeNameAction::MoleculeChangeNameAction() :
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision b800215c062e714dbeab7570ef2a6df003c54c1c)
+++ src/Makefile.am	(revision b0acc3a7b5b3ca40d4aa3940fd46ba4055624f89)
@@ -101,10 +101,4 @@
   Patterns/Observer.hpp \
   Patterns/Singleton.hpp
-
-# all these files are only used for legacy reasons while the transition is in progress
-# they are only needed to keep the program usable at any point of the transition and will be 
-# deleted once everything is fully refactored
-LEGACYSOURCE = Legacy/oldmenu.cpp 
-LEGACYHEADER = Legacy/oldmenu.hpp
 
 QTUIMOC_HEADER = UIElements/QT4/QTDialog.hpp \
@@ -175,5 +169,4 @@
   ${DESCRIPTORSOURCE} \
   ${HELPERSOURCE} \
-  ${LEGACYSOURCE} \
   ${EXCEPTIONSOURCE} \
   bond.cpp \
@@ -223,5 +216,4 @@
   ${DESCRIPTORHEADER} \
   ${EXCEPTIONHEADER} \
-  ${LEGACYHEADER} \
   bond.hpp \
   bondgraph.hpp \
Index: src/UIElements/CommandLineUI/CommandLineWindow.cpp
===================================================================
--- src/UIElements/CommandLineUI/CommandLineWindow.cpp	(revision b800215c062e714dbeab7570ef2a6df003c54c1c)
+++ src/UIElements/CommandLineUI/CommandLineWindow.cpp	(revision b0acc3a7b5b3ca40d4aa3940fd46ba4055624f89)
@@ -13,45 +13,8 @@
 #include "CommandLineUI/CommandLineStatusIndicator.hpp"
 
+#include "Actions/Action.hpp"
+#include "Actions/MapOfActions.hpp"
 #include "Actions/ActionRegistry.hpp"
-#include "Actions/AnalysisAction/MolecularVolumeAction.hpp"
-#include "Actions/AnalysisAction/PairCorrelationAction.hpp"
-#include "Actions/AnalysisAction/PrincipalAxisSystemAction.hpp"
-#include "Actions/AtomAction/AddAction.hpp"
-#include "Actions/AtomAction/ChangeElementAction.hpp"
-#include "Actions/AtomAction/RemoveAction.hpp"
-#include "Actions/CmdAction/BondLengthTableAction.hpp"
-#include "Actions/CmdAction/ElementDbAction.hpp"
-#include "Actions/CmdAction/FastParsingAction.hpp"
-#include "Actions/CmdAction/HelpAction.hpp"
-#include "Actions/CmdAction/VerboseAction.hpp"
-#include "Actions/CmdAction/VersionAction.hpp"
-#include "Actions/FragmentationAction/DepthFirstSearchAction.hpp"
-#include "Actions/FragmentationAction/SubgraphDissectionAction.hpp"
-#include "Actions/FragmentationAction/FragmentationAction.hpp"
-#include "Actions/MoleculeAction/BondFileAction.hpp"
-#include "Actions/MoleculeAction/ChangeNameAction.hpp"
-#include "Actions/MoleculeAction/FillWithMoleculeAction.hpp"
-#include "Actions/MoleculeAction/LinearInterpolationofTrajectoriesAction.hpp"
-#include "Actions/MoleculeAction/SaveAdjacencyAction.hpp"
-#include "Actions/MoleculeAction/SaveBondsAction.hpp"
-#include "Actions/MoleculeAction/SaveTemperatureAction.hpp"
-#include "Actions/MoleculeAction/TranslateAction.hpp"
-#include "Actions/MoleculeAction/VerletIntegrationAction.hpp"
-#include "Actions/ParserAction/LoadXyzAction.hpp"
-#include "Actions/ParserAction/SaveXyzAction.hpp"
-#include "Actions/TesselationAction/ConvexEnvelopeAction.hpp"
-#include "Actions/TesselationAction/NonConvexEnvelopeAction.hpp"
-#include "Actions/WorldAction/AddEmptyBoundaryAction.hpp"
-#include "Actions/WorldAction/BoundInBoxAction.hpp"
-#include "Actions/WorldAction/CenterInBoxAction.hpp"
-#include "Actions/WorldAction/CenterOnEdgeAction.hpp"
-#include "Actions/WorldAction/ChangeBoxAction.hpp"
-#include "Actions/WorldAction/InputAction.hpp"
-#include "Actions/WorldAction/OutputAction.hpp"
-#include "Actions/WorldAction/RemoveSphereOfAtomsAction.hpp"
-#include "Actions/WorldAction/RepeatBoxAction.hpp"
-#include "Actions/WorldAction/ScaleBoxAction.hpp"
-#include "Actions/WorldAction/SetDefaultNameAction.hpp"
-#include "Actions/WorldAction/SetGaussianBasisAction.hpp"
+
 #include "CommandLineParser.hpp"
 
@@ -64,12 +27,5 @@
 {
   // create and register all command line callable actions
-  populateAnalysisActions();
-  populateAtomActions();
-  populateCmdActions();
-  populateFragmentationActions();
-  populateMoleculeActions();
-  populateParserActions();
-  populateTesselationActions();
-  populateWorldActions();
+  MapOfActions::getInstance().populateActions();
 
   // Add status indicators etc...
@@ -97,73 +53,2 @@
 }
 
-void CommandLineWindow::populateAnalysisActions()
-{
-  new AnalysisMolecularVolumeAction();
-  new AnalysisPairCorrelationAction();
-  new AnalysisPrincipalAxisSystemAction();
-}
-
-void CommandLineWindow::populateAtomActions()
-{
-  new AtomAddAction();
-  new AtomChangeElementAction();
-  new AtomRemoveAction();
-}
-
-void CommandLineWindow::populateCmdActions()
-{
-  new CommandLineBondLengthTableAction();
-  new CommandLineElementDbAction();
-  new CommandLineFastParsingAction();
-  new CommandLineHelpAction();
-  new CommandLineVerboseAction();
-  new CommandLineVersionAction();
-}
-
-void CommandLineWindow::populateFragmentationActions()
-{
-  new FragmentationDepthFirstSearchAction();
-  new FragmentationFragmentationAction();
-  new FragmentationSubgraphDissectionAction();
-}
-
-void CommandLineWindow::populateMoleculeActions()
-{
-  new MoleculeBondFileAction();
-  new MoleculeChangeNameAction();
-  new MoleculeFillWithMoleculeAction();
-  new MoleculeLinearInterpolationofTrajectoriesAction();
-  new MoleculeSaveAdjacencyAction();
-  new MoleculeSaveBondsAction();
-  new MoleculeSaveTemperatureAction();
-  new MoleculeTranslateAction();
-  new MoleculeVerletIntegrationAction();
-}
-
-void CommandLineWindow::populateParserActions()
-{
-  new ParserLoadXyzAction();
-  new ParserSaveXyzAction();
-}
-
-void CommandLineWindow::populateTesselationActions()
-{
-  new TesselationConvexEnvelopeAction();
-  new TesselationNonConvexEnvelopeAction();
-}
-
-void CommandLineWindow::populateWorldActions()
-{
-  new WorldAddEmptyBoundaryAction();
-  new WorldBoundInBoxAction();
-  new WorldCenterInBoxAction();
-  new WorldCenterOnEdgeAction();
-  new WorldChangeBoxAction();
-  new WorldInputAction();
-  new WorldOutputAction();
-  new WorldRemoveSphereOfAtomsAction();
-  new WorldRepeatBoxAction();
-  new WorldScaleBoxAction();
-  new WorldSetDefaultNameAction();
-  new WorldSetGaussianBasisAction();
-}
Index: src/UIElements/TextUI/TextWindow.cpp
===================================================================
--- src/UIElements/TextUI/TextWindow.cpp	(revision b800215c062e714dbeab7570ef2a6df003c54c1c)
+++ src/UIElements/TextUI/TextWindow.cpp	(revision b0acc3a7b5b3ca40d4aa3940fd46ba4055624f89)
@@ -12,25 +12,4 @@
 #include <boost/bind.hpp>
 
-
-// TODO: When done with refactoring most of these wont be needed anymore
-#include "analysis_correlation.hpp"
-#include "atom.hpp"
-#include "bond.hpp"
-#include "bondgraph.hpp"
-#include "boundary.hpp"
-#include "config.hpp"
-#include "element.hpp"
-#include "ellipsoid.hpp"
-#include "helpers.hpp"
-#include "leastsquaremin.hpp"
-#include "linkedcell.hpp"
-#include "log.hpp"
-#include "memoryusageobserver.hpp"
-#include "molecule.hpp"
-#include "periodentafel.hpp"
-#include "World.hpp"
-
-#include "Legacy/oldmenu.hpp"
-
 #include "Menu/Menu.hpp"
 #include "Menu/TextMenu.hpp"
@@ -40,6 +19,6 @@
 #include "Menu/SubMenuItem.hpp"
 #include "TextUI/TextStatusIndicator.hpp"
+#include "Actions/MapOfActions.hpp"
 #include "Actions/MethodAction.hpp"
-#include "Actions/MoleculeAction/ChangeNameAction.hpp"
 #include "Actions/ErrorAction.hpp"
 #include "Actions/ActionRegistry.hpp"
@@ -48,5 +27,17 @@
 #include "Helpers/MemDebug.hpp"
 
+#include "defs.hpp"
+#include "log.hpp"
+#include "verbose.hpp"
+
+// all needed due to config::SaveAll()
+#include "config.hpp"
+#include "periodentafel.hpp"
+
+// config::SaveAll() and enumerate()
+#include "molecule.hpp"
+
 #include <iostream>
+#include <map>
 
 using namespace std;
@@ -55,14 +46,14 @@
 TextWindow::TextWindow()
 {
-  MoleculeListClass *molecules = World::getInstance().getMolecules();
-  config *configuration = World::getInstance().getConfig();
-  periodentafel *periode = World::getInstance().getPeriode();
-  char *ConfigFileName = NULL;
-  old_menu = new oldmenu;
+  char ConfigFileName[MAXSTRINGSIZE];
+  map <std::string, TextMenu *> NametoTextMenuMap;
+
+  // populate all actions
+  MapOfActions::getInstance().populateActions();
 
   // build the main menu
   main_menu = new TextMenu(Log() << Verbose(0), "Main Menu");
 
-  moleculeView = new StreamStringView(boost::bind(&MoleculeListClass::Enumerate,molecules,_1));
+  moleculeView = new StreamStringView(boost::bind(&MoleculeListClass::Enumerate,World::getInstance().getMolecules(),_1));
   new DisplayMenuItem(main_menu,moleculeView,"Molecule List");
 
@@ -77,43 +68,52 @@
   new SeperatorItem(main_menu);
 
-  Action *setMoleculeAction = new MethodAction("setMoleculeAction",boost::bind(&MoleculeListClass::flipChosen,molecules));
+  Action *setMoleculeAction = new MethodAction("setMoleculeAction",boost::bind(&MoleculeListClass::flipChosen,World::getInstance().getMolecules()));
   new ActionMenuItem('a',"set molecule (in)active",main_menu,setMoleculeAction);
 
-  TextMenu *editMoleculesMenu = new TextMenu(Log() << Verbose(0), "Edit Molecules");
-  new SubMenuItem('e',"edit molecules (load, parse, save)",main_menu,editMoleculesMenu);
+  TextMenu *AnalysisMenu = new TextMenu(Log() << Verbose(0), "Analysis");
+  NametoTextMenuMap.insert( pair <std::string, TextMenu *> ("analysis", AnalysisMenu) );
+  new SubMenuItem('A',"Analysis (pair correlation, volume)",main_menu,AnalysisMenu);
 
-  Action *manipulateMoleculeAction = new MethodAction("manipulateMoleculeAction",boost::bind(&oldmenu::ManipulateMolecules,old_menu,periode, molecules, configuration));
-  new ActionMenuItem('g',"globally manipulate atoms in molecule",main_menu,manipulateMoleculeAction);
+  TextMenu *CommandMenu = new TextMenu(Log() << Verbose(0), "Configuration");
+  NametoTextMenuMap.insert( pair <std::string, TextMenu *> ("command", CommandMenu) );
+  new SubMenuItem('c',"configuration",main_menu,CommandMenu);
 
-  Action *mergeMoleculeAction = new MethodAction("mergeMoleculeAction",boost::bind(&oldmenu::MergeMolecules,old_menu,periode, molecules));
-  new ActionMenuItem('M',"Merge molecules",main_menu,mergeMoleculeAction);
+  TextMenu *AtomMenu = new TextMenu(Log() << Verbose(0), "Atoms");
+  NametoTextMenuMap.insert( pair <std::string, TextMenu *> ("atom", AtomMenu) );
+  new SubMenuItem('e',"edit atoms",main_menu,AtomMenu);
 
-  Action *manipulateAtomsAction = new MethodAction("manipulateAtomsAction",boost::bind(&oldmenu::ManipulateAtoms,old_menu,periode, molecules, configuration));
-  new ActionMenuItem('m',"manipulate atoms",main_menu,manipulateAtomsAction);
+  TextMenu *FragmentationMenu = new TextMenu(Log() << Verbose(0), "Fragmentation");
+  NametoTextMenuMap.insert( pair <std::string, TextMenu *> ("fragmentation", FragmentationMenu) );
+  new SubMenuItem('f',"fragmentation",main_menu,FragmentationMenu);
+
+  TextMenu *ParserMenu = new TextMenu(Log() << Verbose(0), "Parse files");
+  NametoTextMenuMap.insert( pair <std::string, TextMenu *> ("parser", ParserMenu) );
+  new SubMenuItem('p',"parse files into system",main_menu,ParserMenu);
+
+  TextMenu *MoleculesMenu = new TextMenu(Log() << Verbose(0), "Edit Molecules");
+  NametoTextMenuMap.insert( pair <std::string, TextMenu *> ("analysis", AnalysisMenu) );
+  new SubMenuItem('m',"edit molecules (load, parse, save)",main_menu,MoleculesMenu);
+
+  TextMenu *TesselationMenu = new TextMenu(Log() << Verbose(0), "Tesselate Molecules");
+  NametoTextMenuMap.insert( pair <std::string, TextMenu *> ("tesselation", TesselationMenu) );
+  new SubMenuItem('t',"tesselate molecules",main_menu,TesselationMenu);
+
+  TextMenu *WorldMenu = new TextMenu(Log() << Verbose(0), "World");
+  NametoTextMenuMap.insert( pair <std::string, TextMenu *> ("world", WorldMenu) );
+  new SubMenuItem('w',"edit world",main_menu,WorldMenu);
 
   new SeperatorItem(main_menu);
 
-  Action *editConfigAction = new MethodAction("editConfigAction",boost::bind(&config::Edit,configuration));
-  new ActionMenuItem('c',"edit the current configuration",main_menu,editConfigAction);
-
-  new SeperatorItem(main_menu);
-
-  Action *saveConfigAction = new MethodAction("saveConfigAction",boost::bind(&config::SaveAll,configuration, ConfigFileName, periode, molecules));
+  Action *saveConfigAction = new MethodAction("saveConfigAction",boost::bind(&config::SaveAll,World::getInstance().getConfig(), ConfigFileName, World::getInstance().getPeriode(), World::getInstance().getMolecules()));
   new ActionMenuItem('s',"save current setup to config file",main_menu,saveConfigAction);
-
-  Action *doTestAction = new MethodAction("doTestAction",boost::bind(&oldmenu::testroutine,old_menu,molecules));
-  new ActionMenuItem('T',"call the current test routine",main_menu,doTestAction);
 
   quitAction = new MethodAction("quitAction",boost::bind(&TextMenu::doQuit,main_menu),false);
   new ActionMenuItem('q',"quit",main_menu,quitAction);
 
-  // call all functions used to build the submenus
-
-  populateEditMoleculesMenu(editMoleculesMenu);
-
-  Action *returnFromEditMoleculeAction = new TextMenu::LeaveAction(editMoleculesMenu);
-  MenuItem *returnItem = new ActionMenuItem('q',"return to Main menu",editMoleculesMenu,returnFromEditMoleculeAction);
-
-  editMoleculesMenu->addDefault(returnItem);
+  // go through all menus and create them
+  for (map <std::string, TextMenu *>::iterator MenuRunner = NametoTextMenuMap.begin(); MenuRunner != NametoTextMenuMap.end(); ++MenuRunner) {
+    cout << "Creating Menu " << MenuRunner->first << "." << endl;
+    populateMenu(MenuRunner->second, MenuRunner->first);
+  }
 
   // Add status indicators etc...
@@ -124,5 +124,4 @@
 TextWindow::~TextWindow()
 {
-  delete old_menu;
   delete quitAction;
   delete moleculeView;
@@ -135,27 +134,28 @@
 }
 
-void TextWindow::populateEditMoleculesMenu(Menu* editMoleculesMenu)
+char TextWindow::getSuitableShortForm(set <char> &ShortcutList, const std::string name) const
 {
-  MoleculeListClass *molecules = World::getInstance().getMolecules();
-  periodentafel *periode = World::getInstance().getPeriode();
+  for (std::string::const_iterator CharRunner = name.begin(); CharRunner != name.end(); ++CharRunner) {
+    if (ShortcutList.find(*CharRunner) == ShortcutList.end())
+      return *CharRunner;
+  }
+  DoeLog(1) && (eLog() << Verbose(1) << "Could not find a suitable shortform for TextWindow::getSuitableShortForm()." << endl);
+  return ((char)(ShortcutList.size() % 10) + '0');
+}
 
-  // build the EditMoleculesMenu
-  Action *createMoleculeAction = new MethodAction("createMoleculeAction",boost::bind(&MoleculeListClass::createNewMolecule,molecules,periode));
-  new ActionMenuItem('c',"create new molecule",editMoleculesMenu,createMoleculeAction);
-
-  Action *loadMoleculeAction = new MethodAction("loadMoleculeAction",boost::bind(&MoleculeListClass::loadFromXYZ,molecules,periode));
-  new ActionMenuItem('l',"load molecule from xyz file",editMoleculesMenu,loadMoleculeAction);
-
-  Action *changeFilenameAction = new MoleculeChangeNameAction();
-  new ActionMenuItem('n',"change molecule's name",editMoleculesMenu,changeFilenameAction);
-
-  Action *giveFilenameAction = new MethodAction("giveFilenameAction",boost::bind(&MoleculeListClass::setMoleculeFilename,molecules));
-  new ActionMenuItem('N',"give molecules filename",editMoleculesMenu,giveFilenameAction);
-
-  Action *parseAtomsAction = new MethodAction("parseAtomsAction",boost::bind(&MoleculeListClass::parseXYZIntoMolecule,molecules));
-  new ActionMenuItem('p',"parse atoms in xyz file into molecule",editMoleculesMenu,parseAtomsAction);
-
-  Action *eraseMoleculeAction = new MethodAction("eraseMoleculeAction",boost::bind(&MoleculeListClass::eraseMolecule,molecules));
-  new ActionMenuItem('r',"remove a molecule",editMoleculesMenu,eraseMoleculeAction);
-
+void TextWindow::populateMenu(TextMenu* Menu, const  std::string &MenuName)
+{
+  Action *ActionItem = NULL;
+  set <char> ShortcutList;
+  // through all actions for this menu
+  pair < multimap <std::string, std::string>::iterator, multimap <std::string, std::string>::iterator > MenuActions = MapOfActions::getInstance().MenuContainsActionMap.equal_range(MenuName);
+  for (multimap <std::string, std::string>::const_iterator MenuRunner = MenuActions.first; MenuRunner != MenuActions.second; ++MenuRunner) {
+    cout << " Adding " << MenuRunner->second << " to submenu " << MenuName << endl;
+    ActionItem = ActionRegistry::getInstance().getActionByName(MenuRunner->second);
+    new ActionMenuItem(getSuitableShortForm(ShortcutList, MenuRunner->second),MapOfActions::getInstance().getDescription(MenuRunner->second).c_str(),Menu,ActionItem);
+  }
+  // finally add default quit item
+  Action *returnFromAction = new TextMenu::LeaveAction(Menu);
+  MenuItem *returnFromItem = new ActionMenuItem('q',"return to Main menu",Menu,returnFromAction);
+  Menu->addDefault(returnFromItem);
 }
Index: src/UIElements/TextUI/TextWindow.hpp
===================================================================
--- src/UIElements/TextUI/TextWindow.hpp	(revision b800215c062e714dbeab7570ef2a6df003c54c1c)
+++ src/UIElements/TextUI/TextWindow.hpp	(revision b0acc3a7b5b3ca40d4aa3940fd46ba4055624f89)
@@ -11,7 +11,8 @@
 #include "MainWindow.hpp"
 
+#include <set>
+
 class TextMenu;
 class Action;
-class oldmenu;
 class StringView;
 class TextStatusIndicator;
@@ -27,5 +28,6 @@
 private:
   // populaters
-  void populateEditMoleculesMenu(Menu* editMoleculesMenu);
+  char getSuitableShortForm(std::set <char> &ShortcutList, const std::string name) const;
+  void populateMenu(TextMenu* Menu, const std::string &name);
 
   TextMenu *main_menu;
@@ -36,7 +38,4 @@
   StringView *moleculeView;
   TextStatusIndicator *statusIndicator;
-
-  // This class still contains a lot of scattered functionality
-  oldmenu *old_menu;
 };
 
Index: src/builder.cpp
===================================================================
--- src/builder.cpp	(revision b800215c062e714dbeab7570ef2a6df003c54c1c)
+++ src/builder.cpp	(revision b0acc3a7b5b3ca40d4aa3940fd46ba4055624f89)
@@ -126,11 +126,4 @@
   // print version check whether arguments are present at all
   cout << ESPACKVersion << endl;
-  if (argc < 2) {
-    cout << "Obtain help with " << argv[0] << " -h." << endl;
-    cleanUp();
-    Memory::getState();
-    return(1);
-  }
-
 
   setVerbosity(0);
@@ -157,8 +150,8 @@
     }
     // handle remaining arguments by CommandLineParser
-    MapOfActions::getInstance().AddOptionsToParser();
-    map <std::string, std::string> ShortFormToActionMap = MapOfActions::getInstance().getShortFormToActionMap();
-    CommandLineParser::getInstance().Run(argc,argv, ShortFormToActionMap);
-    if (!CommandLineParser::getInstance().isEmpty()) {
+    if (argc>1) {
+      MapOfActions::getInstance().AddOptionsToParser();
+      map <std::string, std::string> ShortFormToActionMap = MapOfActions::getInstance().getShortFormToActionMap();
+      CommandLineParser::getInstance().Run(argc,argv, ShortFormToActionMap);
       DoLog(0) && (Log() << Verbose(0) << "Setting UI to CommandLine." << endl);
       UIFactory::registerFactory(new CommandLineUIFactory::description());
