Index: src/builder.cpp
===================================================================
--- src/builder.cpp	(revision 6b932c7d7b3e3b190ec670a803b24bdffcbf9d38)
+++ src/builder.cpp	(revision 235bede62ee6609f17d7778b150ccd667adf0025)
@@ -78,5 +78,5 @@
  */
 static int ParseCommandLineOptions(int argc, char **argv, MoleculeListClass *&molecules, periodentafel *&periode,\
-                                   config& configuration, char *&ConfigFileName, oldmenu *main_menu)
+                                   config& configuration, char *&ConfigFileName)
 {
   Vector x,y,z,n;  // coordinates for absolute point in cell volume
@@ -879,5 +879,5 @@
     } while (argptr < argc);
     if (SaveFlag)
-      main_menu->SaveConfig(ConfigFileName, &configuration, periode, molecules);
+      configuration.SaveAll(ConfigFileName, periode, molecules);
   } else {  // no arguments, hence scan the elements db
     if (periode->LoadPeriodentafel(configuration.databasepath))
@@ -907,7 +907,6 @@
     main_menu = new oldmenu;
     setVerbosity(0);
-    /* main menu is needed to call actions inside the menu */
     /* structure of ParseCommandLineOptions will be refactored later */
-    j = ParseCommandLineOptions(argc, argv, molecules, periode, *configuration, ConfigFileName,main_menu);
+    j = ParseCommandLineOptions(argc, argv, molecules, periode, *configuration, ConfigFileName);
     switch (j){
         case 255:
Index: src/config.cpp
===================================================================
--- src/config.cpp	(revision 6b932c7d7b3e3b190ec670a803b24bdffcbf9d38)
+++ src/config.cpp	(revision 235bede62ee6609f17d7778b150ccd667adf0025)
@@ -1771,4 +1771,127 @@
 };
 
+
+/** Tries given filename or standard on saving the config file.
+ * \param *ConfigFileName name of file
+ * \param *periode pointer to periodentafel structure with all the elements
+ * \param *molecules list of molecules structure with all the atoms and coordinates
+ */
+void config::SaveAll(char *ConfigFileName, periodentafel *periode, MoleculeListClass *molecules)
+{
+  char filename[MAXSTRINGSIZE];
+  ofstream output;
+  molecule *mol = new molecule(periode);
+
+  if (!strcmp(configpath, GetDefaultPath())) {
+    eLog() << Verbose(2) << "config is found under different path then stated in config file::defaultpath!" << endl;
+  }
+
+
+  // first save as PDB data
+  if (ConfigFileName != NULL)
+    strcpy(filename, ConfigFileName);
+  else
+    strcpy(filename,"main_pcp_linux");
+  Log() << Verbose(0) << "Saving as pdb input ";
+  if (SavePDB(filename, molecules))
+    Log() << Verbose(0) << "done." << endl;
+  else
+    Log() << Verbose(0) << "failed." << endl;
+
+  // then save as tremolo data file
+  if (ConfigFileName != NULL)
+    strcpy(filename, ConfigFileName);
+  else
+    strcpy(filename,"main_pcp_linux");
+  Log() << Verbose(0) << "Saving as tremolo data input ";
+  if (SaveTREMOLO(filename, molecules))
+    Log() << Verbose(0) << "done." << endl;
+  else
+    Log() << Verbose(0) << "failed." << endl;
+
+  // translate each to its center and merge all molecules in MoleculeListClass into this molecule
+  int N = molecules->ListOfMolecules.size();
+  int *src = new int[N];
+  N=0;
+  for (MoleculeList::iterator ListRunner = molecules->ListOfMolecules.begin(); ListRunner != molecules->ListOfMolecules.end(); ListRunner++) {
+    src[N++] = (*ListRunner)->IndexNr;
+    (*ListRunner)->Translate(&(*ListRunner)->Center);
+  }
+  molecules->SimpleMultiAdd(mol, src, N);
+  delete[](src);
+
+  // ... and translate back
+  for (MoleculeList::iterator ListRunner = molecules->ListOfMolecules.begin(); ListRunner != molecules->ListOfMolecules.end(); ListRunner++) {
+    (*ListRunner)->Center.Scale(-1.);
+    (*ListRunner)->Translate(&(*ListRunner)->Center);
+    (*ListRunner)->Center.Scale(-1.);
+  }
+
+  Log() << Verbose(0) << "Storing configuration ... " << endl;
+  // get correct valence orbitals
+  mol->CalculateOrbitals(*this);
+  InitMaxMinStopStep = MaxMinStopStep = MaxPsiDouble;
+  if (ConfigFileName != NULL) { // test the file name
+    strcpy(filename, ConfigFileName);
+    output.open(filename, ios::trunc);
+  } else if (strlen(configname) != 0) {
+    strcpy(filename, configname);
+    output.open(configname, ios::trunc);
+    } else {
+      strcpy(filename, DEFAULTCONFIG);
+      output.open(DEFAULTCONFIG, ios::trunc);
+    }
+  output.close();
+  output.clear();
+  Log() << Verbose(0) << "Saving of config file ";
+  if (Save(filename, periode, mol))
+    Log() << Verbose(0) << "successful." << endl;
+  else
+    Log() << Verbose(0) << "failed." << endl;
+
+  // and save to xyz file
+  if (ConfigFileName != NULL) {
+    strcpy(filename, ConfigFileName);
+    strcat(filename, ".xyz");
+    output.open(filename, ios::trunc);
+  }
+  else {
+    strcpy(filename,"main_pcp_linux");
+    strcat(filename, ".xyz");
+    output.open(filename, ios::trunc);
+  }
+  Log() << Verbose(0) << "Saving of XYZ file ";
+  if (mol->MDSteps <= 1) {
+    if (mol->OutputXYZ(&output))
+      Log() << Verbose(0) << "successful." << endl;
+    else
+      Log() << Verbose(0) << "failed." << endl;
+  } else {
+    if (mol->OutputTrajectoriesXYZ(&output))
+      Log() << Verbose(0) << "successful." << endl;
+    else
+      Log() << Verbose(0) << "failed." << endl;
+  }
+  output.close();
+  output.clear();
+
+  // and save as MPQC configuration
+  if (ConfigFileName != NULL)
+    strcpy(filename, ConfigFileName);
+  else
+    strcpy(filename,"main_pcp_linux");
+  Log() << Verbose(0) << "Saving as mpqc input ";
+  if (SaveMPQC(filename, mol))
+    Log() << Verbose(0) << "done." << endl;
+  else
+    Log() << Verbose(0) << "failed." << endl;
+
+  if (!strcmp(configpath, GetDefaultPath())) {
+    eLog() << Verbose(2) << "config is found under different path then stated in config file::defaultpath!" << endl;
+  }
+
+  delete(mol);
+};
+
 /** Reads parameter from a parsed file.
  * The file is either parsed for a certain keyword or if null is given for
Index: src/config.hpp
===================================================================
--- src/config.hpp	(revision 6b932c7d7b3e3b190ec670a803b24bdffcbf9d38)
+++ src/config.hpp	(revision 235bede62ee6609f17d7778b150ccd667adf0025)
@@ -146,4 +146,6 @@
   bool SaveTREMOLO(const char * const filename, const MoleculeListClass * const MolList) const;
 
+  void SaveAll(char *ConfigFileName, periodentafel *periode, MoleculeListClass *molecules);
+
   void Edit();
   bool GetIsAngstroem() const;
Index: src/menu.cpp
===================================================================
--- src/menu.cpp	(revision 6b932c7d7b3e3b190ec670a803b24bdffcbf9d38)
+++ src/menu.cpp	(revision 235bede62ee6609f17d7778b150ccd667adf0025)
@@ -1142,5 +1142,5 @@
   new SeperatorItem(main_menu);
 
-  Action *saveConfigAction = new MethodAction(boost::bind(&oldmenu::SaveConfig,this,ConfigFileName, configuration, periode, molecules));
+  Action *saveConfigAction = new MethodAction(boost::bind(&config::SaveAll,configuration, ConfigFileName, periode, molecules));
   new ActionMenuItem('s',"save current setup to config file",main_menu,saveConfigAction);
 
@@ -1204,125 +1204,2 @@
   delete returnAction;
 };
-
-/** Tries given filename or standard on saving the config file.
- * \param *ConfigFileName name of file
- * \param *configuration pointer to configuration structure with all the values
- * \param *periode pointer to periodentafel structure with all the elements
- * \param *molecules list of molecules structure with all the atoms and coordinates
- */
-void oldmenu::SaveConfig(char *ConfigFileName, config *configuration, periodentafel *periode, MoleculeListClass *molecules)
-{
-  char filename[MAXSTRINGSIZE];
-  ofstream output;
-  molecule *mol = new molecule(periode);
-
-  if (!strcmp(configuration->configpath, configuration->GetDefaultPath())) {
-    eLog() << Verbose(2) << "config is found under different path then stated in config file::defaultpath!" << endl;
-  }
-
-
-  // first save as PDB data
-  if (ConfigFileName != NULL)
-    strcpy(filename, ConfigFileName);
-  else
-    strcpy(filename,"main_pcp_linux");
-  Log() << Verbose(0) << "Saving as pdb input ";
-  if (configuration->SavePDB(filename, molecules))
-    Log() << Verbose(0) << "done." << endl;
-  else
-    Log() << Verbose(0) << "failed." << endl;
-
-  // then save as tremolo data file
-  if (ConfigFileName != NULL)
-    strcpy(filename, ConfigFileName);
-  else
-    strcpy(filename,"main_pcp_linux");
-  Log() << Verbose(0) << "Saving as tremolo data input ";
-  if (configuration->SaveTREMOLO(filename, molecules))
-    Log() << Verbose(0) << "done." << endl;
-  else
-    Log() << Verbose(0) << "failed." << endl;
-
-  // translate each to its center and merge all molecules in MoleculeListClass into this molecule
-  int N = molecules->ListOfMolecules.size();
-  int *src = new int[N];
-  N=0;
-  for (MoleculeList::iterator ListRunner = molecules->ListOfMolecules.begin(); ListRunner != molecules->ListOfMolecules.end(); ListRunner++) {
-    src[N++] = (*ListRunner)->IndexNr;
-    (*ListRunner)->Translate(&(*ListRunner)->Center);
-  }
-  molecules->SimpleMultiAdd(mol, src, N);
-  delete[](src);
-
-  // ... and translate back
-  for (MoleculeList::iterator ListRunner = molecules->ListOfMolecules.begin(); ListRunner != molecules->ListOfMolecules.end(); ListRunner++) {
-    (*ListRunner)->Center.Scale(-1.);
-    (*ListRunner)->Translate(&(*ListRunner)->Center);
-    (*ListRunner)->Center.Scale(-1.);
-  }
-
-  Log() << Verbose(0) << "Storing configuration ... " << endl;
-  // get correct valence orbitals
-  mol->CalculateOrbitals(*configuration);
-  configuration->InitMaxMinStopStep = configuration->MaxMinStopStep = configuration->MaxPsiDouble;
-  if (ConfigFileName != NULL) { // test the file name
-    strcpy(filename, ConfigFileName);
-    output.open(filename, ios::trunc);
-  } else if (strlen(configuration->configname) != 0) {
-    strcpy(filename, configuration->configname);
-    output.open(configuration->configname, ios::trunc);
-    } else {
-      strcpy(filename, DEFAULTCONFIG);
-      output.open(DEFAULTCONFIG, ios::trunc);
-    }
-  output.close();
-  output.clear();
-  Log() << Verbose(0) << "Saving of config file ";
-  if (configuration->Save(filename, periode, mol))
-    Log() << Verbose(0) << "successful." << endl;
-  else
-    Log() << Verbose(0) << "failed." << endl;
-
-  // and save to xyz file
-  if (ConfigFileName != NULL) {
-    strcpy(filename, ConfigFileName);
-    strcat(filename, ".xyz");
-    output.open(filename, ios::trunc);
-  }
-  else {
-    strcpy(filename,"main_pcp_linux");
-    strcat(filename, ".xyz");
-    output.open(filename, ios::trunc);
-  }
-  Log() << Verbose(0) << "Saving of XYZ file ";
-  if (mol->MDSteps <= 1) {
-    if (mol->OutputXYZ(&output))
-      Log() << Verbose(0) << "successful." << endl;
-    else
-      Log() << Verbose(0) << "failed." << endl;
-  } else {
-    if (mol->OutputTrajectoriesXYZ(&output))
-      Log() << Verbose(0) << "successful." << endl;
-    else
-      Log() << Verbose(0) << "failed." << endl;
-  }
-  output.close();
-  output.clear();
-
-  // and save as MPQC configuration
-  if (ConfigFileName != NULL)
-    strcpy(filename, ConfigFileName);
-  else
-    strcpy(filename,"main_pcp_linux");
-  Log() << Verbose(0) << "Saving as mpqc input ";
-  if (configuration->SaveMPQC(filename, mol))
-    Log() << Verbose(0) << "done." << endl;
-  else
-    Log() << Verbose(0) << "failed." << endl;
-
-  if (!strcmp(configuration->configpath, configuration->GetDefaultPath())) {
-    eLog() << Verbose(2) << "config is found under different path then stated in config file::defaultpath!" << endl;
-  }
-
-  delete(mol);
-};
Index: src/menu.hpp
===================================================================
--- src/menu.hpp	(revision 6b932c7d7b3e3b190ec670a803b24bdffcbf9d38)
+++ src/menu.hpp	(revision 235bede62ee6609f17d7778b150ccd667adf0025)
@@ -24,5 +24,4 @@
   void notImplementedYet();
   void perform(MoleculeListClass *, config *, periodentafel *, char *);
-  void SaveConfig(char *, config *, periodentafel *, MoleculeListClass *);
 
 protected:
