Index: src/Actions/FillAction/FillRegularGridAction.cpp
===================================================================
--- src/Actions/FillAction/FillRegularGridAction.cpp	(revision 57dd40cda8082273cb21c69bba6a7c8b5a561fca)
+++ src/Actions/FillAction/FillRegularGridAction.cpp	(revision 42b6de7c684d4c908777f116dccaf00a8e479cf2)
@@ -20,5 +20,7 @@
 #include "CodePatterns/MemDebug.hpp"
 
+#include "Actions/UndoRedoHelpers.hpp"
 #include "Atom/atom.hpp"
+#include "Atom/AtomicInfo.hpp"
 #include "Atom/CopyAtoms/CopyAtoms_withBonds.hpp"
 #include "CodePatterns/Log.hpp"
@@ -65,7 +67,4 @@
   getParametersfromValueStorage();
 
-  // get all present atoms for UndoState
-  AtomVector presentatoms = World::getInstance().getAllAtoms();
-
   // get the filler molecule and move to origin
   const std::vector< molecule *> molecules = World::getInstance().getSelectedMolecules();
@@ -100,4 +99,5 @@
 
   // create predicate, mesh, and filler
+  std::vector<AtomicInfo> clonedatoms;
   bool successflag = false;
   {
@@ -125,6 +125,21 @@
       ClusterInterface::Cluster_impl cluster( new Cluster( filler->getAtomIds(), filler->getBoundingShape()) );
       CopyAtoms_withBonds copyMethod;
-      successflag = (*fillerFunction)(copyMethod, cluster);
+      Filler::ClusterVector_t ClonedClusters;
+      successflag = (*fillerFunction)(copyMethod, cluster, ClonedClusters);
       delete fillerFunction;
+
+      // append each cluster's atoms to clonedatoms
+      for (Filler::ClusterVector_t::const_iterator iter = ClonedClusters.begin();
+          iter != ClonedClusters.end(); ++iter) {
+        const AtomIdSet &atoms = (*iter)->getAtomIds();
+        clonedatoms.reserve(clonedatoms.size()+atoms.size());
+        for (AtomIdSet::const_iterator atomiter = atoms.begin(); atomiter != atoms.end(); ++atomiter)
+          clonedatoms.push_back( AtomicInfo(*(*atomiter)) );
+      }
+      if (!successflag) {
+        ELOG(1, "Insertion failed, removing inserted clusters again.");
+        RemoveAtomsFromAtomicInfo(clonedatoms);
+        clonedatoms.clear();
+      }
     }
 
@@ -138,24 +153,6 @@
   }
 
-  // generate list of newly created atoms
-  // (we can in general remove more quickly from a list than a vector)
-  AtomVector filleratoms = World::getInstance().getAllAtoms();
-//  LOG(0, filleratoms.size() << " atoms are present.");
-  std::list<atom *> filleratoms_list;
-  std::copy( filleratoms.begin(),  filleratoms.end(), std::back_inserter( filleratoms_list ));
-//  LOG(0, filleratoms_list.size() << " atoms have been copied.");
-  for (AtomVector::const_iterator iter = presentatoms.begin();
-      iter != presentatoms.end();
-      ++iter) {
-    filleratoms_list.remove(*iter);
-  }
-//  LOG(0, filleratoms_list.size() << " atoms left after removal.");
-  filleratoms.clear();
-  std::copy(filleratoms_list.begin(), filleratoms_list.end(), std::back_inserter( filleratoms ));
-
-//  LOG(0, filleratoms.size() << " atoms have been inserted.");
-
   if (successflag)
-    return Action::state_ptr(new FillRegularGridState(filleratoms,params));
+    return Action::state_ptr(new FillRegularGridState(clonedatoms,params));
   else
     return Action::failure;
@@ -163,29 +160,27 @@
 
 Action::state_ptr FillRegularGridAction::performUndo(Action::state_ptr _state) {
-//  FillRegularGridState *state = assert_cast<FillRegularGridState*>(_state.get());
-//
-//  BOOST_FOREACH(atom *_atom, state->filleratoms) {
-//    World::getInstance().destroyAtom(Walker);
-//  }
-//
-//  // as atoms and atoms from state are removed, we have to create a new one
-//  std::vector<atom*> filleratoms;
-//  return Action::state_ptr(new FillRegularGridState(filleratoms,state->params));
-  return Action::failure;
+  FillRegularGridState *state = assert_cast<FillRegularGridState*>(_state.get());
+
+  // remove all created atoms
+  RemoveAtomsFromAtomicInfo(state->clonedatoms);
+
+  return Action::state_ptr(_state);
 }
 
 Action::state_ptr FillRegularGridAction::performRedo(Action::state_ptr _state){
-  //FillRegularGridState *state = assert_cast<FillRegularGridState*>(_state.get());
+  FillRegularGridState *state = assert_cast<FillRegularGridState*>(_state.get());
 
-  return Action::failure;
-  //return Action::state_ptr(_state);
+  if (AddAtomsFromAtomicInfo(state->clonedatoms))
+    return Action::state_ptr(_state);
+  else
+    return Action::failure;
 }
 
 bool FillRegularGridAction::canUndo() {
-  return false;
+  return true;
 }
 
 bool FillRegularGridAction::shouldUndo() {
-  return false;
+  return true;
 }
 /** =========== end of function ====================== */
Index: src/Actions/FillAction/FillRegularGridAction.def
===================================================================
--- src/Actions/FillAction/FillRegularGridAction.def	(revision 57dd40cda8082273cb21c69bba6a7c8b5a561fca)
+++ src/Actions/FillAction/FillRegularGridAction.def	(revision 42b6de7c684d4c908777f116dccaf00a8e479cf2)
@@ -18,6 +18,6 @@
 #define paramreferences (counts)(offset)(mindistance)(SphereRadius)(RandAtomDisplacement)(RandMoleculeDisplacement)(DoRotate)
 
-#define statetypes (std::vector<atom *>)
-#define statereferences (filleratoms)
+#define statetypes (std::vector<AtomicInfo>) 
+#define statereferences (clonedatoms) 
 
 // some defines for all the names, you may use ACTION, STATE and PARAMS
Index: src/Actions/FillAction/FillSphericalSurfaceAction.cpp
===================================================================
--- src/Actions/FillAction/FillSphericalSurfaceAction.cpp	(revision 57dd40cda8082273cb21c69bba6a7c8b5a561fca)
+++ src/Actions/FillAction/FillSphericalSurfaceAction.cpp	(revision 42b6de7c684d4c908777f116dccaf00a8e479cf2)
@@ -20,4 +20,6 @@
 #include "CodePatterns/MemDebug.hpp"
 
+#include "Actions/UndoRedoHelpers.hpp"
+#include "Atom/AtomicInfo.hpp"
 #include "Atom/CopyAtoms/CopyAtoms_withBonds.hpp"
 #include "CodePatterns/Log.hpp"
@@ -82,4 +84,5 @@
 
   // create predicate, mesh, and filler
+  std::vector<AtomicInfo> clonedatoms;
   bool successflag = false;
   {
@@ -101,7 +104,23 @@
       ClusterInterface::Cluster_impl cluster( new Cluster( filler->getAtomIds(), filler->getBoundingShape() ) );
       CopyAtoms_withBonds copyMethod;
-      successflag = (*fillerFunction)(copyMethod, cluster);
+      Filler::ClusterVector_t ClonedClusters;
+      successflag = (*fillerFunction)(copyMethod, cluster, ClonedClusters);
       delete fillerFunction;
+
+      // append each cluster's atoms to clonedatoms
+      for (Filler::ClusterVector_t::const_iterator iter = ClonedClusters.begin();
+          iter != ClonedClusters.end(); ++iter) {
+        const AtomIdSet &atoms = (*iter)->getAtomIds();
+        clonedatoms.reserve(clonedatoms.size()+atoms.size());
+        for (AtomIdSet::const_iterator atomiter = atoms.begin(); atomiter != atoms.end(); ++atomiter)
+          clonedatoms.push_back( AtomicInfo(*(*atomiter)) );
+      }
+      if (!successflag) {
+        ELOG(1, "Insertion failed, removing inserted clusters again.");
+        RemoveAtomsFromAtomicInfo(clonedatoms);
+        clonedatoms.clear();
+      }
     }
+
 
     // remove
@@ -112,5 +131,5 @@
 
   if (successflag)
-    return Action::success;
+    return Action::state_ptr(new FillSphericalSurfaceState(clonedatoms,params));
   else
     return Action::failure;
@@ -118,17 +137,27 @@
 
 Action::state_ptr FillSphericalSurfaceAction::performUndo(Action::state_ptr _state) {
-  return Action::failure;
+  FillSphericalSurfaceState *state = assert_cast<FillSphericalSurfaceState*>(_state.get());
+
+  // remove all created atoms
+  RemoveAtomsFromAtomicInfo(state->clonedatoms);
+
+  return Action::state_ptr(_state);
 }
 
 Action::state_ptr FillSphericalSurfaceAction::performRedo(Action::state_ptr _state){
-  return Action::failure;
+  FillSphericalSurfaceState *state = assert_cast<FillSphericalSurfaceState*>(_state.get());
+
+  if (AddAtomsFromAtomicInfo(state->clonedatoms))
+    return Action::state_ptr(_state);
+  else
+    return Action::failure;
 }
 
 bool FillSphericalSurfaceAction::canUndo() {
-  return false;
+  return true;
 }
 
 bool FillSphericalSurfaceAction::shouldUndo() {
-  return false;
+  return true;
 }
 /** =========== end of function ====================== */
Index: src/Actions/FillAction/FillSphericalSurfaceAction.def
===================================================================
--- src/Actions/FillAction/FillSphericalSurfaceAction.def	(revision 57dd40cda8082273cb21c69bba6a7c8b5a561fca)
+++ src/Actions/FillAction/FillSphericalSurfaceAction.def	(revision 42b6de7c684d4c908777f116dccaf00a8e479cf2)
@@ -7,6 +7,6 @@
 
 // all includes and forward declarations necessary for non-integral types below
-class atom;
-
+#include <vector>
+#include "Atom/AtomicInfo.hpp"
 #include "LinearAlgebra/Vector.hpp"
 
@@ -20,6 +20,6 @@
 #define paramreferences (center)(radius)(N)(mindistance)(AlignedAxis)
 
-#undef statetypes 
-#undef statereferences 
+#define statetypes (std::vector<AtomicInfo>) 
+#define statereferences (clonedatoms) 
 
 // some defines for all the names, you may use ACTION, STATE and PARAMS
