Index: src/Actions/FragmentationAction/MolecularDynamicsAction.hpp
===================================================================
--- src/Actions/FragmentationAction/MolecularDynamicsAction.hpp	(revision 237f9339687fa2ab9fabd26196828a79d99f1307)
+++ src/Actions/FragmentationAction/MolecularDynamicsAction.hpp	(revision f47e00b9f5f390d99eb3b523faf1a7e16ed49fd6)
@@ -21,108 +21,2 @@
 
 #endif /* MOLECULARDYNAMICSACTION_HPP_ */
-
-//// some derived names: if CATEGORY is not given, we don't prefix with it
-//#ifdef CATEGORY
-//#define ACTION BOOST_PP_CAT(CATEGORY, BOOST_PP_CAT(ACTIONNAME, Action))
-//#define COMMAND BOOST_PP_CAT(CATEGORY, ACTIONNAME)
-//#define PARAMS BOOST_PP_CAT(CATEGORY, BOOST_PP_CAT(ACTIONNAME, Parameters))
-//#else
-//#define ACTION BOOST_PP_CAT(ACTIONNAME, Action)
-//#define COMMAND ACTIONNAME
-//#define PARAMS BOOST_PP_CAT(ACTIONNAME, Parameters)
-//#endif
-//// check if no lists given
-//#ifndef paramtypes
-//#define MAXPARAMTYPES 0
-//#else
-//#define MAXPARAMTYPES BOOST_PP_SEQ_SIZE(paramtypes)
-//#endif
-//#ifndef paramdefaults
-//#define MAXPARAMDEFAULTS 0
-//#else
-//#define MAXPARAMDEFAULTS BOOST_PP_SEQ_SIZE(paramdefaults)
-//#endif
-//
-//namespace MoleCuilder {
-//
-//// print a list of type ref followed, i.e. "int i, double position"
-//#define type_list(z,n,TYPELIST, VARLIST) \
-//  BOOST_PP_COMMA_IF(n)\
-//  BOOST_PP_SEQ_ELEM(n, TYPELIST) \
-//  BOOST_PP_SEQ_ELEM(n, VARLIST)
-//
-//void COMMAND(
-//#if defined paramtypes && defined paramreferences
-//#define BOOST_PP_LOCAL_MACRO(n) type_list(~, n, paramtypes, paramreferences)
-//#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
-//#include BOOST_PP_LOCAL_ITERATE()
-//#endif
-//    );
-//
-//class FragmentationMolecularDynamicsAction;
-//
-//template <>
-//class ActionTraits<ACTION> : public ActionTrait {
-//public:
-//  ActionTraits() :
-//#ifndef SHORTFORM
-//    ActionTrait(OptionTrait(TOKEN, &typeid(void), DESCRIPTION, std::string()))
-//#else
-//    ActionTrait(OptionTrait(TOKEN, &typeid(void), DESCRIPTION, std::string(), SHORTFORM))
-//#endif /* SHORTFORM */
-//  {
-//  // initialize remainder of action info
-//#ifdef MENUNAME
-//    MenuTitle = MENUNAME;
-//#endif
-//#ifdef MENUPOSITION
-//    MenuPosition = MENUPOSITION;
-//#endif
-//
-//    // we got no options to initialize
-//  }
-//
-//  virtual ~ActionTraits() {
-//    //std::cout << "ActionTraits<" << BOOST_PP_STRINGIZE(ACTION) << ">::~ActionTraits() on instance " << this << " with name " << getName() << " called." << std::endl;
-//  }
-//};
-//
-//class FragmentationMolecularDynamicsAction : public MakroAction
-//{
-//public:
-//  FragmentationMolecularDynamicsAction();
-//  virtual ~FragmentationMolecularDynamicsAction();
-//
-//  // must be called after all primitive actions are present
-//  void prepare(ActionRegistry &AR);
-//  // must be called before alle primitive actions are removed
-//  void unprepare(ActionRegistry &AR);
-//
-//  virtual ActionState::ptr performCall();
-//  virtual ActionState::ptr performUndo(ActionState::ptr);
-//  virtual ActionState::ptr performRedo(ActionState::ptr);
-//
-//private:
-//  //!> flag to check whether actions have been prepared
-//  static bool isPrepared;
-//  //!> sequence of actions for this macro action
-//  static ActionSequence actions;
-//};
-//
-//}
-//
-//#undef ACTION
-//#undef COMMAND
-//#undef COMMANDFULL
-//#undef PARAMS
-//
-//#undef ACTIONNAME
-//#undef CATEGORY
-//#undef MENUNAME
-//#undef MENUPOSITION
-//#undef TOKEN
-//
-//#undef DESCRIPTION
-//#undef SHORTFORM
-//
-//#endif /* MOLECULARDYNAMICSACTION_HPP_ */
Index: src/Actions/GraphAction/SubgraphDissectionAction.cpp
===================================================================
--- src/Actions/GraphAction/SubgraphDissectionAction.cpp	(revision 237f9339687fa2ab9fabd26196828a79d99f1307)
+++ src/Actions/GraphAction/SubgraphDissectionAction.cpp	(revision f47e00b9f5f390d99eb3b523faf1a7e16ed49fd6)
@@ -47,29 +47,10 @@
 #include "Descriptors/AtomDescriptor.hpp"
 
+using namespace MoleCuilder;
+
+// and construct the stuff
 #include "SubgraphDissectionAction.def"
-
-// some derived names: if CATEGORY is not given, we don't prefix with it
-#ifdef CATEGORY
-#define ACTION BOOST_PP_CAT(CATEGORY, BOOST_PP_CAT(ACTIONNAME, Action))
-#define COMMAND BOOST_PP_CAT(CATEGORY, ACTIONNAME)
-#define PARAMS BOOST_PP_CAT(CATEGORY, BOOST_PP_CAT(ACTIONNAME, Parameters))
-#else
-#define ACTION BOOST_PP_CAT(ACTIONNAME, Action)
-#define COMMAND ACTIONNAME
-#define PARAMS BOOST_PP_CAT(ACTIONNAME, Parameters)
-#endif
-// check if no lists given
-#ifndef paramtypes
-#define MAXPARAMTYPES 0
-#else
-#define MAXPARAMTYPES BOOST_PP_SEQ_SIZE(paramtypes)
-#endif
-#ifndef paramdefaults
-#define MAXPARAMDEFAULTS 0
-#else
-#define MAXPARAMDEFAULTS BOOST_PP_SEQ_SIZE(paramdefaults)
-#endif
-
-namespace MoleCuilder {
+#include "MakroAction_impl_pre.hpp"
+/** =========== define the function ====================== */
 
 // static instances
@@ -77,13 +58,7 @@
 bool GraphSubgraphDissectionAction::isPrepared = false;
 
-GraphSubgraphDissectionAction::GraphSubgraphDissectionAction() :
-  MakroAction(ActionTraits< GraphSubgraphDissectionAction >(), actions)
-{}
-
-GraphSubgraphDissectionAction::~GraphSubgraphDissectionAction()
-{}
-
 void GraphSubgraphDissectionAction::prepare(ActionRegistry &AR)
 {
+  actions.addAction(AR.getActionByName(std::string("select-all-atoms")));
   actions.addAction(AR.getActionByName(std::string("destroy-adjacency")));
   actions.addAction(AR.getActionByName(std::string("create-adjacency")));
@@ -111,10 +86,7 @@
   // we need to "emulate" that all atoms have been selected without destroying
   // current selection
-  Chronos::getInstance().startTiming(TOKEN);
   const std::vector<atom *> selected_atoms = World::getInstance().getSelectedAtoms();
-  World::getInstance().selectAllAtoms(AllAtoms());
   ActionState::ptr state(MakroAction::performCall());
   reselectAtoms(selected_atoms);
-  Chronos::getInstance().endTiming(TOKEN);
 
   return state;
@@ -125,5 +97,4 @@
   // current selection
   const std::vector<atom *> selected_atoms = World::getInstance().getSelectedAtoms();
-  World::getInstance().selectAllAtoms(AllAtoms());
   ActionState::ptr state(MakroAction::performUndo(_state));
   reselectAtoms(selected_atoms);
@@ -136,5 +107,4 @@
   // current selection
   const std::vector<atom *> selected_atoms = World::getInstance().getSelectedAtoms();
-  World::getInstance().selectAllAtoms(AllAtoms());
   ActionState::ptr state(MakroAction::performRedo(_state));
   reselectAtoms(selected_atoms);
@@ -143,39 +113,9 @@
 }
 
-// =========== command for calling action directly ===========
-void COMMAND(
-#if defined paramtypes && defined paramreferences && BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
-#define BOOST_PP_LOCAL_MACRO(n) type_list(~, n, paramtypes, paramreferences)
-#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
-#include BOOST_PP_LOCAL_ITERATE()
-#endif
-)
-{
-  ACTION *ToCall = dynamic_cast<ACTION*>(ActionQueue::getInstance().getActionByName( TOKEN )); //->clone(params);
-  //ACTION::PARAMS params;
-#if defined paramreferences && BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
-#define BOOST_PP_LOCAL_MACRO(n) value_print(~, n, paramreferences, ToCall->params.)
-#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
-#include BOOST_PP_LOCAL_ITERATE()
-#endif
-  ActionQueue::getInstance().queueAction( ToCall, Action::NonInteractive);
-};
+bool GraphSubgraphDissectionAction::canUndo(){
+  return true;
+}
 
-void BOOST_PP_CAT( COMMAND, _stringargs)(
-#if defined paramtypes && defined paramreferences && BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
-#define BOOST_PP_LOCAL_MACRO(n) type_list(~, n, BOOST_PP_SEQ_TRANSFORM( type2string, , paramtypes), paramreferences)
-#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
-#include BOOST_PP_LOCAL_ITERATE()
-#endif
-  ) {
-  ACTION *ToCall = dynamic_cast<ACTION*>(ActionQueue::getInstance().getActionByName( TOKEN )); //->clone(params);
-  //ACTION::PARAMS params;
-#if defined paramtypes && defined paramtypes && BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
-#define BOOST_PP_LOCAL_MACRO(n) valuetype_print(~, n, paramreferences, paramtypes, ToCall->params. )
-#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
-#include BOOST_PP_LOCAL_ITERATE()
-#endif
-  ActionQueue::getInstance().queueAction( ToCall, Action::NonInteractive);
-};
-
+bool GraphSubgraphDissectionAction::shouldUndo(){
+  return true;
 }
Index: src/Actions/GraphAction/SubgraphDissectionAction.def
===================================================================
--- src/Actions/GraphAction/SubgraphDissectionAction.def	(revision 237f9339687fa2ab9fabd26196828a79d99f1307)
+++ src/Actions/GraphAction/SubgraphDissectionAction.def	(revision f47e00b9f5f390d99eb3b523faf1a7e16ed49fd6)
@@ -21,6 +21,6 @@
 #undef paramvalids
 
-#define statetypes (MolAtomList)
-#define statereferences (moleculelist)
+#undef statetypes
+#undef statereferences
 
 // some defines for all the names, you may use ACTION, STATE and PARAMS
Index: src/Actions/GraphAction/SubgraphDissectionAction.hpp
===================================================================
--- src/Actions/GraphAction/SubgraphDissectionAction.hpp	(revision 237f9339687fa2ab9fabd26196828a79d99f1307)
+++ src/Actions/GraphAction/SubgraphDissectionAction.hpp	(revision f47e00b9f5f390d99eb3b523faf1a7e16ed49fd6)
@@ -14,113 +14,9 @@
 #endif
 
-#include "Actions/ActionSequence.hpp"
-#include "Actions/ActionTraits.hpp"
+
 #include "Actions/MakroAction.hpp"
 
 #include "SubgraphDissectionAction.def"
-
-// some derived names: if CATEGORY is not given, we don't prefix with it
-#ifdef CATEGORY
-#define ACTION BOOST_PP_CAT(CATEGORY, BOOST_PP_CAT(ACTIONNAME, Action))
-#define COMMAND BOOST_PP_CAT(CATEGORY, ACTIONNAME)
-#define PARAMS BOOST_PP_CAT(CATEGORY, BOOST_PP_CAT(ACTIONNAME, Parameters))
-#else
-#define ACTION BOOST_PP_CAT(ACTIONNAME, Action)
-#define COMMAND ACTIONNAME
-#define PARAMS BOOST_PP_CAT(ACTIONNAME, Parameters)
-#endif
-// check if no lists given
-#ifndef paramtypes
-#define MAXPARAMTYPES 0
-#else
-#define MAXPARAMTYPES BOOST_PP_SEQ_SIZE(paramtypes)
-#endif
-#ifndef paramdefaults
-#define MAXPARAMDEFAULTS 0
-#else
-#define MAXPARAMDEFAULTS BOOST_PP_SEQ_SIZE(paramdefaults)
-#endif
-
-namespace MoleCuilder {
-
-// print a list of type ref followed, i.e. "int i, double position"
-#define type_list(z,n,TYPELIST, VARLIST) \
-  BOOST_PP_COMMA_IF(n)\
-  BOOST_PP_SEQ_ELEM(n, TYPELIST) \
-  BOOST_PP_SEQ_ELEM(n, VARLIST)
-
-void COMMAND(
-#if defined paramtypes && defined paramreferences
-#define BOOST_PP_LOCAL_MACRO(n) type_list(~, n, paramtypes, paramreferences)
-#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
-#include BOOST_PP_LOCAL_ITERATE()
-#endif
-    );
-
-class GraphSubgraphDissectionAction;
-
-template <>
-class ActionTraits<ACTION> : public ActionTrait {
-public:
-  ActionTraits() :
-#ifndef SHORTFORM
-    ActionTrait(OptionTrait(TOKEN, &typeid(void), DESCRIPTION, std::string()))
-#else
-    ActionTrait(OptionTrait(TOKEN, &typeid(void), DESCRIPTION, std::string(), SHORTFORM))
-#endif /* SHORTFORM */
-  {
-  // initialize remainder of action info
-#ifdef MENUNAME
-    MenuTitle = MENUNAME;
-#endif
-#ifdef MENUPOSITION
-    MenuPosition = MENUPOSITION;
-#endif
-
-    // we got no options to initialize
-  }
-
-  virtual ~ActionTraits() {
-    //std::cout << "ActionTraits<" << BOOST_PP_STRINGIZE(ACTION) << ">::~ActionTraits() on instance " << this << " with name " << getName() << " called." << std::endl;
-  }
-};
-
-class GraphSubgraphDissectionAction : public MakroAction
-{
-public:
-  GraphSubgraphDissectionAction();
-  virtual ~GraphSubgraphDissectionAction();
-
-  // must be called after all primitive actions are present
-  void prepare(ActionRegistry &AR);
-  // must be called before alle primitive actions are removed
-  void unprepare(ActionRegistry &AR);
-
-  virtual ActionState::ptr performCall();
-  virtual ActionState::ptr performUndo(ActionState::ptr);
-  virtual ActionState::ptr performRedo(ActionState::ptr);
-
-private:
-  //!> flag to check whether actions have been prepared
-  static bool isPrepared;
-  //!> sequence of actions for this macro action
-  static ActionSequence actions;
-};
-
-}
-
-#undef ACTION
-#undef COMMAND
-#undef COMMANDFULL
-#undef PARAMS
-
-#undef ACTIONNAME
-#undef CATEGORY
-#undef MENUNAME
-#undef MENUPOSITION
-#undef TOKEN
-
-#undef DESCRIPTION
-#undef SHORTFORM
+#include "MakroAction_impl_header.hpp"
 
 #endif /* SUBGRAPHDISSECTIONACTION_HPP_ */
Index: src/Actions/MakroAction_impl_pre.hpp
===================================================================
--- src/Actions/MakroAction_impl_pre.hpp	(revision 237f9339687fa2ab9fabd26196828a79d99f1307)
+++ src/Actions/MakroAction_impl_pre.hpp	(revision f47e00b9f5f390d99eb3b523faf1a7e16ed49fd6)
@@ -233,5 +233,5 @@
 public:
   STATE(
-#if defined statetypes && defined statereferences // if we have parameters, we have to add "_" before each reference and add the params as the last one
+#if defined statetypes && defined statereferences // if we have states, we have to add "_" before each reference and add the params as the last one
 #define OP(s,data,elem) BOOST_PP_CAT(data, elem)  // OP to add "_"
 #define BOOST_PP_LOCAL_MACRO(n) type_list(~, n, BOOST_PP_SEQ_PUSH_BACK(statetypes, const ACTION::PARAMS &), BOOST_PP_SEQ_TRANSFORM(OP, _, BOOST_PP_SEQ_PUSH_BACK(statereferences, params)))
@@ -242,5 +242,5 @@
 #include BOOST_PP_LOCAL_ITERATE()
 ) :
-#if defined statetypes && defined statereferences // do we have parameters at all?
+#if defined statetypes && defined statereferences // do we have states at all?
 BOOST_PP_REPEAT(MAXSTATETYPES, initialiser_print, statereferences)
 #endif
