Index: src/Actions/Makefile.am
===================================================================
--- src/Actions/Makefile.am	(revision d0fbecbcdc3487bcfb490f5e818f9b9b96b5f4d2)
+++ src/Actions/Makefile.am	(revision 4f7f34ebe3887720f1827172d2ebad1e1c5ca8aa)
@@ -120,4 +120,6 @@
   WorldAction/CenterOnEdgeAction.cpp \
   WorldAction/ChangeBoxAction.cpp \
+  WorldAction/InputAction.cpp \
+  WorldAction/OutputAction.cpp \
   WorldAction/RemoveSphereOfAtomsAction.cpp \
   WorldAction/RepeatBoxAction.cpp \
@@ -131,4 +133,6 @@
   WorldAction/CenterOnEdgeAction.hpp \
   WorldAction/ChangeBoxAction.hpp \
+  WorldAction/InputAction.hpp \
+  WorldAction/OutputAction.hpp \
   WorldAction/RemoveSphereOfAtomsAction.hpp \
   WorldAction/RepeatBoxAction.hpp \
Index: src/Actions/MapOfActions.cpp
===================================================================
--- src/Actions/MapOfActions.cpp	(revision d0fbecbcdc3487bcfb490f5e818f9b9b96b5f4d2)
+++ src/Actions/MapOfActions.cpp	(revision 4f7f34ebe3887720f1827172d2ebad1e1c5ca8aa)
@@ -83,7 +83,9 @@
   DescriptionMap["fragment-mol"] = "create for a given molecule into fragments up to given order";
   DescriptionMap["help"] = "Give this help screen";
+  DescriptionMap["input"] = "specify input files";
   DescriptionMap["linear-interpolate"] = "linear interpolation in discrete steps between start and end position of a molecule";
   DescriptionMap["nonconvex-envelope"] = "create the non-convex envelope for a molecule";
   DescriptionMap["molecular-volume"] = "calculate the volume of a given molecule";
+  DescriptionMap["output"] = "specify output formats";
   DescriptionMap["pair-correlation"] = "pair correlation analysis between two elements, element and point or element and surface";
   DescriptionMap["parse-xyz"] = "parse xyz file into World";
@@ -190,4 +192,5 @@
   TypeMap["molecular-volume"] = Molecule;
   TypeMap["nonconvex-envelope"] = Molecule;
+  TypeMap["output"] = String;
   TypeMap["parse-xyz"] = String;
   TypeMap["pair-correlation"] = String;
@@ -262,7 +265,9 @@
   generic.insert("fragment-mol");
   generic.insert("help");
-	generic.insert("linear-interpolate");
+  generic.insert("input");
+  generic.insert("linear-interpolate");
 //  generic.insert("molecular-volume");
   generic.insert("nonconvex-envelope");
+  generic.insert("output");
 	generic.insert("pair-correlation");
 	generic.insert("parse-xyz");
Index: src/Actions/WorldAction/InputAction.cpp
===================================================================
--- src/Actions/WorldAction/InputAction.cpp	(revision 4f7f34ebe3887720f1827172d2ebad1e1c5ca8aa)
+++ src/Actions/WorldAction/InputAction.cpp	(revision 4f7f34ebe3887720f1827172d2ebad1e1c5ca8aa)
@@ -0,0 +1,104 @@
+/*
+ * InputAction.cpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#include "Helpers/MemDebug.hpp"
+
+#include "Actions/WorldAction/InputAction.hpp"
+#include "log.hpp"
+#include "molecule.hpp"
+#include "Parser/FormatParserStorage.hpp"
+#include "Parser/PcpParser.hpp"
+#include "verbose.hpp"
+#include "World.hpp"
+
+#include <iostream>
+#include <string>
+
+using namespace std;
+
+#include "UIElements/UIFactory.hpp"
+#include "UIElements/Dialog.hpp"
+#include "Actions/MapOfActions.hpp"
+
+const char WorldInputAction::NAME[] = "input";
+
+WorldInputAction::WorldInputAction() :
+  Action(NAME)
+{}
+
+WorldInputAction::~WorldInputAction()
+{}
+
+Action::state_ptr WorldInputAction::performCall() {
+  Dialog *dialog = UIFactory::getInstance().makeDialog();
+  MoleculeListClass *molecules = World::getInstance().getMolecules();
+  molecule *mol = NULL;
+  string filename;
+  std::ifstream test;
+
+  dialog->queryString(NAME, &filename, MapOfActions::getInstance().getDescription(NAME));
+
+  if(dialog->display()) {
+    DoLog(0) && (Log() << Verbose(0) << "Config file given." << endl);
+    std::string FilenamePrefix = filename.substr(0,filename.find('.'));
+    FormatParserStorage::getInstance().SetOutputPrefixForAll(FilenamePrefix);
+    DoLog(1) && (Log() << Verbose(1) << "Setting config file name prefix to " << FilenamePrefix << "." << endl);
+    test.open(filename.c_str());
+    if (test == NULL) {
+      DoLog(1) && (Log() << Verbose(1) << "Specified config file " << filename << " not found." << endl);
+    } else {
+      DoLog(1) && (Log() << Verbose(1) << "Specified config file found, parsing ... ");
+      FormatParserStorage::getInstance().getPcp().load(&test);
+      test.close();
+    }
+    // set mol to first active molecule
+    if (molecules->ListOfMolecules.size() != 0) {
+      for (MoleculeList::iterator ListRunner = molecules->ListOfMolecules.begin(); ListRunner != molecules->ListOfMolecules.end(); ListRunner++)
+        if ((*ListRunner)->ActiveFlag) {
+          mol = *ListRunner;
+          break;
+        }
+    }
+    if (mol == NULL) {
+      mol = World::getInstance().createMolecule();
+      mol->ActiveFlag = true;
+      molecules->insert(mol);
+    }
+    mol->SetNameFromFilename(filename.c_str());
+    delete dialog;
+    return Action::success;
+  } else {
+    delete dialog;
+    return Action::failure;
+  }
+}
+
+Action::state_ptr WorldInputAction::performUndo(Action::state_ptr _state) {
+//  ParserLoadXyzState *state = assert_cast<ParserLoadXyzState*>(_state.get());
+
+  return Action::failure;
+//  string newName = state->mol->getName();
+//  state->mol->setName(state->lastName);
+//
+//  return Action::state_ptr(new ParserLoadXyzState(state->mol,newName));
+}
+
+Action::state_ptr WorldInputAction::performRedo(Action::state_ptr _state){
+  return Action::failure;
+}
+
+bool WorldInputAction::canUndo() {
+  return false;
+}
+
+bool WorldInputAction::shouldUndo() {
+  return false;
+}
+
+const string WorldInputAction::getName() {
+  return NAME;
+}
Index: src/Actions/WorldAction/InputAction.hpp
===================================================================
--- src/Actions/WorldAction/InputAction.hpp	(revision 4f7f34ebe3887720f1827172d2ebad1e1c5ca8aa)
+++ src/Actions/WorldAction/InputAction.hpp	(revision 4f7f34ebe3887720f1827172d2ebad1e1c5ca8aa)
@@ -0,0 +1,30 @@
+/*
+ * InputAction.hpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#ifndef INPUTACTION_HPP_
+#define INPUTACTION_HPP_
+
+#include "Actions/Action.hpp"
+
+class WorldInputAction : public Action {
+public:
+  WorldInputAction();
+  virtual ~WorldInputAction();
+
+  bool canUndo();
+  bool shouldUndo();
+
+  virtual const std::string getName();
+private:
+  virtual Action::state_ptr performCall();
+  virtual Action::state_ptr performUndo(Action::state_ptr);
+  virtual Action::state_ptr performRedo(Action::state_ptr);
+
+  static const char NAME[];
+};
+
+#endif /* INPUTACTION_HPP_ */
Index: src/Actions/WorldAction/OutputAction.cpp
===================================================================
--- src/Actions/WorldAction/OutputAction.cpp	(revision 4f7f34ebe3887720f1827172d2ebad1e1c5ca8aa)
+++ src/Actions/WorldAction/OutputAction.cpp	(revision 4f7f34ebe3887720f1827172d2ebad1e1c5ca8aa)
@@ -0,0 +1,75 @@
+/*
+ * OutputAction.cpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#include "Helpers/MemDebug.hpp"
+
+#include "Actions/WorldAction/OutputAction.hpp"
+#include "log.hpp"
+#include "verbose.hpp"
+#include "World.hpp"
+
+#include <iostream>
+#include <string>
+
+using namespace std;
+
+#include "UIElements/UIFactory.hpp"
+#include "UIElements/Dialog.hpp"
+#include "Actions/MapOfActions.hpp"
+
+const char WorldOutputAction::NAME[] = "output";
+
+WorldOutputAction::WorldOutputAction() :
+  Action(NAME)
+{}
+
+WorldOutputAction::~WorldOutputAction()
+{}
+
+Action::state_ptr WorldOutputAction::performCall() {
+  Dialog *dialog = UIFactory::getInstance().makeDialog();
+  string defaultname;
+
+  defaultname = World::getInstance().getDefaultName();
+  dialog->queryString(NAME, &defaultname, MapOfActions::getInstance().getDescription(NAME));
+
+  if(dialog->display()) {
+    World::getInstance().setDefaultName(defaultname);
+    DoLog(0) && (Log() << Verbose(0) << "Default name of new molecules set to " << World::getInstance().getDefaultName() << "." << endl);
+    delete dialog;
+    return Action::success;
+  } else {
+    delete dialog;
+    return Action::failure;
+  }
+}
+
+Action::state_ptr WorldOutputAction::performUndo(Action::state_ptr _state) {
+//  ParserLoadXyzState *state = assert_cast<ParserLoadXyzState*>(_state.get());
+
+  return Action::failure;
+//  string newName = state->mol->getName();
+//  state->mol->setName(state->lastName);
+//
+//  return Action::state_ptr(new ParserLoadXyzState(state->mol,newName));
+}
+
+Action::state_ptr WorldOutputAction::performRedo(Action::state_ptr _state){
+  return Action::failure;
+}
+
+bool WorldOutputAction::canUndo() {
+  return false;
+}
+
+bool WorldOutputAction::shouldUndo() {
+  return false;
+}
+
+const string WorldOutputAction::getName() {
+  return NAME;
+}
Index: src/Actions/WorldAction/OutputAction.hpp
===================================================================
--- src/Actions/WorldAction/OutputAction.hpp	(revision 4f7f34ebe3887720f1827172d2ebad1e1c5ca8aa)
+++ src/Actions/WorldAction/OutputAction.hpp	(revision 4f7f34ebe3887720f1827172d2ebad1e1c5ca8aa)
@@ -0,0 +1,30 @@
+/*
+ * OutputAction.hpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#ifndef OUTPUTACTION_HPP_
+#define OUTPUTACTION_HPP_
+
+#include "Actions/Action.hpp"
+
+class WorldOutputAction : public Action {
+public:
+  WorldOutputAction();
+  virtual ~WorldOutputAction();
+
+  bool canUndo();
+  bool shouldUndo();
+
+  virtual const std::string getName();
+private:
+  virtual Action::state_ptr performCall();
+  virtual Action::state_ptr performUndo(Action::state_ptr);
+  virtual Action::state_ptr performRedo(Action::state_ptr);
+
+  static const char NAME[];
+};
+
+#endif /* OUTPUTACTION_HPP_ */
Index: src/CommandLineParser.cpp
===================================================================
--- src/CommandLineParser.cpp	(revision d0fbecbcdc3487bcfb490f5e818f9b9b96b5f4d2)
+++ src/CommandLineParser.cpp	(revision 4f7f34ebe3887720f1827172d2ebad1e1c5ca8aa)
@@ -56,4 +56,7 @@
 {
   // go through all arguments
+  cout << Verbose(1) << "By default putting input into the sequence." << endl;
+  // TODO: This may be bad, because const string "input" is destroyed at end of function
+  SequenceOfActions.push_back("input");
   for (int i=1;i<argc;i++) {
     (cout << Verbose(1) << "Checking on " << argv[i] << endl);
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision d0fbecbcdc3487bcfb490f5e818f9b9b96b5f4d2)
+++ src/Makefile.am	(revision 4f7f34ebe3887720f1827172d2ebad1e1c5ca8aa)
@@ -63,12 +63,4 @@
 
 ACTIONSHEADER = \
-  ${ANALYSISACTIONHEADER} \
-  ${ATOMACTIONHEADER} \
-  ${CMDACTIONHEADER} \
-  ${FRAGMENTATIONACTIONHEADER} \
-  ${MOLECULEACTIONHEADER} \
-  ${PARSERACTIONHEADER} \
-  ${TESSELATIONACTIONHEADER} \
-  ${WORLDACTIONHEADER} \
   Actions/Action.hpp \
   Actions/ActionHistory.hpp \
Index: src/UIElements/CommandLineUI/CommandLineWindow.cpp
===================================================================
--- src/UIElements/CommandLineUI/CommandLineWindow.cpp	(revision d0fbecbcdc3487bcfb490f5e818f9b9b96b5f4d2)
+++ src/UIElements/CommandLineUI/CommandLineWindow.cpp	(revision 4f7f34ebe3887720f1827172d2ebad1e1c5ca8aa)
@@ -47,4 +47,6 @@
 #include "Actions/WorldAction/CenterOnEdgeAction.hpp"
 #include "Actions/WorldAction/ChangeBoxAction.hpp"
+#include "Actions/WorldAction/InputAction.hpp"
+#include "Actions/WorldAction/OutputAction.hpp"
 #include "Actions/WorldAction/RemoveSphereOfAtomsAction.hpp"
 #include "Actions/WorldAction/RepeatBoxAction.hpp"
@@ -81,4 +83,6 @@
 
 void CommandLineWindow::display() {
+  //cout << ActionRegistry::getInstance();
+
   // go through all possible actions
   for (std::list<std::string>::iterator CommandRunner = CommandLineParser::getInstance().SequenceOfActions.begin(); CommandRunner != CommandLineParser::getInstance().SequenceOfActions.end(); ++CommandRunner) {
@@ -156,4 +160,6 @@
   new WorldCenterOnEdgeAction();
   new WorldChangeBoxAction();
+  new WorldInputAction();
+  new WorldOutputAction();
   new WorldRemoveSphereOfAtomsAction();
   new WorldRepeatBoxAction();
Index: src/builder.cpp
===================================================================
--- src/builder.cpp	(revision d0fbecbcdc3487bcfb490f5e818f9b9b96b5f4d2)
+++ src/builder.cpp	(revision 4f7f34ebe3887720f1827172d2ebad1e1c5ca8aa)
@@ -2181,5 +2181,5 @@
     int ExitFlag = 0;
     bool ArgumentsCopied = false;
-    char *ConfigFileName = new char[MAXSTRINGSIZE];
+    //char *ConfigFileName = new char[MAXSTRINGSIZE];
     std::string BondGraphFileName("\n");
     FormatParserStorage::getInstance().addMpqc();
@@ -2210,17 +2210,18 @@
     // Parse command line options and if present create respective UI
     {
-      set<int> ArgcList;
-      ArgcList.insert(0); // push back program!
-      ArgcList.insert(1); // push back config file name
+      //set<int> ArgcList;
+      //ArgcList.insert(0); // push back program!
+      //ArgcList.insert(1); // push back config file name
       // handle arguments by ParseCommandLineOptions()
-      ExitFlag = ParseCommandLineOptions(argc,argv,World::getInstance().getMolecules(),World::getInstance().getPeriode(),*World::getInstance().getConfig(), &ConfigFileName, BondGraphFileName, ArgcList);
-      World::getInstance().setExitFlag(ExitFlag);
+      //ExitFlag = ParseCommandLineOptions(argc,argv,World::getInstance().getMolecules(),World::getInstance().getPeriode(),*World::getInstance().getConfig(), &ConfigFileName, BondGraphFileName, ArgcList);
+      //World::getInstance().setExitFlag(ExitFlag);
       // copy all remaining arguments to a new argv
-      Arguments = new char *[ArgcList.size()];
+      Arguments = new char *[argc];
       cout << "The following arguments are handled by CommandLineParser: ";
-      for (set<int>::iterator ArgcRunner = ArgcList.begin(); ArgcRunner != ArgcList.end(); ++ArgcRunner) {
-        Arguments[ArgcSize] = new char[strlen(argv[*ArgcRunner])+2];
-        strcpy(Arguments[ArgcSize], argv[*ArgcRunner]);
-        cout << " " << argv[*ArgcRunner];
+      for (int ArgcRunner=0;ArgcRunner<argc;ArgcRunner++) {
+      //for (set<int>::iterator ArgcRunner = ArgcList.begin(); ArgcRunner != ArgcList.end(); ++ArgcRunner) {
+        Arguments[ArgcSize] = new char[strlen(argv[ArgcRunner])+2];
+        strcpy(Arguments[ArgcSize], argv[ArgcRunner]);
+        cout << " " << argv[ArgcRunner];
         ArgcSize++;
       }
@@ -2258,6 +2259,4 @@
     }
 
-    std::string FilenamePrefix(ConfigFileName);
-    FormatParserStorage::getInstance().SetOutputPrefixForAll(FilenamePrefix);
     FormatParserStorage::getInstance().SaveAll();
     ChangeTracker::getInstance().saveStatus();
@@ -2269,5 +2268,5 @@
     delete[](Arguments);
   }
-  delete[](ConfigFileName);
+  //delete[](ConfigFileName);
 
   ExitFlag = World::getInstance().getExitFlag();
