Index: src/periodentafel.cpp
===================================================================
--- src/periodentafel.cpp	(revision 52f5d5d2312e073ff5dc9a8561eacdf21c0b84b9)
+++ src/periodentafel.cpp	(revision a98603750c1b5ea8639c4f89919340c98b730445)
@@ -1,6 +1,6 @@
 /** \file periodentafel.cpp
- * 
+ *
  * Function implementations for the class periodentafel.
- * 
+ *
  */
 
@@ -14,11 +14,11 @@
  * Initialises start and end of list and resets periodentafel::checkliste to false.
  */
-periodentafel::periodentafel() 
-{ 
-  start = new element; 
-  end = new element; 
-  start->previous = NULL; 
-  start->next = end; 
-  end->previous = start; 
+periodentafel::periodentafel()
+{
+  start = new element;
+  end = new element;
+  start->previous = NULL;
+  start->next = end;
+  end->previous = start;
   end->next = NULL;
 };
@@ -27,10 +27,10 @@
  * Removes every element and afterwards deletes start and end of list.
  */
-periodentafel::~periodentafel() 
-{ 
-  CleanupPeriodtable(); 
-  delete(end); 
-  delete(start); 
-}; 
+periodentafel::~periodentafel()
+{
+  CleanupPeriodtable();
+  delete(end);
+  delete(start);
+};
 
 /** Adds element to period table list
@@ -38,10 +38,10 @@
  * \return true - succeeded, false - does not occur
  */
-bool periodentafel::AddElement(element *pointer) 
-{ 
+bool periodentafel::AddElement(element *pointer)
+{
   pointer->sort = &pointer->Z;
   if (pointer->Z < 1 && pointer->Z >= MAX_ELEMENTS)
     cout << Verbose(0) << "Invalid Z number!\n";
-  return add(pointer, end); 
+  return add(pointer, end);
 };
 
@@ -50,7 +50,7 @@
  * \return true - succeeded, false - element not found
  */
-bool periodentafel::RemoveElement(element *pointer) 
-{ 
-  return remove(pointer, start, end); 
+bool periodentafel::RemoveElement(element *pointer)
+{
+  return remove(pointer, start, end);
 };
 
@@ -58,7 +58,7 @@
  * \return true - succeeded, false - does not occur
  */
-bool periodentafel::CleanupPeriodtable() 
-{ 
-  return cleanup(start,end); 
+bool periodentafel::CleanupPeriodtable()
+{
+  return cleanup(start,end);
 };
 
@@ -76,6 +76,6 @@
     cout << Verbose(0) << "Mass: " << endl;
     cin >> walker->mass;
-    walker->Z = Z;  
-    cout << Verbose(0) << "Atomic number: " << walker->Z << endl;  
+    walker->Z = Z;
+    cout << Verbose(0) << "Atomic number: " << walker->Z << endl;
     cout << Verbose(0) << "Name [max 64 chars]: " << endl;
     cin >> walker->name;
@@ -105,5 +105,5 @@
 /** Asks for element number and returns pointer to element
  */
-element * periodentafel::AskElement() 
+element * periodentafel::AskElement()
 {
   element *walker = NULL;
@@ -117,8 +117,7 @@
 };
 
-
 /** Prints period table to given stream.
  * \param output stream
- */ 
+ */
 bool periodentafel::Output(ofstream *output) const
 {
@@ -131,5 +130,5 @@
     }
     return result;
-  } else 
+  } else
     return false;
 };
@@ -138,5 +137,5 @@
  * \param *output output stream
  * \param *checkliste elements table for this molecule
- */ 
+ */
 bool periodentafel::Checkout(ofstream *output, const int *checkliste) const
 {
@@ -152,12 +151,11 @@
       if ((walker != NULL) && (walker->Z > 0) && (walker->Z < MAX_ELEMENTS) && (checkliste[walker->Z])) {
         walker->No = No;
-        result = result && walker->Checkout(output, No++, checkliste[walker->Z]);      
+        result = result && walker->Checkout(output, No++, checkliste[walker->Z]);
       }
     }
     return result;
-  } else 
+  } else
     return false;
 };
-
 
 /** Loads element list from file.
@@ -171,6 +169,6 @@
   bool status = true;
   bool otherstatus = true;
-  char *filename = new char[MAXSTRINGSIZE];
-  
+  char filename[255];
+
   // fill elements DB
   strncpy(filename, path, MAXSTRINGSIZE);
@@ -225,9 +223,9 @@
   if (infile != NULL) {
     while (!infile.eof()) {
-    	infile >> tmp;
-    	infile >> ws;
-    	infile >> FindElement((int)tmp)->Valence;
-    	infile >> ws;
-    	//cout << Verbose(3) << "Element " << (int)tmp << " has " << FindElement((int)tmp)->Valence << " valence electrons." << endl;
+      infile >> tmp;
+      infile >> ws;
+      infile >> FindElement((int)tmp)->Valence;
+      infile >> ws;
+      //cout << Verbose(3) << "Element " << (int)tmp << " has " << FindElement((int)tmp)->Valence << " valence electrons." << endl;
     }
     infile.close();
@@ -253,5 +251,5 @@
   } else
     otherstatus = false;
-  
+
   // fill H-BondDistance DB per element
   strncpy(filename, path, MAXSTRINGSIZE);
@@ -261,11 +259,11 @@
   if (infile != NULL) {
     while (!infile.eof()) {
-    	infile >> tmp;
+      infile >> tmp;
       ptr = FindElement((int)tmp);
-    	infile >> ws;
+      infile >> ws;
       infile >> ptr->HBondDistance[0];
       infile >> ptr->HBondDistance[1];
       infile >> ptr->HBondDistance[2];
-    	infile >> ws;
+      infile >> ws;
       //cout << Verbose(3) << "Element " << (int)tmp << " has " << FindElement((int)tmp)->HBondDistance[0] << " Angstrom typical distance to hydrogen." << endl;
     }
@@ -274,5 +272,5 @@
   } else
     otherstatus = false;
-  
+
   // fill H-BondAngle DB per element
   strncpy(filename, path, MAXSTRINGSIZE);
@@ -294,8 +292,8 @@
   } else
     otherstatus = false;
-  
+
   if (!otherstatus)
     cerr << "WARNING: Something went wrong while parsing the other databases!" << endl;
-  
+
   return status;
 };
@@ -308,5 +306,5 @@
   ofstream f;
   char filename[MAXSTRINGSIZE];
-  
+
   strncpy(filename, path, MAXSTRINGSIZE);
   strncat(filename, "/", MAXSTRINGSIZE-strlen(filename));
