Index: src/FunctionApproximation/FunctionModel.hpp
===================================================================
--- src/FunctionApproximation/FunctionModel.hpp	(revision da2d5c9d76dfbd881fcf84f38ad0fc0c9d8347a8)
+++ src/FunctionApproximation/FunctionModel.hpp	(revision 035c0da1f58fb5190abeb335461b2da4ebc8375b)
@@ -45,6 +45,4 @@
   //!> typedef for a function containing how to extract required information from a Fragment.
   typedef boost::function< arguments_t (const Fragment &, const size_t)> extractor_t;
-  //!> typedef for a vector of particle tyoes
-  typedef std::vector< double > charges_t;
   //!> typedef for the magic triple function that gets the other two distances for a given argument
   typedef boost::function< std::vector<arguments_t>(const argument_t &, const double)> triplefunction_t;
Index: src/LevMartester.cpp
===================================================================
--- src/LevMartester.cpp	(revision da2d5c9d76dfbd881fcf84f38ad0fc0c9d8347a8)
+++ src/LevMartester.cpp	(revision 035c0da1f58fb5190abeb335461b2da4ebc8375b)
@@ -45,4 +45,5 @@
 #include <boost/foreach.hpp>
 #include <boost/function.hpp>
+#include <boost/lambda/lambda.hpp>
 #include <boost/program_options.hpp>
 
@@ -83,8 +84,13 @@
 HomologyGraph getFirstGraphwithSpecifiedElements(
     const HomologyContainer &homologies,
-    const FunctionModel::charges_t &charges)
+    const SerializablePotential::ParticleTypes_t &types)
 {
-  ASSERT( !charges.empty(),
+  ASSERT( !types.empty(),
       "getFirstGraphwithSpecifiedElements() - charges is empty?");
+  // create charges
+  Fragment::charges_t charges;
+  charges.resize(types.size());
+  std::transform(types.begin(), types.end(),
+      charges.begin(), boost::lambda::_1);
   // convert into count map
   Extractors::elementcounts_t counts_per_charge =
@@ -187,4 +193,6 @@
   std::cout << "Hello to the World from LevMar!" << std::endl;
 
+//  setVerbosity(4);
+
   // load homology file
   po::options_description desc("Allowed options");
@@ -193,6 +201,6 @@
       ("homology-file", po::value< boost::filesystem::path >(), "homology file to parse")
       ("fit-potential", po::value< std::string >(), "potential type to fit")
-      ("charges", po::value< FunctionModel::charges_t >()->multitoken(), "charges specifying the potential")
-      ("fragment", po::value< FunctionModel::charges_t >()->multitoken(), "all charges in the fragment")
+      ("charges", po::value< SerializablePotential::ParticleTypes_t >()->multitoken(), "charges specifying the potential")
+      ("fragment", po::value< SerializablePotential::ParticleTypes_t >()->multitoken(), "all charges in the fragment")
   ;
 
@@ -226,7 +234,7 @@
 
   // charges
-  FunctionModel::charges_t charges;
+  SerializablePotential::ParticleTypes_t charges;
   if (vm.count("charges")) {
-    charges = vm["charges"].as< FunctionModel::charges_t >();
+    charges = vm["charges"].as< SerializablePotential::ParticleTypes_t >();
   } else {
     ELOG(0, "Vector of charges specifying the potential (charges) was not set.");
@@ -235,7 +243,7 @@
 
   // fragment
-  FunctionModel::charges_t fragment;
+  SerializablePotential::ParticleTypes_t fragment;
   if (vm.count("fragment")) {
-    fragment = vm["fragment"].as< FunctionModel::charges_t >();
+    fragment = vm["fragment"].as< SerializablePotential::ParticleTypes_t >();
   } else {
     ELOG(0, "Vector of charges specifying the fragment (charges) was not set.");
Index: src/Potentials/PotentialFactory.cpp
===================================================================
--- src/Potentials/PotentialFactory.cpp	(revision da2d5c9d76dfbd881fcf84f38ad0fc0c9d8347a8)
+++ src/Potentials/PotentialFactory.cpp	(revision 035c0da1f58fb5190abeb335461b2da4ebc8375b)
@@ -71,11 +71,8 @@
 FunctionModel *PotentialFactory::createInstance(
     const std::string &potentialtype,
-    const FunctionModel::charges_t &charges) const
+    const SerializablePotential::ParticleTypes_t &types) const
 {
   ASSERT (NameToType.count(potentialtype),
       "PotentialFactory::createInstance() - cannot find potential of name "+potentialtype);
-  SerializablePotential::ParticleTypes_t types;
-  types.resize(charges.size());
-  std::transform(charges.begin(), charges.end(), types.begin(), boost::lambda::_1);
   switch (NameToType[potentialtype]) {
   case tersoff:
Index: src/Potentials/PotentialFactory.hpp
===================================================================
--- src/Potentials/PotentialFactory.hpp	(revision da2d5c9d76dfbd881fcf84f38ad0fc0c9d8347a8)
+++ src/Potentials/PotentialFactory.hpp	(revision 035c0da1f58fb5190abeb335461b2da4ebc8375b)
@@ -19,4 +19,5 @@
 
 #include "FunctionApproximation/FunctionModel.hpp"
+#include "Potentials/SerializablePotential.hpp"
 
 /** Class that creates instances of potentials.
@@ -38,5 +39,5 @@
   FunctionModel *createInstance(
       const std::string &potentialtype,
-      const FunctionModel::charges_t &charges) const;
+      const SerializablePotential::ParticleTypes_t &charges) const;
 
   //!> enumeration of all known and createable potentials
Index: src/Potentials/Specifics/SaturationPotential.cpp
===================================================================
--- src/Potentials/Specifics/SaturationPotential.cpp	(revision da2d5c9d76dfbd881fcf84f38ad0fc0c9d8347a8)
+++ src/Potentials/Specifics/SaturationPotential.cpp	(revision 035c0da1f58fb5190abeb335461b2da4ebc8375b)
@@ -422,6 +422,6 @@
     // only that saturation potential never has its middle element twice!
     // hence, we skip the firstpair but keep the code for later generalization
-    charges_t secondpair(2, boost::cref(charges[1]));
-    const charges_t &thirdpair = charges;
+    Fragment::charges_t secondpair(2, boost::cref(charges[1]));
+    const Fragment::charges_t &thirdpair = charges;
     returnfunction =
 //        boost::bind(&Extractors::reorderArgumentsByParticleTypes,
