Index: src/Actions/WorldAction/AddEmptyBoundaryAction.cpp
===================================================================
--- src/Actions/WorldAction/AddEmptyBoundaryAction.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ src/Actions/WorldAction/AddEmptyBoundaryAction.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
@@ -0,0 +1,104 @@
+/*
+ * AddEmptyBoundaryAction.cpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#include "Actions/WorldAction/AddEmptyBoundaryAction.hpp"
+#include "CommandLineParser.hpp"
+#include "atom.hpp"
+#include "log.hpp"
+#include "vector.hpp"
+#include "World.hpp"
+
+#include <iostream>
+#include <string>
+#include <vector>
+
+using namespace std;
+
+#include "UIElements/UIFactory.hpp"
+#include "UIElements/Dialog.hpp"
+#include "Actions/MapOfActions.hpp"
+#include "Helpers/Assert.hpp"
+
+const char WorldAddEmptyBoundaryAction::NAME[] = "boundary";
+
+WorldAddEmptyBoundaryAction::WorldAddEmptyBoundaryAction() :
+  Action(NAME)
+{}
+
+WorldAddEmptyBoundaryAction::~WorldAddEmptyBoundaryAction()
+{}
+
+Action::state_ptr WorldAddEmptyBoundaryAction::performCall() {
+  Dialog *dialog = UIFactory::getInstance().makeDialog();
+  Vector boundary;
+  Vector Min;
+  Vector Max;
+  int j=0;
+
+  dialog->queryVector(NAME, &boundary, World::getInstance().getDomain(), false, MapOfActions::getInstance().getDescription(NAME));
+
+  if(dialog->display()) {
+    // get maximum and minimum
+    vector<atom *> AllAtoms = World::getInstance().getAllAtoms();
+    ASSERT(AllAtoms.size() > 0, "There must be atoms present for AddingEmptyBoundary.");
+    vector<atom *>::iterator AtomRunner = AllAtoms.begin();
+    Min = (*AtomRunner)->x;
+    Max = (*AtomRunner)->x;
+    for (; AtomRunner != AllAtoms.end(); ++AtomRunner) {
+      for (int i=0;i<NDIM;i++) {
+        if ((*AtomRunner)->x[i] > Max[i])
+          Max[i] = (*AtomRunner)->x[i];
+        if ((*AtomRunner)->x[i] < Min[i])
+          Min[i] = (*AtomRunner)->x[i];
+      }
+    }
+    // set new box size
+    double * const cell_size = World::getInstance().getDomain();
+    for (j=0;j<6;j++)
+      cell_size[j] = 0.;
+    j=-1;
+    for (int i=0;i<NDIM;i++) {
+      j += i+1;
+      cell_size[j] = (Max[i]-Min[i]+2.*boundary[i]);
+    }
+    // translate all atoms, such that Min is aty (0,0,0)
+    AtomRunner = AllAtoms.begin();
+    for (; AtomRunner != AllAtoms.end(); ++AtomRunner)
+      (*AtomRunner)->x -= Min;
+    delete dialog;
+    return Action::success;
+  } else {
+    delete dialog;
+    return Action::failure;
+  }
+}
+
+Action::state_ptr WorldAddEmptyBoundaryAction::performUndo(Action::state_ptr _state) {
+//  ParserLoadXyzState *state = assert_cast<ParserLoadXyzState*>(_state.get());
+
+  return Action::failure;
+//  string newName = state->mol->getName();
+//  state->mol->setName(state->lastName);
+//
+//  return Action::state_ptr(new ParserLoadXyzState(state->mol,newName));
+}
+
+Action::state_ptr WorldAddEmptyBoundaryAction::performRedo(Action::state_ptr _state){
+  return Action::failure;
+}
+
+bool WorldAddEmptyBoundaryAction::canUndo() {
+  return false;
+}
+
+bool WorldAddEmptyBoundaryAction::shouldUndo() {
+  return false;
+}
+
+const string WorldAddEmptyBoundaryAction::getName() {
+  return NAME;
+}
Index: src/Actions/WorldAction/AddEmptyBoundaryAction.hpp
===================================================================
--- src/Actions/WorldAction/AddEmptyBoundaryAction.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ src/Actions/WorldAction/AddEmptyBoundaryAction.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
@@ -0,0 +1,30 @@
+/*
+ * AddEmptyBoundaryAction.hpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#ifndef ADDEMPTYBOUNDARYACTION_HPP_
+#define ADDEMPTYBOUNDARYACTION_HPP_
+
+#include "Actions/Action.hpp"
+
+class WorldAddEmptyBoundaryAction : public Action {
+public:
+  WorldAddEmptyBoundaryAction();
+  virtual ~WorldAddEmptyBoundaryAction();
+
+  bool canUndo();
+  bool shouldUndo();
+
+  virtual const std::string getName();
+private:
+  virtual Action::state_ptr performCall();
+  virtual Action::state_ptr performUndo(Action::state_ptr);
+  virtual Action::state_ptr performRedo(Action::state_ptr);
+
+  static const char NAME[];
+};
+
+#endif /* ADDEMPTYBOUNDARYACTION_HPP_ */
Index: src/Actions/WorldAction/BoundInBoxAction.cpp
===================================================================
--- src/Actions/WorldAction/BoundInBoxAction.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ src/Actions/WorldAction/BoundInBoxAction.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
@@ -0,0 +1,76 @@
+/*
+ * BoundInBoxAction.cpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#include "Actions/WorldAction/BoundInBoxAction.hpp"
+#include "CommandLineParser.hpp"
+#include "log.hpp"
+#include "molecule.hpp"
+#include "World.hpp"
+
+#include <iostream>
+#include <string>
+#include <vector>
+
+using namespace std;
+
+#include "UIElements/UIFactory.hpp"
+#include "UIElements/Dialog.hpp"
+#include "Actions/MapOfActions.hpp"
+
+const char WorldBoundInBoxAction::NAME[] = "bound-in-box";
+
+WorldBoundInBoxAction::WorldBoundInBoxAction() :
+  Action(NAME)
+{}
+
+WorldBoundInBoxAction::~WorldBoundInBoxAction()
+{}
+
+Action::state_ptr WorldBoundInBoxAction::performCall() {
+  Dialog *dialog = UIFactory::getInstance().makeDialog();
+
+  dialog->queryEmpty(NAME, MapOfActions::getInstance().getDescription(NAME));
+
+  if(dialog->display()) {
+    // center
+    vector<molecule*> AllMolecules = World::getInstance().getAllMolecules();
+    for (vector<molecule*>::iterator MolRunner = AllMolecules.begin(); MolRunner != AllMolecules.end(); ++MolRunner) {
+      (*MolRunner)->BoundInBox();
+    }
+    delete dialog;
+    return Action::success;
+  } else {
+    delete dialog;
+    return Action::failure;
+  }
+}
+
+Action::state_ptr WorldBoundInBoxAction::performUndo(Action::state_ptr _state) {
+//  ParserLoadXyzState *state = assert_cast<ParserLoadXyzState*>(_state.get());
+
+  return Action::failure;
+//  string newName = state->mol->getName();
+//  state->mol->setName(state->lastName);
+//
+//  return Action::state_ptr(new ParserLoadXyzState(state->mol,newName));
+}
+
+Action::state_ptr WorldBoundInBoxAction::performRedo(Action::state_ptr _state){
+  return Action::failure;
+}
+
+bool WorldBoundInBoxAction::canUndo() {
+  return false;
+}
+
+bool WorldBoundInBoxAction::shouldUndo() {
+  return false;
+}
+
+const string WorldBoundInBoxAction::getName() {
+  return NAME;
+}
Index: src/Actions/WorldAction/BoundInBoxAction.hpp
===================================================================
--- src/Actions/WorldAction/BoundInBoxAction.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ src/Actions/WorldAction/BoundInBoxAction.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
@@ -0,0 +1,30 @@
+/*
+ * BoundInBoxAction.hpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#ifndef BOUNDINBOXACTION_HPP_
+#define BOUNDINBOXACTION_HPP_
+
+#include "Actions/Action.hpp"
+
+class WorldBoundInBoxAction : public Action {
+public:
+  WorldBoundInBoxAction();
+  virtual ~WorldBoundInBoxAction();
+
+  bool canUndo();
+  bool shouldUndo();
+
+  virtual const std::string getName();
+private:
+  virtual Action::state_ptr performCall();
+  virtual Action::state_ptr performUndo(Action::state_ptr);
+  virtual Action::state_ptr performRedo(Action::state_ptr);
+
+  static const char NAME[];
+};
+
+#endif /* BOUNDINBOXACTION_HPP_ */
Index: src/Actions/WorldAction/CenterInBoxAction.cpp
===================================================================
--- src/Actions/WorldAction/CenterInBoxAction.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ src/Actions/WorldAction/CenterInBoxAction.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
@@ -0,0 +1,75 @@
+/*
+ * CenterInBoxAction.cpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#include "Actions/WorldAction/CenterInBoxAction.hpp"
+#include "CommandLineParser.hpp"
+#include "log.hpp"
+#include "molecule.hpp"
+#include "World.hpp"
+
+#include <iostream>
+#include <string>
+
+using namespace std;
+
+#include "UIElements/UIFactory.hpp"
+#include "UIElements/Dialog.hpp"
+#include "Actions/MapOfActions.hpp"
+
+const char WorldCenterInBoxAction::NAME[] = "center-in-box";
+
+WorldCenterInBoxAction::WorldCenterInBoxAction() :
+  Action(NAME)
+{}
+
+WorldCenterInBoxAction::~WorldCenterInBoxAction()
+{}
+
+Action::state_ptr WorldCenterInBoxAction::performCall() {
+  Dialog *dialog = UIFactory::getInstance().makeDialog();
+
+  dialog->queryEmpty(NAME, MapOfActions::getInstance().getDescription(NAME));
+
+  if(dialog->display()) {
+    // center
+    vector<molecule *> AllMolecules = World::getInstance().getAllMolecules();
+    for (vector<molecule*>::iterator MolRunner = AllMolecules.begin(); MolRunner != AllMolecules.end(); ++MolRunner) {
+      (*MolRunner)->CenterInBox();
+    }
+    delete dialog;
+    return Action::success;
+  } else {
+    delete dialog;
+    return Action::failure;
+  }
+}
+
+Action::state_ptr WorldCenterInBoxAction::performUndo(Action::state_ptr _state) {
+//  ParserLoadXyzState *state = assert_cast<ParserLoadXyzState*>(_state.get());
+
+  return Action::failure;
+//  string newName = state->mol->getName();
+//  state->mol->setName(state->lastName);
+//
+//  return Action::state_ptr(new ParserLoadXyzState(state->mol,newName));
+}
+
+Action::state_ptr WorldCenterInBoxAction::performRedo(Action::state_ptr _state){
+  return Action::failure;
+}
+
+bool WorldCenterInBoxAction::canUndo() {
+  return false;
+}
+
+bool WorldCenterInBoxAction::shouldUndo() {
+  return false;
+}
+
+const string WorldCenterInBoxAction::getName() {
+  return NAME;
+}
Index: src/Actions/WorldAction/CenterInBoxAction.hpp
===================================================================
--- src/Actions/WorldAction/CenterInBoxAction.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ src/Actions/WorldAction/CenterInBoxAction.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
@@ -0,0 +1,30 @@
+/*
+ * CenterInBoxAction.hpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#ifndef CENTERINBOXACTION_HPP_
+#define CENTERINBOXACTION_HPP_
+
+#include "Actions/Action.hpp"
+
+class WorldCenterInBoxAction : public Action {
+public:
+  WorldCenterInBoxAction();
+  virtual ~WorldCenterInBoxAction();
+
+  bool canUndo();
+  bool shouldUndo();
+
+  virtual const std::string getName();
+private:
+  virtual Action::state_ptr performCall();
+  virtual Action::state_ptr performUndo(Action::state_ptr);
+  virtual Action::state_ptr performRedo(Action::state_ptr);
+
+  static const char NAME[];
+};
+
+#endif /* CENTERINBOXACTION_HPP_ */
Index: src/Actions/WorldAction/CenterOnEdgeAction.cpp
===================================================================
--- src/Actions/WorldAction/CenterOnEdgeAction.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ src/Actions/WorldAction/CenterOnEdgeAction.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
@@ -0,0 +1,101 @@
+/*
+ * CenterOnEdgeAction.cpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#include "Actions/WorldAction/CenterOnEdgeAction.hpp"
+#include "CommandLineParser.hpp"
+#include "atom.hpp"
+#include "log.hpp"
+#include "vector.hpp"
+#include "World.hpp"
+
+#include <iostream>
+#include <string>
+
+using namespace std;
+
+#include "UIElements/UIFactory.hpp"
+#include "UIElements/Dialog.hpp"
+#include "Actions/MapOfActions.hpp"
+#include "Helpers/Assert.hpp"
+
+const char WorldCenterOnEdgeAction::NAME[] = "center-edge";
+
+WorldCenterOnEdgeAction::WorldCenterOnEdgeAction() :
+  Action(NAME)
+{}
+
+WorldCenterOnEdgeAction::~WorldCenterOnEdgeAction()
+{}
+
+Action::state_ptr WorldCenterOnEdgeAction::performCall() {
+  Dialog *dialog = UIFactory::getInstance().makeDialog();
+  Vector Min;
+  Vector Max;
+  int j=0;
+
+  dialog->queryEmpty(NAME, MapOfActions::getInstance().getDescription(NAME));
+
+  if(dialog->display()) {
+    // get maximum and minimum
+    vector<atom *> AllAtoms = World::getInstance().getAllAtoms();
+    ASSERT(AllAtoms.size() > 0, "For CenteronEdge atoms must be present.");
+    vector<atom *>::iterator AtomRunner = AllAtoms.begin();
+    Min = (*AtomRunner)->x;
+    Max = (*AtomRunner)->x;
+    for (; AtomRunner != AllAtoms.end(); ++AtomRunner) {
+      for (int i=0;i<NDIM;i++) {
+        if ((*AtomRunner)->x[i] > Max[i])
+          Max[i] = (*AtomRunner)->x[i];
+        if ((*AtomRunner)->x[i] < Min[i])
+          Min[i] = (*AtomRunner)->x[i];
+      }
+    }
+    // set new box size
+    double * const cell_size = World::getInstance().getDomain();
+    for (j=0;j<6;j++)
+      cell_size[j] = 0.;
+    j=-1;
+    for (int i=0;i<NDIM;i++) {
+      j += i+1;
+      cell_size[j] = (Max[i]-Min[i]);
+    }
+    // translate all atoms, such that Min is aty (0,0,0)
+    for (vector<atom*>::iterator AtomRunner = AllAtoms.begin(); AtomRunner != AllAtoms.end(); ++AtomRunner)
+      (*AtomRunner)->x -= Min;
+    delete dialog;
+    return Action::success;
+  } else {
+    delete dialog;
+    return Action::failure;
+  }
+}
+
+Action::state_ptr WorldCenterOnEdgeAction::performUndo(Action::state_ptr _state) {
+//  ParserLoadXyzState *state = assert_cast<ParserLoadXyzState*>(_state.get());
+
+  return Action::failure;
+//  string newName = state->mol->getName();
+//  state->mol->setName(state->lastName);
+//
+//  return Action::state_ptr(new ParserLoadXyzState(state->mol,newName));
+}
+
+Action::state_ptr WorldCenterOnEdgeAction::performRedo(Action::state_ptr _state){
+  return Action::failure;
+}
+
+bool WorldCenterOnEdgeAction::canUndo() {
+  return false;
+}
+
+bool WorldCenterOnEdgeAction::shouldUndo() {
+  return false;
+}
+
+const string WorldCenterOnEdgeAction::getName() {
+  return NAME;
+}
Index: src/Actions/WorldAction/CenterOnEdgeAction.hpp
===================================================================
--- src/Actions/WorldAction/CenterOnEdgeAction.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ src/Actions/WorldAction/CenterOnEdgeAction.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
@@ -0,0 +1,30 @@
+/*
+ * CenterOnEdgeAction.hpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#ifndef CENTERONEDGEACTION_HPP_
+#define CENTERONEDGEACTION_HPP_
+
+#include "Actions/Action.hpp"
+
+class WorldCenterOnEdgeAction : public Action {
+public:
+  WorldCenterOnEdgeAction();
+  virtual ~WorldCenterOnEdgeAction();
+
+  bool canUndo();
+  bool shouldUndo();
+
+  virtual const std::string getName();
+private:
+  virtual Action::state_ptr performCall();
+  virtual Action::state_ptr performUndo(Action::state_ptr);
+  virtual Action::state_ptr performRedo(Action::state_ptr);
+
+  static const char NAME[];
+};
+
+#endif /* CENTERONEDGEACTION_HPP_ */
Index: src/Actions/WorldAction/ChangeBoxAction.cpp
===================================================================
--- src/Actions/WorldAction/ChangeBoxAction.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ src/Actions/WorldAction/ChangeBoxAction.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
@@ -0,0 +1,72 @@
+/*
+ * ChangeBoxAction.cpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#include "Actions/WorldAction/ChangeBoxAction.hpp"
+#include "CommandLineParser.hpp"
+#include "log.hpp"
+#include "verbose.hpp"
+#include "World.hpp"
+
+#include <iostream>
+#include <string>
+
+using namespace std;
+
+#include "UIElements/UIFactory.hpp"
+#include "UIElements/Dialog.hpp"
+#include "Actions/MapOfActions.hpp"
+
+const char WorldChangeBoxAction::NAME[] = "change-box";
+
+WorldChangeBoxAction::WorldChangeBoxAction() :
+  Action(NAME)
+{}
+
+WorldChangeBoxAction::~WorldChangeBoxAction()
+{}
+
+Action::state_ptr WorldChangeBoxAction::performCall() {
+  Dialog *dialog = UIFactory::getInstance().makeDialog();
+
+  double * cell_size = World::getInstance().getDomain();
+  dialog->queryBox(NAME, &cell_size, MapOfActions::getInstance().getDescription(NAME));
+
+  if(dialog->display()) {
+    DoLog(0) && (Log() << Verbose(0) << "Setting box domain to " << cell_size[0] << "," << cell_size[1] << "," << cell_size[2] << "," << cell_size[3] << "," << cell_size[4] << "," << cell_size[5] << "," << endl);
+    delete dialog;
+    return Action::success;
+  } else {
+    delete dialog;
+    return Action::failure;
+  }
+}
+
+Action::state_ptr WorldChangeBoxAction::performUndo(Action::state_ptr _state) {
+//  ParserLoadXyzState *state = assert_cast<ParserLoadXyzState*>(_state.get());
+
+  return Action::failure;
+//  string newName = state->mol->getName();
+//  state->mol->setName(state->lastName);
+//
+//  return Action::state_ptr(new ParserLoadXyzState(state->mol,newName));
+}
+
+Action::state_ptr WorldChangeBoxAction::performRedo(Action::state_ptr _state){
+  return Action::failure;
+}
+
+bool WorldChangeBoxAction::canUndo() {
+  return false;
+}
+
+bool WorldChangeBoxAction::shouldUndo() {
+  return false;
+}
+
+const string WorldChangeBoxAction::getName() {
+  return NAME;
+}
Index: src/Actions/WorldAction/ChangeBoxAction.hpp
===================================================================
--- src/Actions/WorldAction/ChangeBoxAction.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ src/Actions/WorldAction/ChangeBoxAction.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
@@ -0,0 +1,30 @@
+/*
+ * ChangeBoxAction.hpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#ifndef CHANGEBOXACTION_HPP_
+#define CHANGEBOXACTION_HPP_
+
+#include "Actions/Action.hpp"
+
+class WorldChangeBoxAction : public Action {
+public:
+  WorldChangeBoxAction();
+  virtual ~WorldChangeBoxAction();
+
+  bool canUndo();
+  bool shouldUndo();
+
+  virtual const std::string getName();
+private:
+  virtual Action::state_ptr performCall();
+  virtual Action::state_ptr performUndo(Action::state_ptr);
+  virtual Action::state_ptr performRedo(Action::state_ptr);
+
+  static const char NAME[];
+};
+
+#endif /* CHANGEBOXACTION_HPP_ */
Index: src/Actions/WorldAction/RemoveSphereOfAtomsAction.cpp
===================================================================
--- src/Actions/WorldAction/RemoveSphereOfAtomsAction.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ src/Actions/WorldAction/RemoveSphereOfAtomsAction.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
@@ -0,0 +1,87 @@
+/*
+ * RemoveSphereOfAtomsAction.cpp
+ *
+ *  Created on: May 12, 2010
+ *      Author: heber
+ */
+
+#include "Actions/WorldAction/RemoveSphereOfAtomsAction.hpp"
+#include "CommandLineParser.hpp"
+#include "atom.hpp"
+#include "Descriptors/AtomDescriptor.hpp"
+#include "log.hpp"
+#include "vector.hpp"
+#include "verbose.hpp"
+#include "World.hpp"
+
+#include <iostream>
+#include <string>
+
+using namespace std;
+
+#include "UIElements/UIFactory.hpp"
+#include "UIElements/Dialog.hpp"
+#include "Actions/MapOfActions.hpp"
+
+const char WorldRemoveSphereOfAtomsAction::NAME[] = "remove-sphere";
+
+WorldRemoveSphereOfAtomsAction::WorldRemoveSphereOfAtomsAction() :
+  Action(NAME)
+{}
+
+WorldRemoveSphereOfAtomsAction::~WorldRemoveSphereOfAtomsAction()
+{}
+
+Action::state_ptr WorldRemoveSphereOfAtomsAction::performCall() {
+  Dialog *dialog = UIFactory::getInstance().makeDialog();
+  double radius = 0.;
+  atom *first = NULL;
+
+  dialog->queryDouble(NAME, &radius, MapOfActions::getInstance().getDescription(NAME));
+  dialog->queryAtom("atom-by-id", &first, MapOfActions::getInstance().getDescription("atom-by-id"));
+
+  if(dialog->display()) {
+    delete dialog;
+    DoLog(1) && (Log() << Verbose(1) << "Removing atoms around " << first->nr << " with radius " << radius << "." << endl);
+    vector<atom*> AllAtoms = World::getInstance().getAllAtoms();
+    vector<atom*>::iterator AtomAdvancer = AllAtoms.begin();
+    for (vector<atom*>::iterator AtomRunner = AtomAdvancer; AtomRunner != AllAtoms.end(); ) {
+      ++AtomAdvancer;
+      if (first != *AtomRunner) // dont't destroy reference ...
+        if (first->x.DistanceSquared((*AtomRunner)->x) > radius*radius) // distance to first above radius ...
+          World::getInstance().destroyAtom(*AtomRunner);
+    }
+    World::getInstance().destroyAtom(first);
+    return Action::success;
+  } else {
+    delete dialog;
+    return Action::failure;
+  }
+
+}
+
+Action::state_ptr WorldRemoveSphereOfAtomsAction::performUndo(Action::state_ptr _state) {
+//  ParserLoadXyzState *state = assert_cast<ParserLoadXyzState*>(_state.get());
+
+  return Action::failure;
+//  string newName = state->mol->getName();
+//  state->mol->setName(state->lastName);
+//
+//  return Action::state_ptr(new ParserLoadXyzState(state->mol,newName));
+}
+
+Action::state_ptr WorldRemoveSphereOfAtomsAction::performRedo(Action::state_ptr _state){
+  return Action::failure;
+}
+
+bool WorldRemoveSphereOfAtomsAction::canUndo() {
+  return false;
+}
+
+bool WorldRemoveSphereOfAtomsAction::shouldUndo() {
+  return false;
+}
+
+const string WorldRemoveSphereOfAtomsAction::getName() {
+  return NAME;
+}
Index: src/Actions/WorldAction/RemoveSphereOfAtomsAction.hpp
===================================================================
--- src/Actions/WorldAction/RemoveSphereOfAtomsAction.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ src/Actions/WorldAction/RemoveSphereOfAtomsAction.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
@@ -0,0 +1,30 @@
+/*
+ * RemoveSphereOfAtomsAction.hpp
+ *
+ *  Created on: May 9, 2010
+ *      Author: heber
+ */
+
+#ifndef REMOVESPHEREOFATOMS_HPP_
+#define REMOVESPHEREOFATOMS_HPP_
+
+#include "Actions/Action.hpp"
+
+class WorldRemoveSphereOfAtomsAction : public Action {
+public:
+  WorldRemoveSphereOfAtomsAction();
+  virtual ~WorldRemoveSphereOfAtomsAction();
+
+  bool canUndo();
+  bool shouldUndo();
+
+  virtual const std::string getName();
+private:
+  virtual Action::state_ptr performCall();
+  virtual Action::state_ptr performUndo(Action::state_ptr);
+  virtual Action::state_ptr performRedo(Action::state_ptr);
+
+  static const char NAME[];
+};
+
+#endif /* REMOVESPHEREOFATOMS_HPP_ */
Index: src/Actions/WorldAction/RepeatBoxAction.cpp
===================================================================
--- src/Actions/WorldAction/RepeatBoxAction.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ src/Actions/WorldAction/RepeatBoxAction.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
@@ -0,0 +1,126 @@
+/*
+ * RepeatBoxAction.cpp
+ *
+ *  Created on: May 12, 2010
+ *      Author: heber
+ */
+
+#include "Actions/WorldAction/RepeatBoxAction.hpp"
+#include "CommandLineParser.hpp"
+#include "atom.hpp"
+#include "log.hpp"
+#include "molecule.hpp"
+#include "vector.hpp"
+#include "verbose.hpp"
+#include "World.hpp"
+
+#include <iostream>
+#include <string>
+
+using namespace std;
+
+#include "UIElements/UIFactory.hpp"
+#include "UIElements/Dialog.hpp"
+#include "Actions/MapOfActions.hpp"
+
+const char WorldRepeatBoxAction::NAME[] = "repeat-box";
+
+WorldRepeatBoxAction::WorldRepeatBoxAction() :
+  Action(NAME)
+{}
+
+WorldRepeatBoxAction::~WorldRepeatBoxAction()
+{}
+
+Action::state_ptr WorldRepeatBoxAction::performCall() {
+  Dialog *dialog = UIFactory::getInstance().makeDialog();
+  Vector Repeater;
+  int count;
+  const element ** Elements;
+  molecule *mol = NULL;
+  int j = 0;
+
+  dialog->queryVector(NAME, &Repeater, World::getInstance().getDomain(), false, MapOfActions::getInstance().getDescription(NAME));
+  dialog->queryMolecule("molecule-by-id", &mol,MapOfActions::getInstance().getDescription("molecule-by-id"));
+
+  if(dialog->display()) {
+    double * const cell_size = World::getInstance().getDomain();
+    Vector x,y;
+    for (int axis = 1; axis <= NDIM; axis++) {
+      Vector ** vectors;
+      Repeater[axis] = floor(Repeater[axis]);
+      if (Repeater[axis] < 1) {
+        DoeLog(1) && (eLog()<< Verbose(1) << "Repetition factor must be greater than 1!" << endl);
+        Repeater[axis] = 1;
+      }
+      mol->CountAtoms();  // recount atoms
+      if (mol->AtomCount != 0) {  // if there is more than none
+        count = mol->AtomCount;   // is changed becausing of adding, thus has to be stored away beforehand
+        Elements = new const element *[count];
+        vectors = new Vector *[count];
+        j = 0;
+        atom *first = mol->start;
+        while (first->next != mol->end) {  // make a list of all atoms with coordinates and element
+          first = first->next;
+          Elements[j] = first->type;
+          vectors[j] = &first->x;
+          j++;
+        }
+        if (count != j)
+          DoeLog(1) && (eLog()<< Verbose(1) << "AtomCount " << count << " is not equal to number of atoms in molecule " << j << "!" << endl);
+        x.Zero();
+        y.Zero();
+        y[abs(axis)-1] = cell_size[(abs(axis) == 2) ? 2 : ((abs(axis) == 3) ? 5 : 0)] * abs(axis)/axis; // last term is for sign, first is for magnitude
+        for (int i=1;i<Repeater[axis];i++) {  // then add this list with respective translation factor times
+          x += y; // per factor one cell width further
+          for (int k=count;k--;) { // go through every atom of the original cell
+            first = World::getInstance().createAtom(); // create a new body
+            first->x = (*vectors[k]) + x;
+            first->type = Elements[k];  // insert original element
+            mol->AddAtom(first);        // and add to the molecule (which increments ElementsInMolecule, AtomCount, ...)
+          }
+        }
+        // free memory
+        delete[](Elements);
+        delete[](vectors);
+        // correct cell size
+        if (axis < 0) { // if sign was negative, we have to translate everything
+          x =(-(Repeater[axis]-1)) * y;
+          mol->Translate(&x);
+        }
+        cell_size[(abs(axis) == 2) ? 2 : ((abs(axis) == 3) ? 5 : 0)] *= Repeater[axis];
+      }
+    }
+    delete dialog;
+    return Action::success;
+  } else {
+    delete dialog;
+    return Action::failure;
+  }
+}
+
+Action::state_ptr WorldRepeatBoxAction::performUndo(Action::state_ptr _state) {
+//  ParserLoadXyzState *state = assert_cast<ParserLoadXyzState*>(_state.get());
+
+  return Action::failure;
+//  string newName = state->mol->getName();
+//  state->mol->setName(state->lastName);
+//
+//  return Action::state_ptr(new ParserLoadXyzState(state->mol,newName));
+}
+
+Action::state_ptr WorldRepeatBoxAction::performRedo(Action::state_ptr _state){
+  return Action::failure;
+}
+
+bool WorldRepeatBoxAction::canUndo() {
+  return false;
+}
+
+bool WorldRepeatBoxAction::shouldUndo() {
+  return false;
+}
+
+const string WorldRepeatBoxAction::getName() {
+  return NAME;
+}
Index: src/Actions/WorldAction/RepeatBoxAction.hpp
===================================================================
--- src/Actions/WorldAction/RepeatBoxAction.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ src/Actions/WorldAction/RepeatBoxAction.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
@@ -0,0 +1,30 @@
+/*
+ * RepeatBoxAction.hpp
+ *
+ *  Created on: May 12, 2010
+ *      Author: heber
+ */
+
+#ifndef REPEATBOXACTION_HPP_
+#define REPEATBOXACTION_HPP_
+
+#include "Actions/Action.hpp"
+
+class WorldRepeatBoxAction : public Action {
+public:
+  WorldRepeatBoxAction();
+  virtual ~WorldRepeatBoxAction();
+
+  bool canUndo();
+  bool shouldUndo();
+
+  virtual const std::string getName();
+private:
+  virtual Action::state_ptr performCall();
+  virtual Action::state_ptr performUndo(Action::state_ptr);
+  virtual Action::state_ptr performRedo(Action::state_ptr);
+
+  static const char NAME[];
+};
+
+#endif /* REPEATBOXACTION_HPP_ */
Index: src/Actions/WorldAction/ScaleBoxAction.cpp
===================================================================
--- src/Actions/WorldAction/ScaleBoxAction.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ src/Actions/WorldAction/ScaleBoxAction.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
@@ -0,0 +1,89 @@
+/*
+ * ScaleBoxAction.cpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#include "Actions/WorldAction/ScaleBoxAction.hpp"
+#include "CommandLineParser.hpp"
+#include "atom.hpp"
+#include "log.hpp"
+#include "vector.hpp"
+#include "verbose.hpp"
+#include "World.hpp"
+
+#include <iostream>
+#include <string>
+
+using namespace std;
+
+#include "UIElements/UIFactory.hpp"
+#include "UIElements/Dialog.hpp"
+#include "Actions/MapOfActions.hpp"
+
+const char WorldScaleBoxAction::NAME[] = "scale-box";
+
+WorldScaleBoxAction::WorldScaleBoxAction() :
+  Action(NAME)
+{}
+
+WorldScaleBoxAction::~WorldScaleBoxAction()
+{}
+
+Action::state_ptr WorldScaleBoxAction::performCall() {
+  Dialog *dialog = UIFactory::getInstance().makeDialog();
+  Vector Scaler;
+  double x[NDIM];
+  int j=0;
+
+  dialog->queryVector(NAME, &Scaler, World::getInstance().getDomain(), false, MapOfActions::getInstance().getDescription(NAME));
+
+  if(dialog->display()) {
+    DoLog(1) && (Log() << Verbose(1) << "Scaling all atomic positions by factor." << endl);
+    for (int i=0;i<NDIM;i++)
+      x[i] = Scaler[i];
+    vector<atom*> AllAtoms = World::getInstance().getAllAtoms();
+    for(vector<atom*>::iterator AtomRunner = AllAtoms.begin(); AtomRunner != AllAtoms.end(); ++AtomRunner) {
+      (*AtomRunner)->x.ScaleAll(x);
+    }
+    j = -1;
+    double * const cell_size = World::getInstance().getDomain();
+    for (int i=0;i<NDIM;i++) {
+      j += i+1;
+      cell_size[j]*=x[i];
+    }
+
+    delete dialog;
+    return Action::success;
+  } else {
+    delete dialog;
+    return Action::failure;
+  }
+}
+
+Action::state_ptr WorldScaleBoxAction::performUndo(Action::state_ptr _state) {
+//  ParserLoadXyzState *state = assert_cast<ParserLoadXyzState*>(_state.get());
+
+  return Action::failure;
+//  string newName = state->mol->getName();
+//  state->mol->setName(state->lastName);
+//
+//  return Action::state_ptr(new ParserLoadXyzState(state->mol,newName));
+}
+
+Action::state_ptr WorldScaleBoxAction::performRedo(Action::state_ptr _state){
+  return Action::failure;
+}
+
+bool WorldScaleBoxAction::canUndo() {
+  return false;
+}
+
+bool WorldScaleBoxAction::shouldUndo() {
+  return false;
+}
+
+const string WorldScaleBoxAction::getName() {
+  return NAME;
+}
Index: src/Actions/WorldAction/ScaleBoxAction.hpp
===================================================================
--- src/Actions/WorldAction/ScaleBoxAction.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ src/Actions/WorldAction/ScaleBoxAction.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
@@ -0,0 +1,30 @@
+/*
+ * ScaleBoxAction.hpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#ifndef SCALEBOXACTION_HPP_
+#define SCALEBOXACTION_HPP_
+
+#include "Actions/Action.hpp"
+
+class WorldScaleBoxAction : public Action {
+public:
+  WorldScaleBoxAction();
+  virtual ~WorldScaleBoxAction();
+
+  bool canUndo();
+  bool shouldUndo();
+
+  virtual const std::string getName();
+private:
+  virtual Action::state_ptr performCall();
+  virtual Action::state_ptr performUndo(Action::state_ptr);
+  virtual Action::state_ptr performRedo(Action::state_ptr);
+
+  static const char NAME[];
+};
+
+#endif /* SCALEBOXACTION_HPP_ */
Index: src/Actions/WorldAction/SetDefaultNameAction.cpp
===================================================================
--- src/Actions/WorldAction/SetDefaultNameAction.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ src/Actions/WorldAction/SetDefaultNameAction.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
@@ -0,0 +1,74 @@
+/*
+ * SetDefaultNameAction.cpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#include "Actions/WorldAction/SetDefaultNameAction.hpp"
+#include "CommandLineParser.hpp"
+#include "log.hpp"
+#include "World.hpp"
+
+#include <iostream>
+#include <string>
+
+using namespace std;
+
+#include "UIElements/UIFactory.hpp"
+#include "UIElements/Dialog.hpp"
+#include "Actions/MapOfActions.hpp"
+
+const char WorldSetDefaultNameAction::NAME[] = "default-molname";
+
+WorldSetDefaultNameAction::WorldSetDefaultNameAction() :
+  Action(NAME)
+{}
+
+WorldSetDefaultNameAction::~WorldSetDefaultNameAction()
+{}
+
+Action::state_ptr WorldSetDefaultNameAction::performCall() {
+  Dialog *dialog = UIFactory::getInstance().makeDialog();
+  string defaultname;
+
+  defaultname = World::getInstance().getDefaultName();
+  dialog->queryString(NAME, &defaultname, MapOfActions::getInstance().getDescription(NAME));
+
+  if(dialog->display()) {
+    char outputname[MAXSTRINGSIZE];
+    strcpy(outputname, defaultname.c_str());
+    World::getInstance().setDefaultName(outputname);
+    delete dialog;
+    return Action::success;
+  } else {
+    delete dialog;
+    return Action::failure;
+  }
+}
+
+Action::state_ptr WorldSetDefaultNameAction::performUndo(Action::state_ptr _state) {
+//  ParserLoadXyzState *state = assert_cast<ParserLoadXyzState*>(_state.get());
+
+  return Action::failure;
+//  string newName = state->mol->getName();
+//  state->mol->setName(state->lastName);
+//
+//  return Action::state_ptr(new ParserLoadXyzState(state->mol,newName));
+}
+
+Action::state_ptr WorldSetDefaultNameAction::performRedo(Action::state_ptr _state){
+  return Action::failure;
+}
+
+bool WorldSetDefaultNameAction::canUndo() {
+  return false;
+}
+
+bool WorldSetDefaultNameAction::shouldUndo() {
+  return false;
+}
+
+const string WorldSetDefaultNameAction::getName() {
+  return NAME;
+}
Index: src/Actions/WorldAction/SetDefaultNameAction.hpp
===================================================================
--- src/Actions/WorldAction/SetDefaultNameAction.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ src/Actions/WorldAction/SetDefaultNameAction.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
@@ -0,0 +1,30 @@
+/*
+ * SetDefaultNameAction.hpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#ifndef SETDEFAULTNAMEACTION_HPP_
+#define SETDEFAULTNAMEACTION_HPP_
+
+#include "Actions/Action.hpp"
+
+class WorldSetDefaultNameAction : public Action {
+public:
+  WorldSetDefaultNameAction();
+  virtual ~WorldSetDefaultNameAction();
+
+  bool canUndo();
+  bool shouldUndo();
+
+  virtual const std::string getName();
+private:
+  virtual Action::state_ptr performCall();
+  virtual Action::state_ptr performUndo(Action::state_ptr);
+  virtual Action::state_ptr performRedo(Action::state_ptr);
+
+  static const char NAME[];
+};
+
+#endif /* SETDEFAULTNAMEACTION_HPP_ */
Index: src/Actions/WorldAction/SetGaussianBasisAction.cpp
===================================================================
--- src/Actions/WorldAction/SetGaussianBasisAction.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ src/Actions/WorldAction/SetGaussianBasisAction.cpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
@@ -0,0 +1,69 @@
+/*
+ * SetGaussianBasisAction.cpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#include "Actions/WorldAction/SetGaussianBasisAction.hpp"
+#include "CommandLineParser.hpp"
+#include "config.hpp"
+#include "World.hpp"
+
+#include <iostream>
+#include <string>
+
+using namespace std;
+
+#include "UIElements/UIFactory.hpp"
+#include "UIElements/Dialog.hpp"
+#include "Actions/MapOfActions.hpp"
+
+const char WorldSetGaussianBasisAction::NAME[] = "set-basis";
+
+WorldSetGaussianBasisAction::WorldSetGaussianBasisAction() :
+  Action(NAME)
+{}
+
+WorldSetGaussianBasisAction::~WorldSetGaussianBasisAction()
+{}
+
+Action::state_ptr WorldSetGaussianBasisAction::performCall() {
+  Dialog *dialog = UIFactory::getInstance().makeDialog();
+
+  dialog->queryString(NAME, &World::getInstance().getConfig()->basis, MapOfActions::getInstance().getDescription(NAME));
+
+  if(dialog->display()) {
+    delete dialog;
+    return Action::success;
+  } else {
+    delete dialog;
+    return Action::failure;
+  }
+}
+
+Action::state_ptr WorldSetGaussianBasisAction::performUndo(Action::state_ptr _state) {
+//  ParserLoadXyzState *state = assert_cast<ParserLoadXyzState*>(_state.get());
+
+  return Action::failure;
+//  string newName = state->mol->getName();
+//  state->mol->setName(state->lastName);
+//
+//  return Action::state_ptr(new ParserLoadXyzState(state->mol,newName));
+}
+
+Action::state_ptr WorldSetGaussianBasisAction::performRedo(Action::state_ptr _state){
+  return Action::failure;
+}
+
+bool WorldSetGaussianBasisAction::canUndo() {
+  return false;
+}
+
+bool WorldSetGaussianBasisAction::shouldUndo() {
+  return false;
+}
+
+const string WorldSetGaussianBasisAction::getName() {
+  return NAME;
+}
Index: src/Actions/WorldAction/SetGaussianBasisAction.hpp
===================================================================
--- src/Actions/WorldAction/SetGaussianBasisAction.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
+++ src/Actions/WorldAction/SetGaussianBasisAction.hpp	(revision 97ebf8b2670d891c06f34ede7594c6708e07d886)
@@ -0,0 +1,30 @@
+/*
+ * SetGaussianBasisAction.hpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#ifndef SETGAUSSIANBASISACTION_HPP_
+#define SETGAUSSIANBASISACTION_HPP_
+
+#include "Actions/Action.hpp"
+
+class WorldSetGaussianBasisAction : public Action {
+public:
+  WorldSetGaussianBasisAction();
+  virtual ~WorldSetGaussianBasisAction();
+
+  bool canUndo();
+  bool shouldUndo();
+
+  virtual const std::string getName();
+private:
+  virtual Action::state_ptr performCall();
+  virtual Action::state_ptr performUndo(Action::state_ptr);
+  virtual Action::state_ptr performRedo(Action::state_ptr);
+
+  static const char NAME[];
+};
+
+#endif /* SETGAUSSIANBASISACTION_HPP_ */
