Index: src/menu.cpp
===================================================================
--- src/menu.cpp	(revision 8f113e699e9964e0a218b631615dad0985d8985b)
+++ src/menu.cpp	(revision 1020f0efe8e5aac8bc8bb893cf28f27c08302350)
@@ -898,4 +898,93 @@
 
 
+void oldmenu::createNewMolecule(periodentafel *periode,MoleculeListClass *molecules) {
+  molecule *mol = NULL;
+  mol = new molecule(periode);
+  molecules->insert(mol);
+};
+
+void oldmenu::loadFromXYZ(periodentafel *periode,MoleculeListClass *molecules){
+  molecule *mol = NULL;
+  Vector center;
+  char filename[MAXSTRINGSIZE];
+  Log() << Verbose(0) << "Format should be XYZ with: ShorthandOfElement\tX\tY\tZ" << endl;
+  mol = new molecule(periode);
+  do {
+    Log() << Verbose(0) << "Enter file name: ";
+    cin >> filename;
+  } while (!mol->AddXYZFile(filename));
+  mol->SetNameFromFilename(filename);
+  // center at set box dimensions
+  mol->CenterEdge(&center);
+  mol->cell_size[0] = center.x[0];
+  mol->cell_size[1] = 0;
+  mol->cell_size[2] = center.x[1];
+  mol->cell_size[3] = 0;
+  mol->cell_size[4] = 0;
+  mol->cell_size[5] = center.x[2];
+  molecules->insert(mol);
+}
+
+void oldmenu::changeName(MoleculeListClass *molecules){
+  char filename[MAXSTRINGSIZE];
+  molecule *mol = NULL;
+  int nr;
+  do {
+    Log() << Verbose(0) << "Enter index of molecule: ";
+    cin >> nr;
+    mol = molecules->ReturnIndex(nr);
+  } while (mol == NULL);
+  Log() << Verbose(0) << "Enter name: ";
+  cin >> filename;
+  strcpy(mol->name, filename);
+}
+
+void oldmenu::setMoleculeFilename(MoleculeListClass *molecules) {
+  char filename[MAXSTRINGSIZE];
+  int nr;
+  molecule *mol = NULL;
+  do {
+    Log() << Verbose(0) << "Enter index of molecule: ";
+    cin >> nr;
+    mol = molecules->ReturnIndex(nr);
+  } while (mol == NULL);
+  Log() << Verbose(0) << "Enter name: ";
+  cin >> filename;
+  mol->SetNameFromFilename(filename);
+}
+
+void oldmenu::parseXYZIntoMolecule(MoleculeListClass *molecules){
+  char filename[MAXSTRINGSIZE];
+  int nr;
+  molecule *mol = NULL;
+  mol = NULL;
+  do {
+   Log() << Verbose(0) << "Enter index of molecule: ";
+   cin >> nr;
+   mol = molecules->ReturnIndex(nr);
+  } while (mol == NULL);
+  Log() << Verbose(0) << "Format should be XYZ with: ShorthandOfElement\tX\tY\tZ" << endl;
+  do {
+   Log() << Verbose(0) << "Enter file name: ";
+   cin >> filename;
+  } while (!mol->AddXYZFile(filename));
+  mol->SetNameFromFilename(filename);
+};
+
+void oldmenu::eraseMolecule(MoleculeListClass *molecules){
+  int nr;
+  molecule *mol = NULL;
+  Log() << Verbose(0) << "Enter index of molecule: ";
+  cin >> nr;
+  for(MoleculeList::iterator ListRunner = molecules->ListOfMolecules.begin(); ListRunner != molecules->ListOfMolecules.end(); ListRunner++)
+    if (nr == (*ListRunner)->IndexNr) {
+      mol = *ListRunner;
+      molecules->ListOfMolecules.erase(ListRunner);
+      delete(mol);
+      break;
+    }
+};
+
+
 /** Submenu for creating new molecules.
  * \param *periode periodentafel
@@ -905,7 +994,4 @@
 {
   char choice;  // menu choice char
-  Vector center;
-  int nr, count;
-  molecule *mol = NULL;
 
   Log() << Verbose(0) << "==========EDIT MOLECULES=====================" << endl;
@@ -926,87 +1012,25 @@
       break;
     case 'c':
-      mol = new molecule(periode);
-      molecules->insert(mol);
+        createNewMolecule(periode,molecules);
       break;
 
     case 'l': // load from XYZ file
-      {
-        char filename[MAXSTRINGSIZE];
-        Log() << Verbose(0) << "Format should be XYZ with: ShorthandOfElement\tX\tY\tZ" << endl;
-        mol = new molecule(periode);
-        do {
-          Log() << Verbose(0) << "Enter file name: ";
-          cin >> filename;
-        } while (!mol->AddXYZFile(filename));
-        mol->SetNameFromFilename(filename);
-        // center at set box dimensions
-        mol->CenterEdge(&center);
-        mol->cell_size[0] = center.x[0];
-        mol->cell_size[1] = 0;
-        mol->cell_size[2] = center.x[1];
-        mol->cell_size[3] = 0;
-        mol->cell_size[4] = 0;
-        mol->cell_size[5] = center.x[2];
-        molecules->insert(mol);
-      }
+      loadFromXYZ(periode,molecules);
       break;
 
     case 'n':
-      {
-        char filename[MAXSTRINGSIZE];
-        do {
-          Log() << Verbose(0) << "Enter index of molecule: ";
-          cin >> nr;
-          mol = molecules->ReturnIndex(nr);
-        } while (mol == NULL);
-        Log() << Verbose(0) << "Enter name: ";
-        cin >> filename;
-        strcpy(mol->name, filename);
-      }
+      changeName(molecules);
       break;
 
     case 'N':
-      {
-        char filename[MAXSTRINGSIZE];
-        do {
-          Log() << Verbose(0) << "Enter index of molecule: ";
-          cin >> nr;
-          mol = molecules->ReturnIndex(nr);
-        } while (mol == NULL);
-        Log() << Verbose(0) << "Enter name: ";
-        cin >> filename;
-        mol->SetNameFromFilename(filename);
-      }
+      setMoleculeFilename(molecules);
       break;
 
     case 'p': // parse XYZ file
-      {
-        char filename[MAXSTRINGSIZE];
-        mol = NULL;
-        do {
-          Log() << Verbose(0) << "Enter index of molecule: ";
-          cin >> nr;
-          mol = molecules->ReturnIndex(nr);
-        } while (mol == NULL);
-        Log() << Verbose(0) << "Format should be XYZ with: ShorthandOfElement\tX\tY\tZ" << endl;
-        do {
-          Log() << Verbose(0) << "Enter file name: ";
-          cin >> filename;
-        } while (!mol->AddXYZFile(filename));
-        mol->SetNameFromFilename(filename);
-      }
+      parseXYZIntoMolecule(molecules);
       break;
 
     case 'r':
-      Log() << Verbose(0) << "Enter index of molecule: ";
-      cin >> nr;
-      count = 1;
-      for(MoleculeList::iterator ListRunner = molecules->ListOfMolecules.begin(); ListRunner != molecules->ListOfMolecules.end(); ListRunner++)
-        if (nr == (*ListRunner)->IndexNr) {
-          mol = *ListRunner;
-          molecules->ListOfMolecules.erase(ListRunner);
-          delete(mol);
-          break;
-        }
+      eraseMolecule(molecules);
       break;
   }
Index: src/menu.hpp
===================================================================
--- src/menu.hpp	(revision 8f113e699e9964e0a218b631615dad0985d8985b)
+++ src/menu.hpp	(revision 1020f0efe8e5aac8bc8bb893cf28f27c08302350)
@@ -26,4 +26,12 @@
   void SaveConfig(char *, config *, periodentafel *, MoleculeListClass *);
 
+  // Methods extracted from EditMolecules. Probably to be moved to moleculeListClass
+  void createNewMolecule(periodentafel *periode,MoleculeListClass *molecules);
+  void loadFromXYZ(periodentafel *periode,MoleculeListClass *molecules);
+  void changeName(MoleculeListClass *molecules);
+  void setMoleculeFilename(MoleculeListClass *molecules);
+  void parseXYZIntoMolecule(MoleculeListClass *molecules);
+  void eraseMolecule(MoleculeListClass *molecules);
+
 protected:
   void AddAtoms(periodentafel *, molecule *);
