Index: src/UIElements/CommandLineDialog.cpp
===================================================================
--- src/UIElements/CommandLineDialog.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ 	(revision )
@@ -1,259 +1,0 @@
-/*
- * CommandLineDialog.cpp
- *
- *  Created on: May 8, 2010
- *      Author: heber
- */
-
-
-#include <cassert>
-#include <iostream>
-
-#include <Descriptors/AtomDescriptor.hpp>
-#include <Descriptors/AtomIdDescriptor.hpp>
-#include <Descriptors/MoleculeDescriptor.hpp>
-#include <Descriptors/MoleculeIdDescriptor.hpp>
-#include "UIElements/CommandLineDialog.hpp"
-
-#include "element.hpp"
-#include "periodentafel.hpp"
-#include "CommandLineParser.hpp"
-#include "defs.hpp"
-#include "log.hpp"
-#include "periodentafel.hpp"
-#include "verbose.hpp"
-#include "World.hpp"
-
-#include "atom.hpp"
-#include "element.hpp"
-#include "molecule.hpp"
-#include "vector.hpp"
-
-using namespace std;
-
-
-CommandLineDialog::CommandLineDialog()
-{
-}
-
-CommandLineDialog::~CommandLineDialog()
-{
-}
-
-
-void CommandLineDialog::queryEmpty(const char* title, string _description){
-  registerQuery(new EmptyCommandLineQuery(title, _description));
-}
-
-void CommandLineDialog::queryInt(const char* title, int* target, string _description){
-  registerQuery(new IntCommandLineQuery(title,target, _description));
-}
-
-void CommandLineDialog::queryBoolean(const char* title, bool* target, string _description){
-  registerQuery(new BooleanCommandLineQuery(title,target, _description));
-}
-
-void CommandLineDialog::queryDouble(const char* title, double* target, string _description){
-  registerQuery(new DoubleCommandLineQuery(title,target, _description));
-}
-
-void CommandLineDialog::queryString(const char* title, string* target, string _description){
-  registerQuery(new StringCommandLineQuery(title,target, _description));
-}
-
-void CommandLineDialog::queryAtom(const char* title, atom **target, string _description) {
-  registerQuery(new AtomCommandLineQuery(title,target, _description));
-}
-
-void CommandLineDialog::queryMolecule(const char* title, molecule **target, string _description) {
-  registerQuery(new MoleculeCommandLineQuery(title,target, _description));
-}
-
-void CommandLineDialog::queryVector(const char* title, Vector *target,const double *const cellSize, bool check, string _description) {
-  registerQuery(new VectorCommandLineQuery(title,target,cellSize,check, _description));
-}
-
-void CommandLineDialog::queryBox(const char* title, double ** const cellSize, string _description) {
-  registerQuery(new BoxCommandLineQuery(title,cellSize,_description));
-}
-
-void CommandLineDialog::queryElement(const char* title, const element **target, string _description){
-  registerQuery(new ElementCommandLineQuery(title,target, _description));
-}
-
-/************************** Query Infrastructure ************************/
-
-CommandLineDialog::EmptyCommandLineQuery::EmptyCommandLineQuery(string title, string _description) :
-    Dialog::EmptyQuery(title, _description)
-{}
-
-CommandLineDialog::EmptyCommandLineQuery::~EmptyCommandLineQuery() {}
-
-bool CommandLineDialog::EmptyCommandLineQuery::handle() {
-  cout << "Message of " << getTitle() << ":\n" << getDescription() << "\n";
-  return true;
-}
-
-CommandLineDialog::IntCommandLineQuery::IntCommandLineQuery(string title,int *_target, string _description) :
-    Dialog::IntQuery(title,_target, _description)
-{}
-
-CommandLineDialog::IntCommandLineQuery::~IntCommandLineQuery() {}
-
-bool CommandLineDialog::IntCommandLineQuery::handle() {
-  if (CommandLineParser::getInstance().vm.count(getTitle())) {
-    tmp = CommandLineParser::getInstance().vm[getTitle()].as<int>();
-    return true;
-  } else
-    return false;
-}
-
-CommandLineDialog::BooleanCommandLineQuery::BooleanCommandLineQuery(string title,bool *_target, string _description) :
-    Dialog::BooleanQuery(title,_target, _description)
-{}
-
-CommandLineDialog::BooleanCommandLineQuery::~BooleanCommandLineQuery() {}
-
-bool CommandLineDialog::BooleanCommandLineQuery::handle() {
-  bool badInput = false;
-  char input = ' ';
-  do{
-    badInput = false;
-    Log() << Verbose(0) << getTitle();
-    cin >> input;
-    if ((input == 'y' ) || (input == 'Y')) {
-      tmp = true;
-    } else if ((input == 'n' ) || (input == 'N')) {
-      tmp = false;
-    } else {
-      badInput=true;
-      cin.clear();
-      cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
-      Log() << Verbose(0) << "Input was not of [yYnN]!" << endl;
-    }
-  } while(badInput);
-  // clear the input buffer of anything still in the line
-  cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
-  return true;
-}
-
-CommandLineDialog::StringCommandLineQuery::StringCommandLineQuery(string title,string *_target, string _description) :
-    Dialog::StringQuery(title,_target, _description)
-{}
-
-CommandLineDialog::StringCommandLineQuery::~StringCommandLineQuery() {}
-
-bool CommandLineDialog::StringCommandLineQuery::handle() {
-  if (CommandLineParser::getInstance().vm.count(getTitle())) {
-    tmp = CommandLineParser::getInstance().vm[getTitle()].as<string>();
-    return true;
-  } else
-    return false;
-}
-
-CommandLineDialog::DoubleCommandLineQuery::DoubleCommandLineQuery(string title,double *_target, string _description) :
-    Dialog::DoubleQuery(title,_target, _description)
-{}
-
-CommandLineDialog::DoubleCommandLineQuery::~DoubleCommandLineQuery() {}
-
-bool CommandLineDialog::DoubleCommandLineQuery::handle() {
-  if (CommandLineParser::getInstance().vm.count(getTitle())) {
-    tmp = CommandLineParser::getInstance().vm[getTitle()].as<double>();
-    return true;
-  } else
-    return false;
-}
-
-CommandLineDialog::AtomCommandLineQuery::AtomCommandLineQuery(string title, atom **_target, string _description) :
-    Dialog::AtomQuery(title,_target, _description)
-{}
-
-CommandLineDialog::AtomCommandLineQuery::~AtomCommandLineQuery() {}
-
-bool CommandLineDialog::AtomCommandLineQuery::handle() {
-  int IdxOfAtom = -1;
-  if (CommandLineParser::getInstance().vm.count(getTitle())) {
-    IdxOfAtom = CommandLineParser::getInstance().vm[getTitle()].as<int>();
-    tmp = World::getInstance().getAtom(AtomById(IdxOfAtom));
-    return true;
-  } else
-    return false;
-}
-
-CommandLineDialog::MoleculeCommandLineQuery::MoleculeCommandLineQuery(string title, molecule **_target, string _description) :
-    Dialog::MoleculeQuery(title,_target, _description)
-{}
-
-CommandLineDialog::MoleculeCommandLineQuery::~MoleculeCommandLineQuery() {}
-
-bool CommandLineDialog::MoleculeCommandLineQuery::handle() {
-  int IdxOfMol = -1;
-  if (CommandLineParser::getInstance().vm.count(getTitle())) {
-    IdxOfMol = CommandLineParser::getInstance().vm[getTitle()].as<int>();
-    tmp = World::getInstance().getMolecule(MoleculeById(IdxOfMol));
-    return true;
-  } else
-    return false;
-}
-
-CommandLineDialog::VectorCommandLineQuery::VectorCommandLineQuery(string title, Vector *_target, const double *const _cellSize, bool _check, string _description) :
-    Dialog::VectorQuery(title,_target,_cellSize,_check, _description)
-{}
-
-CommandLineDialog::VectorCommandLineQuery::~VectorCommandLineQuery()
-{}
-
-bool CommandLineDialog::VectorCommandLineQuery::handle() {
-  vector<double> temp;
-  if (CommandLineParser::getInstance().vm.count(getTitle())) {
-    temp = CommandLineParser::getInstance().vm[getTitle()].as<vector<double> >();
-    assert((temp.size() == 3) && "Vector from command line does not have three components.");
-    for (int i=0;i<NDIM;i++)
-      tmp->at(i) = temp[i];
-    return true;
-  } else
-    return false;
-}
-
-
-CommandLineDialog::BoxCommandLineQuery::BoxCommandLineQuery(string title, double ** const _cellSize, string _description) :
-    Dialog::BoxQuery(title,_cellSize, _description)
-{}
-
-CommandLineDialog::BoxCommandLineQuery::~BoxCommandLineQuery()
-{}
-
-bool CommandLineDialog::BoxCommandLineQuery::handle() {
-  vector<double> temp;
-  if (CommandLineParser::getInstance().vm.count(getTitle())) {
-    temp = CommandLineParser::getInstance().vm[getTitle()].as<vector<double> >();
-    assert((temp.size() == 6) && "Symmetric box matrix from command line does not have six components.");
-    for (int i=0;i<6;i++)
-      tmp[i] = temp[i];
-    return true;
-  } else
-    return false;
-}
-
-CommandLineDialog::ElementCommandLineQuery::ElementCommandLineQuery(string title, const element **target, string _description) :
-    Dialog::ElementQuery(title,target, _description)
-{}
-
-CommandLineDialog::ElementCommandLineQuery::~ElementCommandLineQuery()
-{}
-
-bool CommandLineDialog::ElementCommandLineQuery::handle() {
-  // TODO: vector of ints and removing first is not correctly implemented yet. How to remove from a vector?
-  int Z;
-  if (CommandLineParser::getInstance().vm.count(getTitle())) {
-    vector<int> AllElements = CommandLineParser::getInstance().vm[getTitle()].as< vector<int> >();
-    vector<int>::iterator ElementRunner = AllElements.begin();
-    Z = *ElementRunner;
-    // TODO: So far, this does not really erase the element in the parsed list.
-    AllElements.erase(ElementRunner);
-    tmp = World::getInstance().getPeriode()->FindElement(Z);
-    return true;
-  } else
-    return false;
-}
Index: src/UIElements/CommandLineDialog.hpp
===================================================================
--- src/UIElements/CommandLineDialog.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ 	(revision )
@@ -1,113 +1,0 @@
-/*
- * CommandLineDialog.hpp
- *
- *  Created on: May 8, 2010
- *      Author: heber
- */
-
-#ifndef COMMANDLINEDIALOG_HPP_
-#define COMMANDLINEDIALOG_HPP_
-
-#include <string>
-
-class atom;
-class element;
-class molecule;
-class Vector;
-
-#include "UIElements/Dialog.hpp"
-
-/** CommandLineUIFactory implementation of the Dialog.
- * The idea here is that for each query the parsed command line options are used instead.
- */
-class CommandLineDialog : public Dialog
-{
-public:
-  CommandLineDialog();
-  virtual ~CommandLineDialog();
-
-  virtual void queryEmpty(const char *, std::string = "");
-  virtual void queryInt(const char *, int *, std::string = "");
-  virtual void queryBoolean(const char *, bool *, std::string = "");
-  virtual void queryString(const char*, std::string *, std::string = "");
-  virtual void queryDouble(const char*, double*, std::string = "");
-  virtual void queryAtom(const char*,atom**, std::string = "");
-  virtual void queryMolecule(const char*,molecule**,std::string = "");
-  virtual void queryVector(const char*,Vector *,const double * const,bool, std::string = "");
-  virtual void queryBox(const char*,double ** const, std::string = "");
-  virtual void queryElement(const char*,const element **, std::string = "");
-
-protected:
-  // specialized stuff for text queries
-  class EmptyCommandLineQuery : public Dialog::EmptyQuery {
-  public:
-    EmptyCommandLineQuery(std::string title, std::string _description = "");
-    virtual ~EmptyCommandLineQuery();
-    virtual bool handle();
-  };
-
-  class IntCommandLineQuery : public Dialog::IntQuery {
-  public:
-    IntCommandLineQuery(std::string title, int *_target, std::string _description = "");
-    virtual ~IntCommandLineQuery();
-    virtual bool handle();
-  };
-
-  class BooleanCommandLineQuery : public Dialog::BooleanQuery {
-  public:
-    BooleanCommandLineQuery(std::string title, bool *_target, std::string _description = "");
-    virtual ~BooleanCommandLineQuery();
-    virtual bool handle();
-  };
-
-  class DoubleCommandLineQuery : public Dialog::DoubleQuery {
-  public:
-    DoubleCommandLineQuery(std::string title, double *_target, std::string _description = "");
-    virtual ~DoubleCommandLineQuery();
-    virtual bool handle();
-  };
-
-  class StringCommandLineQuery : public Dialog::StringQuery {
-  public:
-    StringCommandLineQuery(std::string title, std::string *_target, std::string _description = "");
-    virtual ~StringCommandLineQuery();
-    virtual bool handle();
-  };
-
-  class AtomCommandLineQuery : public Dialog::AtomQuery {
-  public:
-    AtomCommandLineQuery(std::string title, atom **_target, std::string _description = "");
-    virtual ~AtomCommandLineQuery();
-    virtual bool handle();
-  };
-
-  class MoleculeCommandLineQuery : public Dialog::MoleculeQuery {
-  public:
-    MoleculeCommandLineQuery(std::string title, molecule **_target, std::string _description = "");
-    virtual ~MoleculeCommandLineQuery();
-    virtual bool handle();
-  };
-
-  class VectorCommandLineQuery : public Dialog::VectorQuery {
-  public:
-    VectorCommandLineQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check, std::string _description = "");
-    virtual ~VectorCommandLineQuery();
-    virtual bool handle();
-  };
-
-  class BoxCommandLineQuery : public Dialog::BoxQuery {
-  public:
-    BoxCommandLineQuery(std::string title,double ** const _cellSize, std::string _description = "");
-    virtual ~BoxCommandLineQuery();
-    virtual bool handle();
-  };
-
-  class ElementCommandLineQuery : public Dialog::ElementQuery {
-  public:
-    ElementCommandLineQuery(std::string title, const element **_target, std::string _description = "");
-    virtual ~ElementCommandLineQuery();
-    virtual bool handle();
-  };
-};
-
-#endif /* COMMANDLINEDIALOG_HPP_ */
Index: src/UIElements/CommandLineStatusIndicator.cpp
===================================================================
--- src/UIElements/CommandLineStatusIndicator.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ 	(revision )
@@ -1,57 +1,0 @@
-/*
- * CommandLineStatusIndicator.cpp
- *
- *  Created on: May 8, 2010
- *      Author: heber
- */
-
-
-#include "CommandLineStatusIndicator.hpp"
-
-#include <iostream>
-
-#include "Actions/Process.hpp"
-
-using namespace std;
-
-CommandLineStatusIndicator::CommandLineStatusIndicator()
-{
-  Process::AddObserver(this);
-}
-
-CommandLineStatusIndicator::~CommandLineStatusIndicator()
-{
-  Process::RemoveObserver(this);
-}
-
-void CommandLineStatusIndicator::update(Observable *subject){
-  Process *proc;
-  // we are only observing Processes
-  if((proc=dynamic_cast<Process*>(subject))){
-    // see what kind of progress we have to display
-    if(proc->getMaxSteps()>0){
-      if(!proc->doesStop()){
-        cout << "Busy (" << proc->getName() << ") ";
-        // we can show a percentage done
-        cout << (int)proc->getDoneRatio() << "% done" << endl;
-      }
-    }
-    else{
-      // we only show some kind of busy animation
-      if(proc->doesStart()){
-        cout << "Busy (" << proc->getName() << ")";
-      }
-      if(!proc->doesStop()){
-        cout << ".";
-      }
-      else {
-        cout << endl;
-      }
-    }
-  }
-}
-
-void CommandLineStatusIndicator::subjectKilled(Observable *subject){
-
-}
-
Index: src/UIElements/CommandLineStatusIndicator.hpp
===================================================================
--- src/UIElements/CommandLineStatusIndicator.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ 	(revision )
@@ -1,26 +1,0 @@
-/*
- * CommandLineStatusIndicator.hpp
- *
- *  Created on: May 8, 2010
- *      Author: heber
- */
-
-#ifndef COMMANDLINESTATUSINDICATOR_HPP_
-#define COMMANDLINESTATUSINDICATOR_HPP_
-
-#include "Patterns/Observer.hpp"
-
-class CommandLineStatusIndicator : public Observer
-{
-public:
-  CommandLineStatusIndicator();
-  virtual ~CommandLineStatusIndicator();
-
-  void update(Observable *subject);
-  void subjectKilled(Observable *subject);
-
-private:
-
-};
-
-#endif /* COMMANDLINESTATUSINDICATOR_HPP_ */
Index: src/UIElements/CommandLineUI/CommandLineDialog.cpp
===================================================================
--- src/UIElements/CommandLineUI/CommandLineDialog.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/CommandLineUI/CommandLineDialog.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,259 @@
+/*
+ * CommandLineDialog.cpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+
+#include <cassert>
+#include <iostream>
+
+#include <Descriptors/AtomDescriptor.hpp>
+#include <Descriptors/AtomIdDescriptor.hpp>
+#include <Descriptors/MoleculeDescriptor.hpp>
+#include <Descriptors/MoleculeIdDescriptor.hpp>
+#include "CommandLineUI/CommandLineDialog.hpp"
+
+#include "element.hpp"
+#include "periodentafel.hpp"
+#include "CommandLineParser.hpp"
+#include "defs.hpp"
+#include "log.hpp"
+#include "periodentafel.hpp"
+#include "verbose.hpp"
+#include "World.hpp"
+
+#include "atom.hpp"
+#include "element.hpp"
+#include "molecule.hpp"
+#include "vector.hpp"
+
+using namespace std;
+
+
+CommandLineDialog::CommandLineDialog()
+{
+}
+
+CommandLineDialog::~CommandLineDialog()
+{
+}
+
+
+void CommandLineDialog::queryEmpty(const char* title, string _description){
+  registerQuery(new EmptyCommandLineQuery(title, _description));
+}
+
+void CommandLineDialog::queryInt(const char* title, int* target, string _description){
+  registerQuery(new IntCommandLineQuery(title,target, _description));
+}
+
+void CommandLineDialog::queryBoolean(const char* title, bool* target, string _description){
+  registerQuery(new BooleanCommandLineQuery(title,target, _description));
+}
+
+void CommandLineDialog::queryDouble(const char* title, double* target, string _description){
+  registerQuery(new DoubleCommandLineQuery(title,target, _description));
+}
+
+void CommandLineDialog::queryString(const char* title, string* target, string _description){
+  registerQuery(new StringCommandLineQuery(title,target, _description));
+}
+
+void CommandLineDialog::queryAtom(const char* title, atom **target, string _description) {
+  registerQuery(new AtomCommandLineQuery(title,target, _description));
+}
+
+void CommandLineDialog::queryMolecule(const char* title, molecule **target, string _description) {
+  registerQuery(new MoleculeCommandLineQuery(title,target, _description));
+}
+
+void CommandLineDialog::queryVector(const char* title, Vector *target,const double *const cellSize, bool check, string _description) {
+  registerQuery(new VectorCommandLineQuery(title,target,cellSize,check, _description));
+}
+
+void CommandLineDialog::queryBox(const char* title, double ** const cellSize, string _description) {
+  registerQuery(new BoxCommandLineQuery(title,cellSize,_description));
+}
+
+void CommandLineDialog::queryElement(const char* title, const element **target, string _description){
+  registerQuery(new ElementCommandLineQuery(title,target, _description));
+}
+
+/************************** Query Infrastructure ************************/
+
+CommandLineDialog::EmptyCommandLineQuery::EmptyCommandLineQuery(string title, string _description) :
+    Dialog::EmptyQuery(title, _description)
+{}
+
+CommandLineDialog::EmptyCommandLineQuery::~EmptyCommandLineQuery() {}
+
+bool CommandLineDialog::EmptyCommandLineQuery::handle() {
+  cout << "Message of " << getTitle() << ":\n" << getDescription() << "\n";
+  return true;
+}
+
+CommandLineDialog::IntCommandLineQuery::IntCommandLineQuery(string title,int *_target, string _description) :
+    Dialog::IntQuery(title,_target, _description)
+{}
+
+CommandLineDialog::IntCommandLineQuery::~IntCommandLineQuery() {}
+
+bool CommandLineDialog::IntCommandLineQuery::handle() {
+  if (CommandLineParser::getInstance().vm.count(getTitle())) {
+    tmp = CommandLineParser::getInstance().vm[getTitle()].as<int>();
+    return true;
+  } else
+    return false;
+}
+
+CommandLineDialog::BooleanCommandLineQuery::BooleanCommandLineQuery(string title,bool *_target, string _description) :
+    Dialog::BooleanQuery(title,_target, _description)
+{}
+
+CommandLineDialog::BooleanCommandLineQuery::~BooleanCommandLineQuery() {}
+
+bool CommandLineDialog::BooleanCommandLineQuery::handle() {
+  bool badInput = false;
+  char input = ' ';
+  do{
+    badInput = false;
+    Log() << Verbose(0) << getTitle();
+    cin >> input;
+    if ((input == 'y' ) || (input == 'Y')) {
+      tmp = true;
+    } else if ((input == 'n' ) || (input == 'N')) {
+      tmp = false;
+    } else {
+      badInput=true;
+      cin.clear();
+      cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
+      Log() << Verbose(0) << "Input was not of [yYnN]!" << endl;
+    }
+  } while(badInput);
+  // clear the input buffer of anything still in the line
+  cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
+  return true;
+}
+
+CommandLineDialog::StringCommandLineQuery::StringCommandLineQuery(string title,string *_target, string _description) :
+    Dialog::StringQuery(title,_target, _description)
+{}
+
+CommandLineDialog::StringCommandLineQuery::~StringCommandLineQuery() {}
+
+bool CommandLineDialog::StringCommandLineQuery::handle() {
+  if (CommandLineParser::getInstance().vm.count(getTitle())) {
+    tmp = CommandLineParser::getInstance().vm[getTitle()].as<string>();
+    return true;
+  } else
+    return false;
+}
+
+CommandLineDialog::DoubleCommandLineQuery::DoubleCommandLineQuery(string title,double *_target, string _description) :
+    Dialog::DoubleQuery(title,_target, _description)
+{}
+
+CommandLineDialog::DoubleCommandLineQuery::~DoubleCommandLineQuery() {}
+
+bool CommandLineDialog::DoubleCommandLineQuery::handle() {
+  if (CommandLineParser::getInstance().vm.count(getTitle())) {
+    tmp = CommandLineParser::getInstance().vm[getTitle()].as<double>();
+    return true;
+  } else
+    return false;
+}
+
+CommandLineDialog::AtomCommandLineQuery::AtomCommandLineQuery(string title, atom **_target, string _description) :
+    Dialog::AtomQuery(title,_target, _description)
+{}
+
+CommandLineDialog::AtomCommandLineQuery::~AtomCommandLineQuery() {}
+
+bool CommandLineDialog::AtomCommandLineQuery::handle() {
+  int IdxOfAtom = -1;
+  if (CommandLineParser::getInstance().vm.count(getTitle())) {
+    IdxOfAtom = CommandLineParser::getInstance().vm[getTitle()].as<int>();
+    tmp = World::getInstance().getAtom(AtomById(IdxOfAtom));
+    return true;
+  } else
+    return false;
+}
+
+CommandLineDialog::MoleculeCommandLineQuery::MoleculeCommandLineQuery(string title, molecule **_target, string _description) :
+    Dialog::MoleculeQuery(title,_target, _description)
+{}
+
+CommandLineDialog::MoleculeCommandLineQuery::~MoleculeCommandLineQuery() {}
+
+bool CommandLineDialog::MoleculeCommandLineQuery::handle() {
+  int IdxOfMol = -1;
+  if (CommandLineParser::getInstance().vm.count(getTitle())) {
+    IdxOfMol = CommandLineParser::getInstance().vm[getTitle()].as<int>();
+    tmp = World::getInstance().getMolecule(MoleculeById(IdxOfMol));
+    return true;
+  } else
+    return false;
+}
+
+CommandLineDialog::VectorCommandLineQuery::VectorCommandLineQuery(string title, Vector *_target, const double *const _cellSize, bool _check, string _description) :
+    Dialog::VectorQuery(title,_target,_cellSize,_check, _description)
+{}
+
+CommandLineDialog::VectorCommandLineQuery::~VectorCommandLineQuery()
+{}
+
+bool CommandLineDialog::VectorCommandLineQuery::handle() {
+  vector<double> temp;
+  if (CommandLineParser::getInstance().vm.count(getTitle())) {
+    temp = CommandLineParser::getInstance().vm[getTitle()].as<vector<double> >();
+    assert((temp.size() == 3) && "Vector from command line does not have three components.");
+    for (int i=0;i<NDIM;i++)
+      tmp->at(i) = temp[i];
+    return true;
+  } else
+    return false;
+}
+
+
+CommandLineDialog::BoxCommandLineQuery::BoxCommandLineQuery(string title, double ** const _cellSize, string _description) :
+    Dialog::BoxQuery(title,_cellSize, _description)
+{}
+
+CommandLineDialog::BoxCommandLineQuery::~BoxCommandLineQuery()
+{}
+
+bool CommandLineDialog::BoxCommandLineQuery::handle() {
+  vector<double> temp;
+  if (CommandLineParser::getInstance().vm.count(getTitle())) {
+    temp = CommandLineParser::getInstance().vm[getTitle()].as<vector<double> >();
+    assert((temp.size() == 6) && "Symmetric box matrix from command line does not have six components.");
+    for (int i=0;i<6;i++)
+      tmp[i] = temp[i];
+    return true;
+  } else
+    return false;
+}
+
+CommandLineDialog::ElementCommandLineQuery::ElementCommandLineQuery(string title, const element **target, string _description) :
+    Dialog::ElementQuery(title,target, _description)
+{}
+
+CommandLineDialog::ElementCommandLineQuery::~ElementCommandLineQuery()
+{}
+
+bool CommandLineDialog::ElementCommandLineQuery::handle() {
+  // TODO: vector of ints and removing first is not correctly implemented yet. How to remove from a vector?
+  int Z;
+  if (CommandLineParser::getInstance().vm.count(getTitle())) {
+    vector<int> AllElements = CommandLineParser::getInstance().vm[getTitle()].as< vector<int> >();
+    vector<int>::iterator ElementRunner = AllElements.begin();
+    Z = *ElementRunner;
+    // TODO: So far, this does not really erase the element in the parsed list.
+    AllElements.erase(ElementRunner);
+    tmp = World::getInstance().getPeriode()->FindElement(Z);
+    return true;
+  } else
+    return false;
+}
Index: src/UIElements/CommandLineUI/CommandLineDialog.hpp
===================================================================
--- src/UIElements/CommandLineUI/CommandLineDialog.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/CommandLineUI/CommandLineDialog.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,113 @@
+/*
+ * CommandLineDialog.hpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#ifndef COMMANDLINEDIALOG_HPP_
+#define COMMANDLINEDIALOG_HPP_
+
+#include <string>
+
+class atom;
+class element;
+class molecule;
+class Vector;
+
+#include "Dialog.hpp"
+
+/** CommandLineUIFactory implementation of the Dialog.
+ * The idea here is that for each query the parsed command line options are used instead.
+ */
+class CommandLineDialog : public Dialog
+{
+public:
+  CommandLineDialog();
+  virtual ~CommandLineDialog();
+
+  virtual void queryEmpty(const char *, std::string = "");
+  virtual void queryInt(const char *, int *, std::string = "");
+  virtual void queryBoolean(const char *, bool *, std::string = "");
+  virtual void queryString(const char*, std::string *, std::string = "");
+  virtual void queryDouble(const char*, double*, std::string = "");
+  virtual void queryAtom(const char*,atom**, std::string = "");
+  virtual void queryMolecule(const char*,molecule**,std::string = "");
+  virtual void queryVector(const char*,Vector *,const double * const,bool, std::string = "");
+  virtual void queryBox(const char*,double ** const, std::string = "");
+  virtual void queryElement(const char*,const element **, std::string = "");
+
+protected:
+  // specialized stuff for text queries
+  class EmptyCommandLineQuery : public Dialog::EmptyQuery {
+  public:
+    EmptyCommandLineQuery(std::string title, std::string _description = "");
+    virtual ~EmptyCommandLineQuery();
+    virtual bool handle();
+  };
+
+  class IntCommandLineQuery : public Dialog::IntQuery {
+  public:
+    IntCommandLineQuery(std::string title, int *_target, std::string _description = "");
+    virtual ~IntCommandLineQuery();
+    virtual bool handle();
+  };
+
+  class BooleanCommandLineQuery : public Dialog::BooleanQuery {
+  public:
+    BooleanCommandLineQuery(std::string title, bool *_target, std::string _description = "");
+    virtual ~BooleanCommandLineQuery();
+    virtual bool handle();
+  };
+
+  class DoubleCommandLineQuery : public Dialog::DoubleQuery {
+  public:
+    DoubleCommandLineQuery(std::string title, double *_target, std::string _description = "");
+    virtual ~DoubleCommandLineQuery();
+    virtual bool handle();
+  };
+
+  class StringCommandLineQuery : public Dialog::StringQuery {
+  public:
+    StringCommandLineQuery(std::string title, std::string *_target, std::string _description = "");
+    virtual ~StringCommandLineQuery();
+    virtual bool handle();
+  };
+
+  class AtomCommandLineQuery : public Dialog::AtomQuery {
+  public:
+    AtomCommandLineQuery(std::string title, atom **_target, std::string _description = "");
+    virtual ~AtomCommandLineQuery();
+    virtual bool handle();
+  };
+
+  class MoleculeCommandLineQuery : public Dialog::MoleculeQuery {
+  public:
+    MoleculeCommandLineQuery(std::string title, molecule **_target, std::string _description = "");
+    virtual ~MoleculeCommandLineQuery();
+    virtual bool handle();
+  };
+
+  class VectorCommandLineQuery : public Dialog::VectorQuery {
+  public:
+    VectorCommandLineQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check, std::string _description = "");
+    virtual ~VectorCommandLineQuery();
+    virtual bool handle();
+  };
+
+  class BoxCommandLineQuery : public Dialog::BoxQuery {
+  public:
+    BoxCommandLineQuery(std::string title,double ** const _cellSize, std::string _description = "");
+    virtual ~BoxCommandLineQuery();
+    virtual bool handle();
+  };
+
+  class ElementCommandLineQuery : public Dialog::ElementQuery {
+  public:
+    ElementCommandLineQuery(std::string title, const element **_target, std::string _description = "");
+    virtual ~ElementCommandLineQuery();
+    virtual bool handle();
+  };
+};
+
+#endif /* COMMANDLINEDIALOG_HPP_ */
Index: src/UIElements/CommandLineUI/CommandLineStatusIndicator.cpp
===================================================================
--- src/UIElements/CommandLineUI/CommandLineStatusIndicator.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/CommandLineUI/CommandLineStatusIndicator.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,57 @@
+/*
+ * CommandLineStatusIndicator.cpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+
+#include "CommandLineUI/CommandLineStatusIndicator.hpp"
+
+#include <iostream>
+
+#include "Actions/Process.hpp"
+
+using namespace std;
+
+CommandLineStatusIndicator::CommandLineStatusIndicator()
+{
+  Process::AddObserver(this);
+}
+
+CommandLineStatusIndicator::~CommandLineStatusIndicator()
+{
+  Process::RemoveObserver(this);
+}
+
+void CommandLineStatusIndicator::update(Observable *subject){
+  Process *proc;
+  // we are only observing Processes
+  if((proc=dynamic_cast<Process*>(subject))){
+    // see what kind of progress we have to display
+    if(proc->getMaxSteps()>0){
+      if(!proc->doesStop()){
+        cout << "Busy (" << proc->getName() << ") ";
+        // we can show a percentage done
+        cout << (int)proc->getDoneRatio() << "% done" << endl;
+      }
+    }
+    else{
+      // we only show some kind of busy animation
+      if(proc->doesStart()){
+        cout << "Busy (" << proc->getName() << ")";
+      }
+      if(!proc->doesStop()){
+        cout << ".";
+      }
+      else {
+        cout << endl;
+      }
+    }
+  }
+}
+
+void CommandLineStatusIndicator::subjectKilled(Observable *subject){
+
+}
+
Index: src/UIElements/CommandLineUI/CommandLineStatusIndicator.hpp
===================================================================
--- src/UIElements/CommandLineUI/CommandLineStatusIndicator.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/CommandLineUI/CommandLineStatusIndicator.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,26 @@
+/*
+ * CommandLineStatusIndicator.hpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#ifndef COMMANDLINESTATUSINDICATOR_HPP_
+#define COMMANDLINESTATUSINDICATOR_HPP_
+
+#include "Patterns/Observer.hpp"
+
+class CommandLineStatusIndicator : public Observer
+{
+public:
+  CommandLineStatusIndicator();
+  virtual ~CommandLineStatusIndicator();
+
+  void update(Observable *subject);
+  void subjectKilled(Observable *subject);
+
+private:
+
+};
+
+#endif /* COMMANDLINESTATUSINDICATOR_HPP_ */
Index: src/UIElements/CommandLineUI/CommandLineUIFactory.cpp
===================================================================
--- src/UIElements/CommandLineUI/CommandLineUIFactory.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/CommandLineUI/CommandLineUIFactory.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,32 @@
+/*
+ * CommandLineUIFactory.cpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+
+#include "CommandLineUI/CommandLineUIFactory.hpp"
+#include "CommandLineUI/CommandLineWindow.hpp"
+#include "CommandLineUI/CommandLineDialog.hpp"
+
+
+CommandLineUIFactory::CommandLineUIFactory()
+{
+  // TODO Auto-generated constructor stub
+
+}
+
+CommandLineUIFactory::~CommandLineUIFactory()
+{
+  // TODO Auto-generated destructor stub
+}
+
+
+Dialog* CommandLineUIFactory::makeDialog() {
+  return new CommandLineDialog();
+}
+
+MainWindow* CommandLineUIFactory::makeMainWindow() {
+  return new CommandLineWindow();
+}
Index: src/UIElements/CommandLineUI/CommandLineUIFactory.hpp
===================================================================
--- src/UIElements/CommandLineUI/CommandLineUIFactory.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/CommandLineUI/CommandLineUIFactory.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,28 @@
+/*
+ * CommandLineUIFactory.hpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#ifndef COMMANDLINEUIFACTORY_HPP_
+#define COMMANDLINEUIFACTORY_HPP_
+
+#include "UIFactory.hpp"
+
+class CommandLineUIFactory : public UIFactory
+{
+friend class UIFactory;
+
+public:
+  virtual ~CommandLineUIFactory();
+
+  virtual Dialog* makeDialog();
+  virtual MainWindow* makeMainWindow();
+
+protected:
+  CommandLineUIFactory();
+};
+
+
+#endif /* COMMANDLINEUIFACTORY_HPP_ */
Index: src/UIElements/CommandLineUI/CommandLineWindow.cpp
===================================================================
--- src/UIElements/CommandLineUI/CommandLineWindow.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/CommandLineUI/CommandLineWindow.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,159 @@
+/*
+ * CommandLineWindow.cpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#include <boost/bind.hpp>
+
+#include "CommandLineUI/CommandLineWindow.hpp"
+#include "CommandLineUI/CommandLineStatusIndicator.hpp"
+
+#include "Actions/ActionRegistry.hpp"
+#include "Actions/AnalysisAction/PairCorrelationAction.hpp"
+#include "Actions/AnalysisAction/PairCorrelationToPointAction.hpp"
+#include "Actions/AnalysisAction/PairCorrelationToSurfaceAction.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/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/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/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"
+
+#include <iostream>
+
+using namespace std;
+
+// TODO: see what code can be moved to a base class for Graphic and CommandLine Windows
+CommandLineWindow::CommandLineWindow()
+{
+  // create and register all command line callable actions
+  populateAnalysisActions();
+  populateAtomActions();
+  populateCmdActions();
+  populateFragmentationActions();
+  populateMoleculeActions();
+  populateParserActions();
+  populateTesselationActions();
+  populateWorldActions();
+
+  // Add status indicators etc...
+  statusIndicator = new CommandLineStatusIndicator();
+}
+
+CommandLineWindow::~CommandLineWindow()
+{
+  // go through all possible actions
+  for(std::map<const std::string,Action*>::iterator ActionRunner = ActionRegistry::getInstance().getBeginIter(); ActionRegistry::getInstance().getBeginIter() != ActionRegistry::getInstance().getEndIter(); ActionRunner = ActionRegistry::getInstance().getBeginIter()) {
+    ActionRegistry::getInstance().unregisterAction(ActionRunner->second);
+    delete(ActionRunner->second);
+  }
+
+  delete statusIndicator;
+}
+
+void CommandLineWindow::display() {
+  // go through all possible actions
+  for(std::map<const std::string,Action*>::iterator ActionRunner = ActionRegistry::getInstance().getBeginIter(); ActionRunner != ActionRegistry::getInstance().getEndIter(); ActionRunner++) {
+    // check whether action is present in command line
+    if (CommandLineParser::getInstance().vm.count(ActionRunner->first)) {
+      ActionRunner->second->call();
+    }
+  }
+}
+
+void CommandLineWindow::populateAnalysisActions()
+{
+  new AnalysisPairCorrelationAction();
+  new AnalysisPairCorrelationToPointAction();
+  new AnalysisPairCorrelationToSurfaceAction();
+}
+
+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();
+}
+
+void CommandLineWindow::populateMoleculeActions()
+{
+  new MoleculeBondFileAction();
+  new MoleculeChangeNameAction();
+  new MoleculeFillWithMoleculeAction();
+  new MoleculeLinearInterpolationofTrajectoriesAction();
+  new MoleculeSaveAdjacencyAction();
+  new MoleculeSaveBondsAction();
+  new MoleculeSaveTemperatureAction();
+  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 WorldRemoveSphereOfAtomsAction();
+  new WorldRepeatBoxAction();
+  new WorldScaleBoxAction();
+  new WorldSetDefaultNameAction();
+  new WorldSetGaussianBasisAction();
+}
Index: src/UIElements/CommandLineUI/CommandLineWindow.hpp
===================================================================
--- src/UIElements/CommandLineUI/CommandLineWindow.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/CommandLineUI/CommandLineWindow.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,38 @@
+/*
+ * CommandLineWindow.hpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#ifndef COMMANDLINEWINDOW_HPP_
+#define COMMANDLINEWINDOW_HPP_
+
+#include "MainWindow.hpp"
+
+class CommandLineStatusIndicator;
+
+class CommandLineWindow : public MainWindow
+{
+public:
+  CommandLineWindow();
+  virtual ~CommandLineWindow();
+
+  virtual void display();
+
+private:
+  // populaters
+  void populateAnalysisActions();
+  void populateAtomActions();
+  void populateCmdActions();
+  void populateFragmentationActions();
+  void populateMoleculeActions();
+  void populateParserActions();
+  void populateTesselationActions();
+  void populateWorldActions();
+
+  CommandLineStatusIndicator *statusIndicator;
+
+};
+
+#endif /* COMMANDLINEWINDOW_HPP_ */
Index: src/UIElements/CommandLineUIFactory.cpp
===================================================================
--- src/UIElements/CommandLineUIFactory.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ 	(revision )
@@ -1,32 +1,0 @@
-/*
- * CommandLineUIFactory.cpp
- *
- *  Created on: May 8, 2010
- *      Author: heber
- */
-
-
-#include "UIElements/CommandLineUIFactory.hpp"
-#include "UIElements/CommandLineWindow.hpp"
-#include "UIElements/CommandLineDialog.hpp"
-
-
-CommandLineUIFactory::CommandLineUIFactory()
-{
-  // TODO Auto-generated constructor stub
-
-}
-
-CommandLineUIFactory::~CommandLineUIFactory()
-{
-  // TODO Auto-generated destructor stub
-}
-
-
-Dialog* CommandLineUIFactory::makeDialog() {
-  return new CommandLineDialog();
-}
-
-MainWindow* CommandLineUIFactory::makeMainWindow() {
-  return new CommandLineWindow();
-}
Index: src/UIElements/CommandLineUIFactory.hpp
===================================================================
--- src/UIElements/CommandLineUIFactory.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*
- * CommandLineUIFactory.hpp
- *
- *  Created on: May 8, 2010
- *      Author: heber
- */
-
-#ifndef COMMANDLINEUIFACTORY_HPP_
-#define COMMANDLINEUIFACTORY_HPP_
-
-#include "UIElements/UIFactory.hpp"
-
-class CommandLineUIFactory : public UIFactory
-{
-friend class UIFactory;
-
-public:
-  virtual ~CommandLineUIFactory();
-
-  virtual Dialog* makeDialog();
-  virtual MainWindow* makeMainWindow();
-
-protected:
-  CommandLineUIFactory();
-};
-
-
-#endif /* COMMANDLINEUIFACTORY_HPP_ */
Index: src/UIElements/CommandLineWindow.cpp
===================================================================
--- src/UIElements/CommandLineWindow.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ 	(revision )
@@ -1,159 +1,0 @@
-/*
- * CommandLineWindow.cpp
- *
- *  Created on: May 8, 2010
- *      Author: heber
- */
-
-#include <boost/bind.hpp>
-
-#include "UIElements/CommandLineWindow.hpp"
-#include "UIElements/CommandLineStatusIndicator.hpp"
-
-#include "Actions/ActionRegistry.hpp"
-#include "Actions/AnalysisAction/PairCorrelationAction.hpp"
-#include "Actions/AnalysisAction/PairCorrelationToPointAction.hpp"
-#include "Actions/AnalysisAction/PairCorrelationToSurfaceAction.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/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/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/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"
-
-#include <iostream>
-
-using namespace std;
-
-// TODO: see what code can be moved to a base class for Graphic and CommandLine Windows
-CommandLineWindow::CommandLineWindow()
-{
-  // create and register all command line callable actions
-  populateAnalysisActions();
-  populateAtomActions();
-  populateCmdActions();
-  populateFragmentationActions();
-  populateMoleculeActions();
-  populateParserActions();
-  populateTesselationActions();
-  populateWorldActions();
-
-  // Add status indicators etc...
-  statusIndicator = new CommandLineStatusIndicator();
-}
-
-CommandLineWindow::~CommandLineWindow()
-{
-  // go through all possible actions
-  for(std::map<const std::string,Action*>::iterator ActionRunner = ActionRegistry::getInstance().getBeginIter(); ActionRegistry::getInstance().getBeginIter() != ActionRegistry::getInstance().getEndIter(); ActionRunner = ActionRegistry::getInstance().getBeginIter()) {
-    ActionRegistry::getInstance().unregisterAction(ActionRunner->second);
-    delete(ActionRunner->second);
-  }
-
-  delete statusIndicator;
-}
-
-void CommandLineWindow::display() {
-  // go through all possible actions
-  for(std::map<const std::string,Action*>::iterator ActionRunner = ActionRegistry::getInstance().getBeginIter(); ActionRunner != ActionRegistry::getInstance().getEndIter(); ActionRunner++) {
-    // check whether action is present in command line
-    if (CommandLineParser::getInstance().vm.count(ActionRunner->first)) {
-      ActionRunner->second->call();
-    }
-  }
-}
-
-void CommandLineWindow::populateAnalysisActions()
-{
-  new AnalysisPairCorrelationAction();
-  new AnalysisPairCorrelationToPointAction();
-  new AnalysisPairCorrelationToSurfaceAction();
-}
-
-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();
-}
-
-void CommandLineWindow::populateMoleculeActions()
-{
-  new MoleculeBondFileAction();
-  new MoleculeChangeNameAction();
-  new MoleculeFillWithMoleculeAction();
-  new MoleculeLinearInterpolationofTrajectoriesAction();
-  new MoleculeSaveAdjacencyAction();
-  new MoleculeSaveBondsAction();
-  new MoleculeSaveTemperatureAction();
-  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 WorldRemoveSphereOfAtomsAction();
-  new WorldRepeatBoxAction();
-  new WorldScaleBoxAction();
-  new WorldSetDefaultNameAction();
-  new WorldSetGaussianBasisAction();
-}
Index: src/UIElements/CommandLineWindow.hpp
===================================================================
--- src/UIElements/CommandLineWindow.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ 	(revision )
@@ -1,38 +1,0 @@
-/*
- * CommandLineWindow.hpp
- *
- *  Created on: May 8, 2010
- *      Author: heber
- */
-
-#ifndef COMMANDLINEWINDOW_HPP_
-#define COMMANDLINEWINDOW_HPP_
-
-#include "UIElements/MainWindow.hpp"
-
-class CommandLineStatusIndicator;
-
-class CommandLineWindow : public MainWindow
-{
-public:
-  CommandLineWindow();
-  virtual ~CommandLineWindow();
-
-  virtual void display();
-
-private:
-  // populaters
-  void populateAnalysisActions();
-  void populateAtomActions();
-  void populateCmdActions();
-  void populateFragmentationActions();
-  void populateMoleculeActions();
-  void populateParserActions();
-  void populateTesselationActions();
-  void populateWorldActions();
-
-  CommandLineStatusIndicator *statusIndicator;
-
-};
-
-#endif /* COMMANDLINEWINDOW_HPP_ */
Index: src/UIElements/Dialog.cpp
===================================================================
--- src/UIElements/Dialog.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ src/UIElements/Dialog.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -8,5 +8,5 @@
 #include <cassert>
 
-#include "UIElements/Dialog.hpp"
+#include "Dialog.hpp"
 
 #include "atom.hpp"
Index: src/UIElements/MainWindow.cpp
===================================================================
--- src/UIElements/MainWindow.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ src/UIElements/MainWindow.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -6,5 +6,5 @@
  */
 
-#include "UIElements/MainWindow.hpp"
+#include "MainWindow.hpp"
 
 MainWindow::MainWindow()
Index: src/UIElements/Makefile.am
===================================================================
--- src/UIElements/Makefile.am	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/Makefile.am	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,82 @@
+# Below is all for the User Interface
+
+INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/UIElements
+
+AM_LDFLAGS = $(CPPUNIT_LIBS) -ldl
+AM_CXXFLAGS = $(CPPUNIT_CFLAGS)
+
+noinst_LIBRARIES = libMolecuilderUI.a
+libMolecuilderUI_a_SOURCES = ${UISOURCE} ${UIHEADER}
+
+VIEWSOURCE = \
+  Views/View.cpp \
+  Views/StringView.cpp \
+  Views/MethodStringView.cpp \
+  Views/StreamStringView.cpp
+VIEWHEADER = \
+  Views/View.hpp \
+  Views/StringView.hpp \
+  Views/MethodStringView.hpp \
+  Views/StreamStringView.hpp
+
+MENUSOURCE = \
+  Menu/Menu.cpp \
+  Menu/TextMenu.cpp \
+  Menu/MenuItem.cpp \
+  Menu/SubMenuItem.cpp \
+  Menu/ActionMenuItem.cpp \
+  Menu/SeperatorItem.cpp \
+  Menu/DisplayMenuItem.cpp
+  
+MENUHEADER = \
+  Menu/Menu.hpp \
+  Menu/TextMenu.hpp \
+  Menu/MenuItem.hpp \
+  Menu/SubMenuItem.hpp \
+  Menu/ActionMenuItem.hpp \
+  Menu/SeperatorItem.hpp \
+  Menu/DisplayMenuItem.hpp
+
+UISOURCE = \
+  ${ACTIONSSOURCE} \
+  ${COMMANDLINEUISOURCE} \
+  ${MENUSOURCE} \
+  ${TEXTUISOURCE} \
+  ${VIEWSOURCE} \
+  Dialog.cpp \
+  MainWindow.cpp \
+  UIFactory.cpp
+  
+UIHEADER = \
+  ${ACTIONSHEADER} \
+  ${COMMANDLINEUIHEADER} \
+  ${MENUHEADER} \
+  ${TEXTUIHEADER} \
+  ${VIEWHEADER} \
+  Dialog.hpp \
+  MainWindow.hpp \
+  UIFactory.hpp
+
+TEXTUISOURCE = \
+  TextUI/TextDialog.cpp \
+  TextUI/TextStatusIndicator.cpp \
+  TextUI/TextUIFactory.cpp \
+  TextUI/TextWindow.cpp
+TEXTUIHEADER = \
+  TextUI/TextDialog.hpp \
+  TextUI/TextStatusIndicator.hpp \
+  TextUI/TextUIFactory.hpp \
+  TextUI/TextWindow.hpp
+
+COMMANDLINEUISOURCE = \
+  CommandLineUI/CommandLineDialog.cpp \
+  CommandLineUI/CommandLineStatusIndicator.cpp \
+  CommandLineUI/CommandLineUIFactory.cpp \
+  CommandLineUI/CommandLineWindow.cpp
+COMMANDLINEUIHEADER = \
+  CommandLineUI/CommandLineDialog.hpp \
+  CommandLineUI/CommandLineStatusIndicator.hpp \
+  CommandLineUI/CommandLineUIFactory.hpp \
+  CommandLineUI/CommandLineWindow.hpp
+
+
Index: src/UIElements/Menu/ActionMenuItem.cpp
===================================================================
--- src/UIElements/Menu/ActionMenuItem.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/Menu/ActionMenuItem.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,30 @@
+/*
+ * ActionMenuItem.cpp
+ *
+ *  Created on: Dec 11, 2009
+ *      Author: crueger
+ */
+
+#include <iostream>
+
+#include "Menu/ActionMenuItem.hpp"
+#include "Actions/MethodAction.hpp"
+
+using namespace std;
+
+ActionMenuItem::ActionMenuItem(char _trigger, const char* _description,Menu* _menu,Action* _action)
+: MenuItem(_trigger,_description,_menu),
+  action(_action)
+{
+}
+
+ActionMenuItem::~ActionMenuItem()
+{}
+
+void ActionMenuItem::doTrigger() {
+  action->call();
+}
+
+bool ActionMenuItem::isActive() {
+  return action->isActive();
+}
Index: src/UIElements/Menu/ActionMenuItem.hpp
===================================================================
--- src/UIElements/Menu/ActionMenuItem.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/Menu/ActionMenuItem.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,34 @@
+/*
+ * ActionMenuItem.h
+ *
+ *  Created on: Dec 11, 2009
+ *      Author: crueger
+ */
+
+#ifndef ACTIONMENUITEM_H_
+#define ACTIONMENUITEM_H_
+
+#include <string>
+
+#include "Menu/MenuItem.hpp"
+
+class Action;
+
+/**
+ * Produce MenuItems that take an appropriate action when called.
+ */
+class ActionMenuItem : public MenuItem
+{
+public:
+  ActionMenuItem(char,const char*,Menu*,Action*);
+  virtual ~ActionMenuItem();
+
+  virtual void doTrigger();
+
+  virtual bool isActive();
+
+private:
+  Action* action; //!< this action will be called when the trigger matches
+};
+
+#endif /* ACTIONMENUITEM_H_ */
Index: src/UIElements/Menu/DisplayMenuItem.cpp
===================================================================
--- src/UIElements/Menu/DisplayMenuItem.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/Menu/DisplayMenuItem.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,59 @@
+/*
+ * DisplayMenuItem.cpp
+ *
+ *  Created on: Dec 14, 2009
+ *      Author: crueger
+ */
+
+#include <sstream>
+#include <cmath>
+
+#include "Menu/DisplayMenuItem.hpp"
+#include "Views/StringView.hpp"
+
+
+DisplayMenuItem::DisplayMenuItem(Menu* _menu, StringView *_view):
+MenuItem('\0',"",_menu),
+view(_view),
+title("")
+{
+}
+
+DisplayMenuItem::DisplayMenuItem(Menu* _menu, StringView *_view, string _title, char _spacer, int _length ):
+  MenuItem('\0',"",_menu),
+  view(_view),
+  title(_title),
+  length(_length),
+  spacer(_spacer)
+{
+}
+
+DisplayMenuItem::~DisplayMenuItem()
+{}
+
+
+void DisplayMenuItem::doTrigger(){}
+bool DisplayMenuItem::checkTrigger(char c){
+  return false;
+}
+
+const string DisplayMenuItem::formatEntry(){
+  stringstream s;
+  if(title.length()>0) {
+    int pre = floor((length-title.length())/2.0);
+    int post = ceil((length-title.length())/2.0);
+    for(int i=0;i<pre;i++)
+      s << spacer;
+    s << title;
+    for(int i=0;i<post;i++)
+          s << spacer;
+    s << "\n";
+  }
+  s << view->toString();
+  return s.str();
+}
+
+
+const string DisplayMenuItem::getDescription(){
+  return string("");
+}
Index: src/UIElements/Menu/DisplayMenuItem.hpp
===================================================================
--- src/UIElements/Menu/DisplayMenuItem.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/Menu/DisplayMenuItem.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,43 @@
+/*
+ * DisplayMenuItem.hpp
+ *
+ *  Created on: Dec 14, 2009
+ *      Author: crueger
+ */
+
+#ifndef DISPLAYMENUITEM_HPP_
+#define DISPLAYMENUITEM_HPP_
+
+#include "Menu/MenuItem.hpp"
+#include "defs.hpp"
+
+class StringView;
+
+/**
+ * Display any kind of StringView within a Menu
+ *
+ * Any trigger are ignored for this type of Item
+ */
+class DisplayMenuItem : public MenuItem
+{
+public:
+  DisplayMenuItem(Menu* _menu, StringView *_view);
+  DisplayMenuItem(Menu* _menu, StringView *_view, string _title,
+                  char _spacer=STD_MENU_TITLE_SPACER, int _length=STD_MENU_LENGTH);
+  virtual ~DisplayMenuItem();
+
+  virtual void doTrigger();
+  virtual bool checkTrigger(char);
+
+  virtual const string formatEntry();
+
+  virtual const string getDescription();
+
+private:
+  StringView *view;
+  string title;
+  int length;
+  char spacer;
+};
+
+#endif /* DISPLAYMENUITEM_HPP_ */
Index: src/UIElements/Menu/Menu.cpp
===================================================================
--- src/UIElements/Menu/Menu.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/Menu/Menu.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,19 @@
+/*
+ * Menu.cpp
+ *
+ *  Created on: Dec 10, 2009
+ *      Author: crueger
+ */
+
+#include "Menu.hpp"
+
+Menu::Menu()
+{
+  // TODO Auto-generated constructor stub
+
+}
+
+Menu::~Menu()
+{
+  // TODO Auto-generated destructor stub
+}
Index: src/UIElements/Menu/Menu.hpp
===================================================================
--- src/UIElements/Menu/Menu.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/Menu/Menu.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,41 @@
+/*
+ * Menu.h
+ *
+ *  Created on: Dec 10, 2009
+ *      Author: crueger
+ */
+
+#ifndef MENU_MENU_H_
+#define MENU_MENU_H_
+
+using namespace std;
+
+class MenuItem;
+
+/**
+ * Base class for all Types of menus
+ * contains basic abstract functionality to add Items, remove Items and display the menu
+ *
+ * TODO: Make sure all items are only added once.
+ */
+class Menu
+{
+public:
+  Menu();
+  virtual ~Menu();
+
+
+  /**
+   * Adding and removing should be handled by the items.
+   */
+  virtual void addItem(MenuItem*)=0;
+  /**
+   * Adding and removing should be handled by the items.
+   */
+  virtual void removeItem(MenuItem*)=0;
+  virtual void display()=0;
+
+private:
+};
+
+#endif /* MENU_H_ */
Index: src/UIElements/Menu/MenuItem.cpp
===================================================================
--- src/UIElements/Menu/MenuItem.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/Menu/MenuItem.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,83 @@
+/*
+ * MenuItem.cpp
+ *
+ *  Created on: Dec 10, 2009
+ *      Author: crueger
+ */
+
+
+
+#include "Menu/MenuItem.hpp"
+#include "Menu/Menu.hpp"
+#include <sstream>
+#include <iostream>
+
+/**
+ * produce a new MenuItem using with a description and a trigger.
+ * The MenuItem is then added to the menu passed to it.
+ */
+MenuItem::MenuItem(char _trigger, const char* _description,Menu* menu) :
+trigger(_trigger),
+added(false)
+{
+  description = new string(_description);
+  add_to_menu(menu);
+}
+
+MenuItem::~MenuItem()
+{
+  delete description;
+}
+
+/**
+ * check if the trigger matches and call doTrigger if it does.
+ */
+bool MenuItem::checkTrigger(char key) {
+  if(key == trigger) {
+    doTrigger();
+    return true;
+  }
+  else
+    return false;
+
+}
+
+char MenuItem::getTrigger() {
+  return trigger;
+}
+
+const string MenuItem::getDescription() {
+  return *description;
+}
+
+/**
+ * Produce a formated output of this item containing trigger and description
+ * Normal format is: "<trigger> - <description>"
+ */
+const string MenuItem::formatEntry(){
+  stringstream s;
+  s << getTrigger() << " - " << getDescription();
+
+  return s.str();
+}
+
+
+/**
+ * check if this item is within a menu and add to menu if it is not yet contained anywhere
+ *
+ * TODO: include funtionality to move Items from one menu to another
+ */
+void MenuItem::add_to_menu(Menu* menu) {
+  if(!wasAdded()) {
+    menu->addItem(this);
+    added=true;
+  }
+}
+
+bool MenuItem::wasAdded(){
+  return added;
+}
+
+bool MenuItem::isActive(){
+  return true;
+}
Index: src/UIElements/Menu/MenuItem.hpp
===================================================================
--- src/UIElements/Menu/MenuItem.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/Menu/MenuItem.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,49 @@
+/*
+ * MenuItem.h
+ *
+ *  Created on: Dec 10, 2009
+ *      Author: crueger
+ */
+
+#ifndef MENUITEM_H_
+#define MENUITEM_H_
+
+#include <string>
+
+using namespace std;
+
+class Menu;
+
+/**
+ * Base class for all kinds of MenuItems
+ *
+ * This class takes care of checking the triggers and performing appropriate actions.
+ */
+class MenuItem {
+public:
+  MenuItem(char,const char*,Menu*);
+  virtual ~MenuItem();
+
+  virtual void doTrigger()=0;
+  virtual bool checkTrigger(char);
+
+  virtual const string formatEntry();
+
+  virtual const string getDescription();
+  char getTrigger();
+
+  void add_to_menu(Menu*);
+  bool wasAdded();
+
+  virtual bool isActive();
+
+protected:
+  void setDescription(string);
+
+private:
+  char trigger;
+  string *description;
+  bool added;
+};
+
+#endif /* MENUITEM_H_ */
Index: src/UIElements/Menu/SeperatorItem.cpp
===================================================================
--- src/UIElements/Menu/SeperatorItem.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/Menu/SeperatorItem.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,53 @@
+/*
+ * SeperatorItem.cpp
+ *
+ *  Created on: Dec 11, 2009
+ *      Author: crueger
+ */
+#include <string>
+#include <sstream>
+
+#include "Menu/SeperatorItem.hpp"
+#include "Menu/Menu.hpp"
+#include "defs.hpp"
+
+
+SeperatorItem::SeperatorItem(Menu* menu):
+MenuItem('\0',"",menu),
+spacer(STD_SEPERATOR_SPACER),
+length(STD_MENU_LENGTH)
+{
+  // TODO Auto-generated constructor stub
+
+}
+
+SeperatorItem::SeperatorItem(Menu* menu,char _spacer, int _length):
+MenuItem('\0',"",menu),
+spacer(_spacer),
+length(_length)
+{
+  // TODO Auto-generated constructor stub
+
+}
+
+SeperatorItem::~SeperatorItem()
+{
+  // TODO Auto-generated destructor stub
+}
+
+
+void SeperatorItem::doTrigger(){}
+bool SeperatorItem::checkTrigger(char){
+  return false;
+}
+
+const string SeperatorItem::getDescription() {
+  return string("");
+}
+
+const string SeperatorItem::formatEntry(){
+  stringstream s;
+  for(int i=0; i<length;i++)
+    s << spacer;
+  return s.str();
+}
Index: src/UIElements/Menu/SeperatorItem.hpp
===================================================================
--- src/UIElements/Menu/SeperatorItem.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/Menu/SeperatorItem.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,36 @@
+/*
+ * SeperatorItem.h
+ *
+ *  Created on: Dec 11, 2009
+ *      Author: crueger
+ */
+
+#ifndef SEPERATORITEM_H_
+#define SEPERATORITEM_H_
+
+#include "Menu/MenuItem.hpp"
+
+/**
+ * Produce a Seperator within a Menu.
+ *
+ * All triggers are ignored for this Item.
+ */
+class SeperatorItem : public MenuItem
+{
+public:
+  SeperatorItem(Menu*);
+  SeperatorItem(Menu*,char,int);
+  virtual ~SeperatorItem();
+
+  virtual void doTrigger();
+  virtual bool checkTrigger(char);
+
+  virtual const string getDescription();
+
+  virtual const string formatEntry();
+private:
+  char spacer;
+  int length;
+};
+
+#endif /* SEPERATORITEM_H_ */
Index: src/UIElements/Menu/SubMenuItem.cpp
===================================================================
--- src/UIElements/Menu/SubMenuItem.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/Menu/SubMenuItem.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,23 @@
+/*
+ * SubMenuItem.cpp
+ *
+ *  Created on: Dec 10, 2009
+ *      Author: crueger
+ */
+
+#include "SubMenuItem.hpp"
+
+SubMenuItem::SubMenuItem(char _trigger,const char* _description,Menu* _parent, Menu* _theMenu) :
+MenuItem(_trigger,_description,_parent),
+theMenu(_theMenu)
+{
+}
+
+SubMenuItem::~SubMenuItem()
+{
+  delete theMenu;
+}
+
+void SubMenuItem::doTrigger() {
+  theMenu->display();
+}
Index: src/UIElements/Menu/SubMenuItem.hpp
===================================================================
--- src/UIElements/Menu/SubMenuItem.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/Menu/SubMenuItem.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,20 @@
+#ifndef SUBMENUITEM_H_
+#define SUBMENUITEM_H_
+
+#include "MenuItem.hpp"
+#include "TextMenu.hpp"
+
+class Menu;
+
+class SubMenuItem : public MenuItem
+{
+public:
+  SubMenuItem(char,const char*,Menu*,Menu*);
+  virtual ~SubMenuItem();
+
+  virtual void doTrigger();
+private:
+  Menu* theMenu;
+};
+
+#endif /* SUBMENUITEM_H_ */
Index: src/UIElements/Menu/TextMenu.cpp
===================================================================
--- src/UIElements/Menu/TextMenu.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/Menu/TextMenu.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,141 @@
+/*
+ * TextMenu.cpp
+ *
+ *  Created on: Dec 10, 2009
+ *      Author: crueger
+ */
+
+#include <boost/bind.hpp>
+#include <iostream>
+#include <cmath>
+#include "Menu/TextMenu.hpp"
+#include "Menu/MenuItem.hpp"
+#include "Helpers/Assert.hpp"
+
+
+/**
+ * produce a text menu with a given title.
+ * The text will later be displayed using the stream passed to the constructor.
+ */
+TextMenu::TextMenu(ostream& _outputter, string _title, char _spacer,int _length) :
+  defaultItem(0),
+  outputter(_outputter),
+  title(_title),
+  spacer(_spacer),
+  length(_length),
+  quit(false)
+{
+}
+
+TextMenu::~TextMenu()
+{
+  for(list<MenuItem*>::iterator it=items.begin(); it != items.end(); it++)
+    delete (*it);
+}
+
+
+void TextMenu::addItem(MenuItem* item) {
+  items.push_back(item);
+}
+
+void TextMenu::removeItem(MenuItem* item) {
+  items.remove(item);
+}
+
+void TextMenu::doQuit(){
+  quit = true;
+}
+
+bool TextMenu::hasQuit(){
+  return quit;
+}
+
+void TextMenu::showEntry(MenuItem* entry){
+  if(entry->isActive()==false){
+    outputter << "(";
+  }
+  outputter << entry->formatEntry();
+  if(entry->isActive()==false){
+    outputter << ")";
+  }
+  outputter << "\n";
+}
+
+void TextMenu::display() {
+  char choice;
+  bool somethingChosen = false;
+  quit = false;
+  do {
+    int pre = floor((length - title.length()) /2.0);
+    int post = ceil((length - title.length()) /2.0);
+    for(int i=0;i<pre;i++)
+      outputter << spacer;
+    outputter << title;
+    for(int i=0;i<post;i++)
+          outputter << spacer;
+    outputter << '\n';
+    for_each(items.begin(), items.end(), boost::bind(&TextMenu::showEntry,this,_1));
+    outputter.flush();
+
+    cin >> choice;
+
+    list<MenuItem*>::iterator iter;
+    for(iter = items.begin(); iter!=items.end();iter++){
+      if((*iter)->isActive()){
+        somethingChosen |= (*iter)->checkTrigger(choice);
+      }
+    }
+    // see if something was chosen and call default Item if not
+    if(!somethingChosen) {
+      if(defaultItem){
+        defaultItem->doTrigger();
+      }
+      else{
+        outputter << "Invalid Choice!" <<  endl;
+      }
+    }
+  }while (!hasQuit());
+}
+
+string TextMenu::getTitle(){
+  return title;
+}
+
+void TextMenu::addDefault(MenuItem* _defaultItem) {
+  defaultItem = _defaultItem;
+}
+
+/****************************** Contained Actions ****************/
+
+const string TextMenu::LeaveAction::nameBase = "Leave menu: ";
+
+TextMenu::LeaveAction::LeaveAction(TextMenu* _menu) :
+Action(nameBase+_menu->getTitle()),
+menu(_menu)
+{}
+
+TextMenu::LeaveAction::~LeaveAction(){}
+
+bool TextMenu::LeaveAction::canUndo(){
+  return false;
+}
+
+bool TextMenu::LeaveAction::shouldUndo(){
+  return false;
+}
+
+Action::state_ptr TextMenu::LeaveAction::performCall(){
+  menu->doQuit();
+  return Action::success;
+}
+
+
+Action::state_ptr TextMenu::LeaveAction::performUndo(Action::state_ptr){
+  ASSERT(0,"Cannot undo leaving a menu");
+  return Action::success;
+}
+
+Action::state_ptr TextMenu::LeaveAction::performRedo(Action::state_ptr){
+  ASSERT(0,"Cannot redo leaving a menu");
+  return Action::success;
+}
Index: src/UIElements/Menu/TextMenu.hpp
===================================================================
--- src/UIElements/Menu/TextMenu.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/Menu/TextMenu.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,82 @@
+/*
+ * TextMenu.h
+ *
+ *  Created on: Dec 10, 2009
+ *      Author: crueger
+ */
+
+#ifndef TEXTMENU_H_
+#define TEXTMENU_H_
+
+#include <list>
+#include <ostream>
+#include <string>
+
+#include "Menu/Menu.hpp"
+#include "Actions/Action.hpp"
+#include "defs.hpp"
+
+class MenuItem;
+
+/**
+ * Used to produce any kind of text menu
+ *
+ * All Items are displayed and user is prompted for a key. The item corresponding to that key is then activated.
+ */
+class TextMenu : public Menu
+{
+public:
+  class LeaveAction : public Action {
+  public:
+    LeaveAction(TextMenu*);
+    virtual ~LeaveAction();
+
+    bool canUndo();
+    bool shouldUndo();
+
+  private:
+    virtual Action::state_ptr performCall();
+    virtual Action::state_ptr performUndo(Action::state_ptr);
+    virtual Action::state_ptr performRedo(Action::state_ptr);
+
+    TextMenu* menu;
+
+    static const string nameBase;
+  };
+
+  TextMenu(ostream& _outputter, string _title, char _spacer=STD_MENU_TITLE_SPACER,int _length=STD_MENU_LENGTH);
+  virtual ~TextMenu();
+
+  virtual void addItem(MenuItem*);
+  virtual void removeItem(MenuItem*);
+  virtual void display();
+  virtual string getTitle();
+
+  /**
+   * Call doQuit if you want to return from this menu.
+   */
+  virtual void doQuit();
+  /**
+   * Check whether someone has chosen to quit
+   */
+  virtual bool hasQuit();
+
+  virtual void addDefault(MenuItem*);
+
+protected:
+  virtual void showEntry(MenuItem*);
+
+private:
+  list<MenuItem*> items;
+
+  MenuItem* defaultItem;
+
+  ostream& outputter;
+  string title;
+  char spacer;
+  int length;
+
+  bool quit;
+};
+
+#endif /* TEXTMENU_H_ */
Index: src/UIElements/TextDialog.cpp
===================================================================
--- src/UIElements/TextDialog.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ 	(revision )
@@ -1,344 +1,0 @@
-/*
- * TextDialog.cpp
- *
- *  Created on: Jan 5, 2010
- *      Author: crueger
- */
-
-#include <iostream>
-
-#include <Descriptors/AtomDescriptor.hpp>
-#include <Descriptors/AtomIdDescriptor.hpp>
-#include <Descriptors/MoleculeDescriptor.hpp>
-#include <Descriptors/MoleculeIdDescriptor.hpp>
-#include "UIElements/TextDialog.hpp"
-
-#include "World.hpp"
-#include "periodentafel.hpp"
-#include "log.hpp"
-#include "verbose.hpp"
-
-#include "atom.hpp"
-#include "element.hpp"
-#include "molecule.hpp"
-#include "vector.hpp"
-
-using namespace std;
-
-
-TextDialog::TextDialog()
-{
-}
-
-TextDialog::~TextDialog()
-{
-}
-
-
-void TextDialog::queryEmpty(const char* title, string description){
-  registerQuery(new EmptyTextQuery(title,description));
-}
-
-void TextDialog::queryBoolean(const char* title, bool* target, string description){
-  registerQuery(new BooleanTextQuery(title,target,description));
-}
-
-void TextDialog::queryInt(const char* title, int* target, string description){
-  registerQuery(new IntTextQuery(title,target,description));
-}
-
-void TextDialog::queryDouble(const char* title, double* target, string description){
-  registerQuery(new DoubleTextQuery(title,target,description));
-}
-
-void TextDialog::queryString(const char* title, string* target, string description){
-  registerQuery(new StringTextQuery(title,target,description));
-}
-
-void TextDialog::queryAtom(const char* title, atom **target, string description) {
-  registerQuery(new AtomTextQuery(title,target,description));
-}
-
-void TextDialog::queryMolecule(const char* title, molecule **target, string description) {
-  registerQuery(new MoleculeTextQuery(title,target,description));
-}
-
-void TextDialog::queryVector(const char* title, Vector *target,const double *const cellSize, bool check, string description) {
-  registerQuery(new VectorTextQuery(title,target,cellSize,check,description));
-}
-
-void TextDialog::queryBox(const char* title,double ** const cellSize, string description) {
-  registerQuery(new BoxTextQuery(title,cellSize,description));
-}
-
-void TextDialog::queryElement(const char* title, const element **target, string description){
-  registerQuery(new ElementTextQuery(title,target,description));
-}
-
-/************************** Query Infrastructure ************************/
-
-TextDialog::EmptyTextQuery::EmptyTextQuery(string title, std::string _description) :
-    Dialog::EmptyQuery(title,_description)
-{}
-
-TextDialog::EmptyTextQuery::~EmptyTextQuery() {}
-
-bool TextDialog::EmptyTextQuery::handle() {
-  cout << "Message of " << getTitle() << ":\n" << getDescription() << "\n";
-  return true;
-}
-
-TextDialog::IntTextQuery::IntTextQuery(string title, int * _target, std::string _description) :
-    Dialog::IntQuery(title,_target,_description)
-{}
-
-TextDialog::IntTextQuery::~IntTextQuery() {}
-
-bool TextDialog::IntTextQuery::handle() {
-  bool badInput = false;
-  do{
-    badInput = false;
-    Log() << Verbose(0) << getTitle();
-    cin >> tmp;
-    if(cin.fail()){
-      badInput=true;
-      cin.clear();
-      cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
-      Log() << Verbose(0) << "Input was not a number!" << endl;
-    }
-  } while(badInput);
-  // clear the input buffer of anything still in the line
-  cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
-  return true;
-}
-
-TextDialog::BooleanTextQuery::BooleanTextQuery(string title, bool * _target, std::string _description) :
-    Dialog::BooleanQuery(title,_target,_description)
-{}
-
-TextDialog::BooleanTextQuery::~BooleanTextQuery() {}
-
-bool TextDialog::BooleanTextQuery::handle() {
-  bool badInput = false;
-  char input = ' ';
-  do{
-    badInput = false;
-    Log() << Verbose(0) << getTitle();
-    cin >> input;
-    if ((input == 'y' ) || (input == 'Y')) {
-      tmp = true;
-    } else if ((input == 'n' ) || (input == 'N')) {
-      tmp = false;
-    } else {
-      badInput=true;
-      cin.clear();
-      cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
-      Log() << Verbose(0) << "Input was not of [yYnN]!" << endl;
-    }
-  } while(badInput);
-  // clear the input buffer of anything still in the line
-  cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
-  return true;
-}
-
-TextDialog::StringTextQuery::StringTextQuery(string title,string *_target, std::string _description) :
-    Dialog::StringQuery(title,_target,_description)
-{}
-
-TextDialog::StringTextQuery::~StringTextQuery() {}
-
-bool TextDialog::StringTextQuery::handle() {
-  Log() << Verbose(0) << getTitle();
-  getline(cin,tmp);
-  return true;
-}
-
-TextDialog::DoubleTextQuery::DoubleTextQuery(string title,double *_target, std::string _description) :
-    Dialog::DoubleQuery(title,_target,_description)
-{}
-
-TextDialog::DoubleTextQuery::~DoubleTextQuery() {}
-
-bool TextDialog::DoubleTextQuery::handle() {
-  bool badInput = false;
-  do{
-    badInput = false;
-    Log() << Verbose(0) << getTitle();
-    cin >> tmp;
-    if(cin.fail()){
-      badInput = true;
-      cin.clear();
-      cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
-      Log() << Verbose(0) << "Input was not a number!" << endl;
-    }
-  }while(badInput);
-  cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
-  return true;
-}
-
-TextDialog::AtomTextQuery::AtomTextQuery(string title, atom **_target, std::string _description) :
-    Dialog::AtomQuery(title,_target,_description)
-{}
-
-TextDialog::AtomTextQuery::~AtomTextQuery() {}
-
-bool TextDialog::AtomTextQuery::handle() {
-  int idxOfAtom=0;
-  bool badInput = false;
-  do{
-    badInput = false;
-    Log() << Verbose(0) << getTitle();
-    cin >> idxOfAtom;
-    if(cin.fail()){
-      badInput = true;
-      cin.clear();
-      cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
-      Log() << Verbose(0) << "Input was not a number!" << endl;
-      continue;
-    }
-
-    tmp = World::getInstance().getAtom(AtomById(idxOfAtom));
-    if(!tmp && idxOfAtom!=-1){
-      Log() << Verbose(0) << "Invalid Atom Index" << endl;
-      badInput = true;
-    }
-
-  } while(badInput);
-  cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
-  return (idxOfAtom!=-1);
-}
-
-TextDialog::MoleculeTextQuery::MoleculeTextQuery(string title, molecule **_target, std::string _description) :
-    Dialog::MoleculeQuery(title,_target,_description)
-{}
-
-TextDialog::MoleculeTextQuery::~MoleculeTextQuery() {}
-
-bool TextDialog::MoleculeTextQuery::handle() {
-  int idxOfMol=0;
-  bool badInput = false;
-  do{
-    badInput = false;
-    Log() << Verbose(0) << getTitle();
-    cin >> idxOfMol;
-    if(cin.fail()){
-      badInput = true;
-      cin.clear();
-      cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
-      Log() << Verbose(0) << "Input was not a number!" << endl;
-      continue;
-    }
-
-    tmp = World::getInstance().getMolecule(MoleculeById(idxOfMol));
-    if(!tmp && idxOfMol!=-1){
-      Log() << Verbose(0) << "Invalid Molecule Index" << endl;
-      badInput = true;
-    }
-
-  } while(badInput);
-  cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
-  return (idxOfMol!=-1);
-}
-
-TextDialog::VectorTextQuery::VectorTextQuery(std::string title, Vector *_target, const double *const _cellSize, bool _check, std::string _description) :
-    Dialog::VectorQuery(title,_target,_cellSize,_check,_description)
-{}
-
-TextDialog::VectorTextQuery::~VectorTextQuery()
-{}
-
-bool TextDialog::VectorTextQuery::handle() {
-  Log() << Verbose(0) << getTitle();
-
-  char coords[3] = {'x','y','z'};
-  int j = -1;
-  for (int i=0;i<3;i++) {
-    j += i+1;
-    do {
-      Log() << Verbose(0) << coords[i] << "[0.." << cellSize[j] << "]: ";
-      cin >> (*tmp)[i];
-    } while ((((*tmp)[i] < 0) || ((*tmp)[i] >= cellSize[j])) && (check));
-  }
-  return true;
-}
-
-TextDialog::BoxTextQuery::BoxTextQuery(std::string title, double ** const _cellSize, std::string _description) :
-    Dialog::BoxQuery(title,_cellSize,_description)
-{}
-
-TextDialog::BoxTextQuery::~BoxTextQuery()
-{}
-
-bool TextDialog::BoxTextQuery::handle() {
-  Log() << Verbose(0) << getTitle();
-
-  std::string coords[6] = {"xx","xy","xz", "yy", "yz", "zz"};
-  for (int i=0;i<6;i++) {
-    Log() << Verbose(0) << coords[i] << ": ";
-    cin >> tmp[i];
-  }
-  return true;
-}
-
-TextDialog::ElementTextQuery::ElementTextQuery(std::string title, const element **target, std::string _description) :
-    Dialog::ElementQuery(title,target,_description)
-{}
-
-TextDialog::ElementTextQuery::~ElementTextQuery()
-{}
-
-bool TextDialog::ElementTextQuery::handle() {
-  bool badInput=false;
-  bool aborted = false;
-  do{
-    badInput = false;
-    Log() << Verbose(0) << getTitle();
-
-    // try to read as Atomic number
-    int Z;
-    cin >> Z;
-    if(!cin.fail()){
-      if(Z==-1){
-        aborted = true;
-      }
-      else{
-        tmp = World::getInstance().getPeriode()->FindElement(Z);
-        if(!tmp){
-          Log() << Verbose(0) << "No element with this atomic number!" << endl;
-          badInput = true;
-        }
-      }
-      continue;
-    }
-    else{
-      cin.clear();
-    }
-
-    // Try to read as shorthand
-    // the last buffer content was not removed, so we read the
-    // same thing again, this time as a string
-    string shorthand;
-    cin >> shorthand;
-    if(!cin.fail()){
-      if(shorthand.empty()){
-        aborted = true;
-      }
-      else{
-        tmp = World::getInstance().getPeriode()->FindElement(shorthand.c_str());
-        if(!tmp){
-          Log() << Verbose(0) << "No element with this shorthand!" << endl;
-          badInput = true;
-        }
-      }
-    }
-    else{
-      Log() << Verbose(0) << "Could not read input. Try Again." << endl;
-      cin.clear();
-      cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
-      badInput = true;
-    }
-
-  }while(badInput);
-  cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
-  return !aborted;
-}
Index: src/UIElements/TextDialog.hpp
===================================================================
--- src/UIElements/TextDialog.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ 	(revision )
@@ -1,110 +1,0 @@
-/*
- * TextDialog.hpp
- *
- *  Created on: Jan 5, 2010
- *      Author: crueger
- */
-
-#ifndef TEXTDIALOG_HPP_
-#define TEXTDIALOG_HPP_
-
-#include <string>
-
-#include "UIElements/Dialog.hpp"
-
-class atom;
-class element;
-class molecule;
-class Vector;
-
-class TextDialog : public Dialog
-{
-public:
-  TextDialog();
-  virtual ~TextDialog();
-
-  virtual void queryEmpty(const char *, std::string = "");
-  virtual void queryBoolean(const char *, bool *, std::string = "");
-  virtual void queryInt(const char *, int *, std::string = "");
-  virtual void queryString(const char*, std::string *, std::string = "");
-  virtual void queryDouble(const char*, double*, std::string = "");
-  virtual void queryAtom(const char*,atom**,std::string = "");
-  virtual void queryMolecule(const char*,molecule**,std::string = "");
-  virtual void queryVector(const char*,Vector *,const double * const,bool, std::string = "");
-  virtual void queryBox(const char*,double ** const, std::string = "");
-  virtual void queryElement(const char*,const element **, std::string = "");
-
-protected:
-  // specialized stuff for text queries
-  class EmptyTextQuery : public Dialog::EmptyQuery {
-  public:
-    EmptyTextQuery(std::string title, std::string _description = NULL);
-    virtual ~EmptyTextQuery();
-    virtual bool handle();
-  };
-
-  class BooleanTextQuery : public Dialog::BooleanQuery {
-  public:
-    BooleanTextQuery(std::string title, bool *_target, std::string _description = NULL);
-    virtual ~BooleanTextQuery();
-    virtual bool handle();
-  };
-
-  class IntTextQuery : public Dialog::IntQuery {
-  public:
-    IntTextQuery(std::string title, int *_target, std::string _description = NULL);
-    virtual ~IntTextQuery();
-    virtual bool handle();
-  };
-
-  class DoubleTextQuery : public Dialog::DoubleQuery {
-  public:
-    DoubleTextQuery(std::string title, double *_target, std::string _description = NULL);
-    virtual ~DoubleTextQuery();
-    virtual bool handle();
-  };
-
-  class StringTextQuery : public Dialog::StringQuery {
-  public:
-    StringTextQuery(std::string title, std::string *_target, std::string _description = NULL);
-    virtual ~StringTextQuery();
-    virtual bool handle();
-  };
-
-  class AtomTextQuery : public Dialog::AtomQuery {
-  public:
-    AtomTextQuery(std::string title, atom **_target, std::string _description = NULL);
-    virtual ~AtomTextQuery();
-    virtual bool handle();
-  };
-
-  class MoleculeTextQuery : public Dialog::MoleculeQuery {
-  public:
-    MoleculeTextQuery(std::string title, molecule **_target, std::string _description = NULL);
-    virtual ~MoleculeTextQuery();
-    virtual bool handle();
-  };
-
-  class VectorTextQuery : public Dialog::VectorQuery {
-  public:
-    VectorTextQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check, std::string _description = NULL);
-    virtual ~VectorTextQuery();
-    virtual bool handle();
-  };
-
-  class BoxTextQuery : public Dialog::BoxQuery {
-  public:
-    BoxTextQuery(std::string title,double ** const _cellSize, std::string _description = NULL);
-    virtual ~BoxTextQuery();
-    virtual bool handle();
-  };
-
-  class ElementTextQuery : public Dialog::ElementQuery {
-  public:
-    ElementTextQuery(std::string title, const element **_target, std::string _description = NULL);
-    virtual ~ElementTextQuery();
-    virtual bool handle();
-  };
-};
-
-#endif /* TEXTDIALOG_HPP_ */
Index: src/UIElements/TextStatusIndicator.cpp
===================================================================
--- src/UIElements/TextStatusIndicator.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ 	(revision )
@@ -1,56 +1,0 @@
-/*
- * TextStatusIndicator.cpp
- *
- *  Created on: Feb 18, 2010
- *      Author: crueger
- */
-
-#include "TextStatusIndicator.hpp"
-
-#include <iostream>
-
-#include "Actions/Process.hpp"
-
-using namespace std;
-
-TextStatusIndicator::TextStatusIndicator()
-{
-  Process::AddObserver(this);
-}
-
-TextStatusIndicator::~TextStatusIndicator()
-{
-  Process::RemoveObserver(this);
-}
-
-void TextStatusIndicator::update(Observable *subject){
-  Process *proc;
-  // we are only observing Processes
-  if((proc=dynamic_cast<Process*>(subject))){
-    // see what kind of progress we have to display
-    if(proc->getMaxSteps()>0){
-      if(!proc->doesStop()){
-        cout << "Busy (" << proc->getName() << ") ";
-        // we can show a percentage done
-        cout << (int)proc->getDoneRatio() << "% done" << endl;
-      }
-    }
-    else{
-      // we only show some kind of busy animation
-      if(proc->doesStart()){
-        cout << "Busy (" << proc->getName() << ")";
-      }
-      if(!proc->doesStop()){
-        cout << ".";
-      }
-      else {
-        cout << endl;
-      }
-    }
-  }
-}
-
-void TextStatusIndicator::subjectKilled(Observable *subject){
-
-}
-
Index: src/UIElements/TextStatusIndicator.hpp
===================================================================
--- src/UIElements/TextStatusIndicator.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ 	(revision )
@@ -1,26 +1,0 @@
-/*
- * TextStatusIndicator.hpp
- *
- *  Created on: Feb 18, 2010
- *      Author: crueger
- */
-
-#ifndef TEXTSTATUSINDICATOR_HPP_
-#define TEXTSTATUSINDICATOR_HPP_
-
-#include "Patterns/Observer.hpp"
-
-class TextStatusIndicator : public Observer
-{
-public:
-  TextStatusIndicator();
-  virtual ~TextStatusIndicator();
-
-  void update(Observable *subject);
-  void subjectKilled(Observable *subject);
-
-private:
-
-};
-
-#endif /* TEXTSTATUSINDICATOR_HPP_ */
Index: src/UIElements/TextUI/TextDialog.cpp
===================================================================
--- src/UIElements/TextUI/TextDialog.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/TextUI/TextDialog.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,344 @@
+/*
+ * TextDialog.cpp
+ *
+ *  Created on: Jan 5, 2010
+ *      Author: crueger
+ */
+
+#include <iostream>
+
+#include <Descriptors/AtomDescriptor.hpp>
+#include <Descriptors/AtomIdDescriptor.hpp>
+#include <Descriptors/MoleculeDescriptor.hpp>
+#include <Descriptors/MoleculeIdDescriptor.hpp>
+#include "TextUI/TextDialog.hpp"
+
+#include "World.hpp"
+#include "periodentafel.hpp"
+#include "log.hpp"
+#include "verbose.hpp"
+
+#include "atom.hpp"
+#include "element.hpp"
+#include "molecule.hpp"
+#include "vector.hpp"
+
+using namespace std;
+
+
+TextDialog::TextDialog()
+{
+}
+
+TextDialog::~TextDialog()
+{
+}
+
+
+void TextDialog::queryEmpty(const char* title, string description){
+  registerQuery(new EmptyTextQuery(title,description));
+}
+
+void TextDialog::queryBoolean(const char* title, bool* target, string description){
+  registerQuery(new BooleanTextQuery(title,target,description));
+}
+
+void TextDialog::queryInt(const char* title, int* target, string description){
+  registerQuery(new IntTextQuery(title,target,description));
+}
+
+void TextDialog::queryDouble(const char* title, double* target, string description){
+  registerQuery(new DoubleTextQuery(title,target,description));
+}
+
+void TextDialog::queryString(const char* title, string* target, string description){
+  registerQuery(new StringTextQuery(title,target,description));
+}
+
+void TextDialog::queryAtom(const char* title, atom **target, string description) {
+  registerQuery(new AtomTextQuery(title,target,description));
+}
+
+void TextDialog::queryMolecule(const char* title, molecule **target, string description) {
+  registerQuery(new MoleculeTextQuery(title,target,description));
+}
+
+void TextDialog::queryVector(const char* title, Vector *target,const double *const cellSize, bool check, string description) {
+  registerQuery(new VectorTextQuery(title,target,cellSize,check,description));
+}
+
+void TextDialog::queryBox(const char* title,double ** const cellSize, string description) {
+  registerQuery(new BoxTextQuery(title,cellSize,description));
+}
+
+void TextDialog::queryElement(const char* title, const element **target, string description){
+  registerQuery(new ElementTextQuery(title,target,description));
+}
+
+/************************** Query Infrastructure ************************/
+
+TextDialog::EmptyTextQuery::EmptyTextQuery(string title, std::string _description) :
+    Dialog::EmptyQuery(title,_description)
+{}
+
+TextDialog::EmptyTextQuery::~EmptyTextQuery() {}
+
+bool TextDialog::EmptyTextQuery::handle() {
+  cout << "Message of " << getTitle() << ":\n" << getDescription() << "\n";
+  return true;
+}
+
+TextDialog::IntTextQuery::IntTextQuery(string title, int * _target, std::string _description) :
+    Dialog::IntQuery(title,_target,_description)
+{}
+
+TextDialog::IntTextQuery::~IntTextQuery() {}
+
+bool TextDialog::IntTextQuery::handle() {
+  bool badInput = false;
+  do{
+    badInput = false;
+    Log() << Verbose(0) << getTitle();
+    cin >> tmp;
+    if(cin.fail()){
+      badInput=true;
+      cin.clear();
+      cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
+      Log() << Verbose(0) << "Input was not a number!" << endl;
+    }
+  } while(badInput);
+  // clear the input buffer of anything still in the line
+  cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
+  return true;
+}
+
+TextDialog::BooleanTextQuery::BooleanTextQuery(string title, bool * _target, std::string _description) :
+    Dialog::BooleanQuery(title,_target,_description)
+{}
+
+TextDialog::BooleanTextQuery::~BooleanTextQuery() {}
+
+bool TextDialog::BooleanTextQuery::handle() {
+  bool badInput = false;
+  char input = ' ';
+  do{
+    badInput = false;
+    Log() << Verbose(0) << getTitle();
+    cin >> input;
+    if ((input == 'y' ) || (input == 'Y')) {
+      tmp = true;
+    } else if ((input == 'n' ) || (input == 'N')) {
+      tmp = false;
+    } else {
+      badInput=true;
+      cin.clear();
+      cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
+      Log() << Verbose(0) << "Input was not of [yYnN]!" << endl;
+    }
+  } while(badInput);
+  // clear the input buffer of anything still in the line
+  cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
+  return true;
+}
+
+TextDialog::StringTextQuery::StringTextQuery(string title,string *_target, std::string _description) :
+    Dialog::StringQuery(title,_target,_description)
+{}
+
+TextDialog::StringTextQuery::~StringTextQuery() {}
+
+bool TextDialog::StringTextQuery::handle() {
+  Log() << Verbose(0) << getTitle();
+  getline(cin,tmp);
+  return true;
+}
+
+TextDialog::DoubleTextQuery::DoubleTextQuery(string title,double *_target, std::string _description) :
+    Dialog::DoubleQuery(title,_target,_description)
+{}
+
+TextDialog::DoubleTextQuery::~DoubleTextQuery() {}
+
+bool TextDialog::DoubleTextQuery::handle() {
+  bool badInput = false;
+  do{
+    badInput = false;
+    Log() << Verbose(0) << getTitle();
+    cin >> tmp;
+    if(cin.fail()){
+      badInput = true;
+      cin.clear();
+      cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
+      Log() << Verbose(0) << "Input was not a number!" << endl;
+    }
+  }while(badInput);
+  cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
+  return true;
+}
+
+TextDialog::AtomTextQuery::AtomTextQuery(string title, atom **_target, std::string _description) :
+    Dialog::AtomQuery(title,_target,_description)
+{}
+
+TextDialog::AtomTextQuery::~AtomTextQuery() {}
+
+bool TextDialog::AtomTextQuery::handle() {
+  int idxOfAtom=0;
+  bool badInput = false;
+  do{
+    badInput = false;
+    Log() << Verbose(0) << getTitle();
+    cin >> idxOfAtom;
+    if(cin.fail()){
+      badInput = true;
+      cin.clear();
+      cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
+      Log() << Verbose(0) << "Input was not a number!" << endl;
+      continue;
+    }
+
+    tmp = World::getInstance().getAtom(AtomById(idxOfAtom));
+    if(!tmp && idxOfAtom!=-1){
+      Log() << Verbose(0) << "Invalid Atom Index" << endl;
+      badInput = true;
+    }
+
+  } while(badInput);
+  cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
+  return (idxOfAtom!=-1);
+}
+
+TextDialog::MoleculeTextQuery::MoleculeTextQuery(string title, molecule **_target, std::string _description) :
+    Dialog::MoleculeQuery(title,_target,_description)
+{}
+
+TextDialog::MoleculeTextQuery::~MoleculeTextQuery() {}
+
+bool TextDialog::MoleculeTextQuery::handle() {
+  int idxOfMol=0;
+  bool badInput = false;
+  do{
+    badInput = false;
+    Log() << Verbose(0) << getTitle();
+    cin >> idxOfMol;
+    if(cin.fail()){
+      badInput = true;
+      cin.clear();
+      cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
+      Log() << Verbose(0) << "Input was not a number!" << endl;
+      continue;
+    }
+
+    tmp = World::getInstance().getMolecule(MoleculeById(idxOfMol));
+    if(!tmp && idxOfMol!=-1){
+      Log() << Verbose(0) << "Invalid Molecule Index" << endl;
+      badInput = true;
+    }
+
+  } while(badInput);
+  cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
+  return (idxOfMol!=-1);
+}
+
+TextDialog::VectorTextQuery::VectorTextQuery(std::string title, Vector *_target, const double *const _cellSize, bool _check, std::string _description) :
+    Dialog::VectorQuery(title,_target,_cellSize,_check,_description)
+{}
+
+TextDialog::VectorTextQuery::~VectorTextQuery()
+{}
+
+bool TextDialog::VectorTextQuery::handle() {
+  Log() << Verbose(0) << getTitle();
+
+  char coords[3] = {'x','y','z'};
+  int j = -1;
+  for (int i=0;i<3;i++) {
+    j += i+1;
+    do {
+      Log() << Verbose(0) << coords[i] << "[0.." << cellSize[j] << "]: ";
+      cin >> (*tmp)[i];
+    } while ((((*tmp)[i] < 0) || ((*tmp)[i] >= cellSize[j])) && (check));
+  }
+  return true;
+}
+
+TextDialog::BoxTextQuery::BoxTextQuery(std::string title, double ** const _cellSize, std::string _description) :
+    Dialog::BoxQuery(title,_cellSize,_description)
+{}
+
+TextDialog::BoxTextQuery::~BoxTextQuery()
+{}
+
+bool TextDialog::BoxTextQuery::handle() {
+  Log() << Verbose(0) << getTitle();
+
+  std::string coords[6] = {"xx","xy","xz", "yy", "yz", "zz"};
+  for (int i=0;i<6;i++) {
+    Log() << Verbose(0) << coords[i] << ": ";
+    cin >> tmp[i];
+  }
+  return true;
+}
+
+TextDialog::ElementTextQuery::ElementTextQuery(std::string title, const element **target, std::string _description) :
+    Dialog::ElementQuery(title,target,_description)
+{}
+
+TextDialog::ElementTextQuery::~ElementTextQuery()
+{}
+
+bool TextDialog::ElementTextQuery::handle() {
+  bool badInput=false;
+  bool aborted = false;
+  do{
+    badInput = false;
+    Log() << Verbose(0) << getTitle();
+
+    // try to read as Atomic number
+    int Z;
+    cin >> Z;
+    if(!cin.fail()){
+      if(Z==-1){
+        aborted = true;
+      }
+      else{
+        tmp = World::getInstance().getPeriode()->FindElement(Z);
+        if(!tmp){
+          Log() << Verbose(0) << "No element with this atomic number!" << endl;
+          badInput = true;
+        }
+      }
+      continue;
+    }
+    else{
+      cin.clear();
+    }
+
+    // Try to read as shorthand
+    // the last buffer content was not removed, so we read the
+    // same thing again, this time as a string
+    string shorthand;
+    cin >> shorthand;
+    if(!cin.fail()){
+      if(shorthand.empty()){
+        aborted = true;
+      }
+      else{
+        tmp = World::getInstance().getPeriode()->FindElement(shorthand.c_str());
+        if(!tmp){
+          Log() << Verbose(0) << "No element with this shorthand!" << endl;
+          badInput = true;
+        }
+      }
+    }
+    else{
+      Log() << Verbose(0) << "Could not read input. Try Again." << endl;
+      cin.clear();
+      cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
+      badInput = true;
+    }
+
+  }while(badInput);
+  cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
+  return !aborted;
+}
Index: src/UIElements/TextUI/TextDialog.hpp
===================================================================
--- src/UIElements/TextUI/TextDialog.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/TextUI/TextDialog.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,110 @@
+/*
+ * TextDialog.hpp
+ *
+ *  Created on: Jan 5, 2010
+ *      Author: crueger
+ */
+
+#ifndef TEXTDIALOG_HPP_
+#define TEXTDIALOG_HPP_
+
+#include <string>
+
+#include "Dialog.hpp"
+
+class atom;
+class element;
+class molecule;
+class Vector;
+
+class TextDialog : public Dialog
+{
+public:
+  TextDialog();
+  virtual ~TextDialog();
+
+  virtual void queryEmpty(const char *, std::string = "");
+  virtual void queryBoolean(const char *, bool *, std::string = "");
+  virtual void queryInt(const char *, int *, std::string = "");
+  virtual void queryString(const char*, std::string *, std::string = "");
+  virtual void queryDouble(const char*, double*, std::string = "");
+  virtual void queryAtom(const char*,atom**,std::string = "");
+  virtual void queryMolecule(const char*,molecule**,std::string = "");
+  virtual void queryVector(const char*,Vector *,const double * const,bool, std::string = "");
+  virtual void queryBox(const char*,double ** const, std::string = "");
+  virtual void queryElement(const char*,const element **, std::string = "");
+
+protected:
+  // specialized stuff for text queries
+  class EmptyTextQuery : public Dialog::EmptyQuery {
+  public:
+    EmptyTextQuery(std::string title, std::string _description = NULL);
+    virtual ~EmptyTextQuery();
+    virtual bool handle();
+  };
+
+  class BooleanTextQuery : public Dialog::BooleanQuery {
+  public:
+    BooleanTextQuery(std::string title, bool *_target, std::string _description = NULL);
+    virtual ~BooleanTextQuery();
+    virtual bool handle();
+  };
+
+  class IntTextQuery : public Dialog::IntQuery {
+  public:
+    IntTextQuery(std::string title, int *_target, std::string _description = NULL);
+    virtual ~IntTextQuery();
+    virtual bool handle();
+  };
+
+  class DoubleTextQuery : public Dialog::DoubleQuery {
+  public:
+    DoubleTextQuery(std::string title, double *_target, std::string _description = NULL);
+    virtual ~DoubleTextQuery();
+    virtual bool handle();
+  };
+
+  class StringTextQuery : public Dialog::StringQuery {
+  public:
+    StringTextQuery(std::string title, std::string *_target, std::string _description = NULL);
+    virtual ~StringTextQuery();
+    virtual bool handle();
+  };
+
+  class AtomTextQuery : public Dialog::AtomQuery {
+  public:
+    AtomTextQuery(std::string title, atom **_target, std::string _description = NULL);
+    virtual ~AtomTextQuery();
+    virtual bool handle();
+  };
+
+  class MoleculeTextQuery : public Dialog::MoleculeQuery {
+  public:
+    MoleculeTextQuery(std::string title, molecule **_target, std::string _description = NULL);
+    virtual ~MoleculeTextQuery();
+    virtual bool handle();
+  };
+
+  class VectorTextQuery : public Dialog::VectorQuery {
+  public:
+    VectorTextQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check, std::string _description = NULL);
+    virtual ~VectorTextQuery();
+    virtual bool handle();
+  };
+
+  class BoxTextQuery : public Dialog::BoxQuery {
+  public:
+    BoxTextQuery(std::string title,double ** const _cellSize, std::string _description = NULL);
+    virtual ~BoxTextQuery();
+    virtual bool handle();
+  };
+
+  class ElementTextQuery : public Dialog::ElementQuery {
+  public:
+    ElementTextQuery(std::string title, const element **_target, std::string _description = NULL);
+    virtual ~ElementTextQuery();
+    virtual bool handle();
+  };
+};
+
+#endif /* TEXTDIALOG_HPP_ */
Index: src/UIElements/TextUI/TextStatusIndicator.cpp
===================================================================
--- src/UIElements/TextUI/TextStatusIndicator.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/TextUI/TextStatusIndicator.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,56 @@
+/*
+ * TextStatusIndicator.cpp
+ *
+ *  Created on: Feb 18, 2010
+ *      Author: crueger
+ */
+
+#include "TextUI/TextStatusIndicator.hpp"
+
+#include <iostream>
+
+#include "Actions/Process.hpp"
+
+using namespace std;
+
+TextStatusIndicator::TextStatusIndicator()
+{
+  Process::AddObserver(this);
+}
+
+TextStatusIndicator::~TextStatusIndicator()
+{
+  Process::RemoveObserver(this);
+}
+
+void TextStatusIndicator::update(Observable *subject){
+  Process *proc;
+  // we are only observing Processes
+  if((proc=dynamic_cast<Process*>(subject))){
+    // see what kind of progress we have to display
+    if(proc->getMaxSteps()>0){
+      if(!proc->doesStop()){
+        cout << "Busy (" << proc->getName() << ") ";
+        // we can show a percentage done
+        cout << (int)proc->getDoneRatio() << "% done" << endl;
+      }
+    }
+    else{
+      // we only show some kind of busy animation
+      if(proc->doesStart()){
+        cout << "Busy (" << proc->getName() << ")";
+      }
+      if(!proc->doesStop()){
+        cout << ".";
+      }
+      else {
+        cout << endl;
+      }
+    }
+  }
+}
+
+void TextStatusIndicator::subjectKilled(Observable *subject){
+
+}
+
Index: src/UIElements/TextUI/TextStatusIndicator.hpp
===================================================================
--- src/UIElements/TextUI/TextStatusIndicator.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/TextUI/TextStatusIndicator.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,26 @@
+/*
+ * TextStatusIndicator.hpp
+ *
+ *  Created on: Feb 18, 2010
+ *      Author: crueger
+ */
+
+#ifndef TEXTSTATUSINDICATOR_HPP_
+#define TEXTSTATUSINDICATOR_HPP_
+
+#include "Patterns/Observer.hpp"
+
+class TextStatusIndicator : public Observer
+{
+public:
+  TextStatusIndicator();
+  virtual ~TextStatusIndicator();
+
+  void update(Observable *subject);
+  void subjectKilled(Observable *subject);
+
+private:
+
+};
+
+#endif /* TEXTSTATUSINDICATOR_HPP_ */
Index: src/UIElements/TextUI/TextUIFactory.cpp
===================================================================
--- src/UIElements/TextUI/TextUIFactory.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/TextUI/TextUIFactory.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,32 @@
+/*
+ * TextUIFactory.cpp
+ *
+ *  Created on: Jan 5, 2010
+ *      Author: crueger
+ */
+
+#include "TextUI/TextUIFactory.hpp"
+#include "TextUI/TextWindow.hpp"
+#include "TextUI/TextDialog.hpp"
+
+
+TextUIFactory::TextUIFactory()
+{
+  // TODO Auto-generated constructor stub
+
+}
+
+TextUIFactory::~TextUIFactory()
+{
+  // TODO Auto-generated destructor stub
+}
+
+
+Dialog* TextUIFactory::makeDialog() {
+  return new TextDialog();
+}
+
+MainWindow* TextUIFactory::makeMainWindow() {
+  return new TextWindow();
+}
+
Index: src/UIElements/TextUI/TextUIFactory.hpp
===================================================================
--- src/UIElements/TextUI/TextUIFactory.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/TextUI/TextUIFactory.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,27 @@
+/*
+ * TextUIFactory.h
+ *
+ *  Created on: Jan 5, 2010
+ *      Author: crueger
+ */
+
+#ifndef TEXTUIFACTORY_HPP_
+#define TEXTUIFACTORY_HPP_
+
+#include "UIFactory.hpp"
+
+class TextUIFactory : public UIFactory
+{
+friend class UIFactory;
+
+public:
+  virtual ~TextUIFactory();
+
+  virtual Dialog* makeDialog();
+  virtual MainWindow* makeMainWindow();
+
+protected:
+  TextUIFactory();
+};
+
+#endif /* TEXTUIFACTORY_HPP_ */
Index: src/UIElements/TextUI/TextWindow.cpp
===================================================================
--- src/UIElements/TextUI/TextWindow.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/TextUI/TextWindow.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,158 @@
+/*
+ * TextWindow.cpp
+ *
+ *  Created on: Jan 7, 2010
+ *      Author: crueger
+ */
+
+#include "TextUI/TextWindow.hpp"
+
+#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"
+#include "Menu/ActionMenuItem.hpp"
+#include "Menu/SeperatorItem.hpp"
+#include "Menu/DisplayMenuItem.hpp"
+#include "Menu/SubMenuItem.hpp"
+#include "TextUI/TextStatusIndicator.hpp"
+#include "Actions/MethodAction.hpp"
+#include "Actions/MoleculeAction/ChangeNameAction.hpp"
+#include "Actions/ErrorAction.hpp"
+#include "Actions/ActionRegistry.hpp"
+#include "Views/StreamStringView.hpp"
+#include "Views/MethodStringView.hpp"
+
+#include <iostream>
+
+using namespace std;
+
+// TODO: see what code can be moved to a base class for Graphic and Text Windows
+TextWindow::TextWindow()
+{
+  MoleculeListClass *molecules = World::getInstance().getMolecules();
+  config *configuration = World::getInstance().getConfig();
+  periodentafel *periode = World::getInstance().getPeriode();
+  char *ConfigFileName = NULL;
+  old_menu = new oldmenu;
+
+  // build the main menu
+  main_menu = new TextMenu(Log() << Verbose(0), "Main Menu");
+
+  moleculeView = new StreamStringView(boost::bind(&MoleculeListClass::Enumerate,molecules,_1));
+  new DisplayMenuItem(main_menu,moleculeView,"Molecule List");
+
+  new SeperatorItem(main_menu);
+
+  Action* undoAction = ActionRegistry::getInstance().getActionByName("Undo");
+  new ActionMenuItem('u',"Undo last operation",main_menu,undoAction);
+
+  Action* redoAction = ActionRegistry::getInstance().getActionByName("Redo");
+  new ActionMenuItem('r',"Redo last operation",main_menu,redoAction);
+
+  new SeperatorItem(main_menu);
+
+  Action *setMoleculeAction = new MethodAction("setMoleculeAction",boost::bind(&MoleculeListClass::flipChosen,molecules));
+  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);
+
+  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);
+
+  Action *mergeMoleculeAction = new MethodAction("mergeMoleculeAction",boost::bind(&oldmenu::MergeMolecules,old_menu,periode, molecules));
+  new ActionMenuItem('M',"Merge molecules",main_menu,mergeMoleculeAction);
+
+  Action *manipulateAtomsAction = new MethodAction("manipulateAtomsAction",boost::bind(&oldmenu::ManipulateAtoms,old_menu,periode, molecules, configuration));
+  new ActionMenuItem('m',"manipulate atoms",main_menu,manipulateAtomsAction);
+
+  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));
+  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);
+
+  // Add status indicators etc...
+
+  statusIndicator = new TextStatusIndicator();
+}
+
+TextWindow::~TextWindow()
+{
+  delete old_menu;
+  delete quitAction;
+  delete moleculeView;
+  delete statusIndicator;
+  delete main_menu;
+}
+
+void TextWindow::display() {
+  main_menu->display();
+}
+
+void TextWindow::populateEditMoleculesMenu(Menu* editMoleculesMenu)
+{
+  MoleculeListClass *molecules = World::getInstance().getMolecules();
+  periodentafel *periode = World::getInstance().getPeriode();
+
+  // 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);
+
+}
Index: src/UIElements/TextUI/TextWindow.hpp
===================================================================
--- src/UIElements/TextUI/TextWindow.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/TextUI/TextWindow.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,43 @@
+/*
+ * TextWindow.hpp
+ *
+ *  Created on: Jan 7, 2010
+ *      Author: crueger
+ */
+
+#ifndef TEXTWINDOW_HPP_
+#define TEXTWINDOW_HPP_
+
+#include "MainWindow.hpp"
+
+class TextMenu;
+class Action;
+class oldmenu;
+class StringView;
+class TextStatusIndicator;
+
+
+class TextWindow : public MainWindow
+{
+public:
+  TextWindow();
+  virtual ~TextWindow();
+
+  virtual void display();
+private:
+  // populaters
+  void populateEditMoleculesMenu(Menu* editMoleculesMenu);
+
+  TextMenu *main_menu;
+
+  // some actions only needed in textMenus
+  Action *quitAction;
+  // all views that are contained in the main Menu
+  StringView *moleculeView;
+  TextStatusIndicator *statusIndicator;
+
+  // This class still contains a lot of scattered functionality
+  oldmenu *old_menu;
+};
+
+#endif /* TEXTWINDOW_HPP_ */
Index: src/UIElements/TextUIFactory.cpp
===================================================================
--- src/UIElements/TextUIFactory.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ 	(revision )
@@ -1,32 +1,0 @@
-/*
- * TextUIFactory.cpp
- *
- *  Created on: Jan 5, 2010
- *      Author: crueger
- */
-
-#include "UIElements/TextUIFactory.hpp"
-#include "UIElements/TextWindow.hpp"
-#include "UIElements/TextDialog.hpp"
-
-
-TextUIFactory::TextUIFactory()
-{
-  // TODO Auto-generated constructor stub
-
-}
-
-TextUIFactory::~TextUIFactory()
-{
-  // TODO Auto-generated destructor stub
-}
-
-
-Dialog* TextUIFactory::makeDialog() {
-  return new TextDialog();
-}
-
-MainWindow* TextUIFactory::makeMainWindow() {
-  return new TextWindow();
-}
-
Index: src/UIElements/TextUIFactory.hpp
===================================================================
--- src/UIElements/TextUIFactory.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ 	(revision )
@@ -1,27 +1,0 @@
-/*
- * TextUIFactory.h
- *
- *  Created on: Jan 5, 2010
- *      Author: crueger
- */
-
-#ifndef TEXTUIFACTORY_HPP_
-#define TEXTUIFACTORY_HPP_
-
-#include "UIElements/UIFactory.hpp"
-
-class TextUIFactory : public UIFactory
-{
-friend class UIFactory;
-
-public:
-  virtual ~TextUIFactory();
-
-  virtual Dialog* makeDialog();
-  virtual MainWindow* makeMainWindow();
-
-protected:
-  TextUIFactory();
-};
-
-#endif /* TEXTUIFACTORY_HPP_ */
Index: src/UIElements/TextWindow.cpp
===================================================================
--- src/UIElements/TextWindow.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ 	(revision )
@@ -1,158 +1,0 @@
-/*
- * TextWindow.cpp
- *
- *  Created on: Jan 7, 2010
- *      Author: crueger
- */
-
-#include "UIElements/TextWindow.hpp"
-
-#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 "memoryusageobserverunittest.hpp"
-#include "molecule.hpp"
-#include "periodentafel.hpp"
-#include "World.hpp"
-
-#include "Legacy/oldmenu.hpp"
-
-#include "Menu/Menu.hpp"
-#include "Menu/TextMenu.hpp"
-#include "Menu/ActionMenuItem.hpp"
-#include "Menu/SeperatorItem.hpp"
-#include "Menu/DisplayMenuItem.hpp"
-#include "Menu/SubMenuItem.hpp"
-#include "UIElements/TextStatusIndicator.hpp"
-#include "Actions/MethodAction.hpp"
-#include "Actions/MoleculeAction/ChangeNameAction.hpp"
-#include "Actions/ErrorAction.hpp"
-#include "Actions/ActionRegistry.hpp"
-#include "Views/StreamStringView.hpp"
-#include "Views/MethodStringView.hpp"
-
-#include <iostream>
-
-using namespace std;
-
-// TODO: see what code can be moved to a base class for Graphic and Text Windows
-TextWindow::TextWindow()
-{
-  MoleculeListClass *molecules = World::getInstance().getMolecules();
-  config *configuration = World::getInstance().getConfig();
-  periodentafel *periode = World::getInstance().getPeriode();
-  char *ConfigFileName = NULL;
-  old_menu = new oldmenu;
-
-  // build the main menu
-  main_menu = new TextMenu(Log() << Verbose(0), "Main Menu");
-
-  moleculeView = new StreamStringView(boost::bind(&MoleculeListClass::Enumerate,molecules,_1));
-  new DisplayMenuItem(main_menu,moleculeView,"Molecule List");
-
-  new SeperatorItem(main_menu);
-
-  Action* undoAction = ActionRegistry::getInstance().getActionByName("Undo");
-  new ActionMenuItem('u',"Undo last operation",main_menu,undoAction);
-
-  Action* redoAction = ActionRegistry::getInstance().getActionByName("Redo");
-  new ActionMenuItem('r',"Redo last operation",main_menu,redoAction);
-
-  new SeperatorItem(main_menu);
-
-  Action *setMoleculeAction = new MethodAction("setMoleculeAction",boost::bind(&MoleculeListClass::flipChosen,molecules));
-  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);
-
-  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);
-
-  Action *mergeMoleculeAction = new MethodAction("mergeMoleculeAction",boost::bind(&oldmenu::MergeMolecules,old_menu,periode, molecules));
-  new ActionMenuItem('M',"Merge molecules",main_menu,mergeMoleculeAction);
-
-  Action *manipulateAtomsAction = new MethodAction("manipulateAtomsAction",boost::bind(&oldmenu::ManipulateAtoms,old_menu,periode, molecules, configuration));
-  new ActionMenuItem('m',"manipulate atoms",main_menu,manipulateAtomsAction);
-
-  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));
-  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);
-
-  // Add status indicators etc...
-
-  statusIndicator = new TextStatusIndicator();
-}
-
-TextWindow::~TextWindow()
-{
-  delete old_menu;
-  delete quitAction;
-  delete moleculeView;
-  delete statusIndicator;
-  delete main_menu;
-}
-
-void TextWindow::display() {
-  main_menu->display();
-}
-
-void TextWindow::populateEditMoleculesMenu(Menu* editMoleculesMenu)
-{
-  MoleculeListClass *molecules = World::getInstance().getMolecules();
-  periodentafel *periode = World::getInstance().getPeriode();
-
-  // 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);
-
-}
Index: src/UIElements/TextWindow.hpp
===================================================================
--- src/UIElements/TextWindow.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/*
- * TextWindow.hpp
- *
- *  Created on: Jan 7, 2010
- *      Author: crueger
- */
-
-#ifndef TEXTWINDOW_HPP_
-#define TEXTWINDOW_HPP_
-
-#include "UIElements/MainWindow.hpp"
-
-class TextMenu;
-class Action;
-class oldmenu;
-class StringView;
-class TextStatusIndicator;
-
-
-class TextWindow : public MainWindow
-{
-public:
-  TextWindow();
-  virtual ~TextWindow();
-
-  virtual void display();
-private:
-  // populaters
-  void populateEditMoleculesMenu(Menu* editMoleculesMenu);
-
-  TextMenu *main_menu;
-
-  // some actions only needed in textMenus
-  Action *quitAction;
-  // all views that are contained in the main Menu
-  StringView *moleculeView;
-  TextStatusIndicator *statusIndicator;
-
-  // This class still contains a lot of scattered functionality
-  oldmenu *old_menu;
-};
-
-#endif /* TEXTWINDOW_HPP_ */
Index: src/UIElements/UIFactory.cpp
===================================================================
--- src/UIElements/UIFactory.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ src/UIElements/UIFactory.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -9,9 +9,9 @@
 #include <cassert>
 #include "Patterns/Singleton_impl.hpp"
-#include "UIElements/UIFactory.hpp"
+#include "UIFactory.hpp"
 
 // all factories that can be used:
-#include "UIElements/TextUIFactory.hpp"
-#include "UIElements/CommandLineUIFactory.hpp"
+#include "TextUI/TextUIFactory.hpp"
+#include "CommandLineUI/CommandLineUIFactory.hpp"
 
 UIFactory::UIFactory()
Index: src/UIElements/Views/MethodStringView.cpp
===================================================================
--- src/UIElements/Views/MethodStringView.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/Views/MethodStringView.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,28 @@
+/*
+ * MethodStringView.cpp
+ *
+ *  Created on: Dec 14, 2009
+ *      Author: crueger
+ */
+
+#include "MethodStringView.hpp"
+
+using namespace std;
+
+MethodStringView::MethodStringView(boost::function<string()> _displayMethod) :
+StringView(),
+displayMethod(_displayMethod)
+{
+  // TODO Auto-generated constructor stub
+
+}
+
+MethodStringView::~MethodStringView()
+{
+  // TODO Auto-generated destructor stub
+}
+
+
+const string MethodStringView::toString() {
+  return displayMethod();
+}
Index: src/UIElements/Views/MethodStringView.hpp
===================================================================
--- src/UIElements/Views/MethodStringView.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/Views/MethodStringView.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,30 @@
+/*
+ * MethodStringView.hpp
+ *
+ *  Created on: Dec 14, 2009
+ *      Author: crueger
+ */
+
+#ifndef METHODSTRINGVIEW_HPP_
+#define METHODSTRINGVIEW_HPP_
+
+#include <boost/function.hpp>
+
+#include "Views/StringView.hpp"
+
+/**
+ * Wrapper to produce a StringView from any method that returns a String.
+ */
+class MethodStringView : public StringView
+{
+public:
+  MethodStringView(boost::function<std::string()>);
+  virtual ~MethodStringView();
+
+  virtual const std::string toString();
+
+private:
+  boost::function<std::string()> displayMethod;
+};
+
+#endif /* METHODSTRINGVIEW_HPP_ */
Index: src/UIElements/Views/StreamStringView.cpp
===================================================================
--- src/UIElements/Views/StreamStringView.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/Views/StreamStringView.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,27 @@
+/*
+ * StreamStringView.cpp
+ *
+ *  Created on: Dec 14, 2009
+ *      Author: crueger
+ */
+
+#include <sstream>
+#include <iostream>
+
+#include "StreamStringView.hpp"
+
+using namespace std;
+
+StreamStringView::StreamStringView(boost::function<void(ostream *)> _displayMethod) :
+StringView(),
+displayMethod(_displayMethod)
+{}
+
+StreamStringView::~StreamStringView()
+{}
+
+const string StreamStringView::toString() {
+  stringstream s;
+  displayMethod(dynamic_cast<ostream *>(&s));
+  return s.str();
+}
Index: src/UIElements/Views/StreamStringView.hpp
===================================================================
--- src/UIElements/Views/StreamStringView.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/Views/StreamStringView.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,36 @@
+/*
+ * StreamStringView.hpp
+ *
+ *  Created on: Dec 14, 2009
+ *      Author: crueger
+ */
+
+#ifndef STREAMSTRINGVIEW_HPP_
+#define STREAMSTRINGVIEW_HPP_
+
+#include <boost/function.hpp>
+#include <iostream>
+
+#include "Views/StringView.hpp"
+
+/**
+ * Wrapper to produce a StringView from any method that uses a stream to display something.
+ *
+ * The function is called with a stringstream which then is turned into a string later.
+ *
+ * Caveat: Make sure the stream passed to the method is actually used. Some methods seem to use a stream parameter for
+ * legacy reasons. These methods internally use the "Log() << Verbose()" mechanism instead of the stream.
+ */
+class StreamStringView : public StringView
+{
+public:
+  StreamStringView(boost::function<void(std::ostream *)>);
+  virtual ~StreamStringView();
+
+  virtual const std::string toString();
+
+private:
+  boost::function<void(std::ostream *)> displayMethod;
+};
+
+#endif /* STREAMSTRINGVIEW_HPP_ */
Index: src/UIElements/Views/StringView.cpp
===================================================================
--- src/UIElements/Views/StringView.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/Views/StringView.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,19 @@
+/*
+ * StringView.cpp
+ *
+ *  Created on: Dec 14, 2009
+ *      Author: crueger
+ */
+
+#include "StringView.hpp"
+
+StringView::StringView()
+{
+  // TODO Auto-generated constructor stub
+
+}
+
+StringView::~StringView()
+{
+  // TODO Auto-generated destructor stub
+}
Index: src/UIElements/Views/StringView.hpp
===================================================================
--- src/UIElements/Views/StringView.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/Views/StringView.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,29 @@
+/*
+ * StringView.hpp
+ *
+ *  Created on: Dec 14, 2009
+ *      Author: crueger
+ */
+
+#ifndef STRINGVIEW_HPP_
+#define STRINGVIEW_HPP_
+
+#include <string>
+#include "Views/View.hpp"
+
+/**
+ * View to show something as a string
+ *
+ * This View is used by calling the toString method.
+ * This View does *not* use the observer pattern.
+ */
+class StringView : public View
+{
+public:
+  StringView();
+  virtual ~StringView();
+
+  virtual const std::string toString()=0;
+};
+
+#endif /* STRINGVIEW_HPP_ */
Index: src/UIElements/Views/View.cpp
===================================================================
--- src/UIElements/Views/View.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/Views/View.cpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,19 @@
+/*
+ * View.cpp
+ *
+ *  Created on: Dec 14, 2009
+ *      Author: crueger
+ */
+
+#include "View.hpp"
+
+View::View()
+{
+  // TODO Auto-generated constructor stub
+
+}
+
+View::~View()
+{
+  // TODO Auto-generated destructor stub
+}
Index: src/UIElements/Views/View.hpp
===================================================================
--- src/UIElements/Views/View.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
+++ src/UIElements/Views/View.hpp	(revision 6670a97b53114ec805580d45caaa85f9b2b8731e)
@@ -0,0 +1,23 @@
+/*
+ * View.h
+ *
+ *  Created on: Dec 14, 2009
+ *      Author: crueger
+ */
+
+#ifndef VIEW_H_
+#define VIEW_H_
+
+/**
+ * Base class for all Views
+ *
+ * TODO: is this really needed or helpfull at all?
+ */
+class View
+{
+public:
+  View();
+  virtual ~View();
+};
+
+#endif /* VIEW_H_ */
