Index: src/UIElements/Qt4/InstanceBoard/ObservedValuesContainer.hpp
===================================================================
--- src/UIElements/Qt4/InstanceBoard/ObservedValuesContainer.hpp	(revision 494478e91be04149753f2f153a7dfad4d8911944)
+++ src/UIElements/Qt4/InstanceBoard/ObservedValuesContainer.hpp	(revision 90821d3e29139e45d3df56d7c7f116d631c88f26)
@@ -19,4 +19,6 @@
 #include <map>
 #include <string>
+
+#include <boost/function.hpp>
 
 class QtObservedInstanceBoard;
@@ -56,4 +58,14 @@
   void returnObservedValues(const id _id, ObservedValues_t &_observedvalues);
 
+  /** Inform this container that subjectKilled() was received by one of the ObservedValues.
+   *
+   * \param _id identifier of the receiving instance
+   * \param _onDestroy function to call when last subjectKilled() was received and
+   *        ObservedValues are destroyed
+   */
+  void countsubjectKilled(
+      const id _id,
+      boost::function<void (const id _id)> _onDestroy);
+
 private:
   typedef std::pair<ObservedValues_t, size_t> RefCountedObservedValues_t;
@@ -61,4 +73,10 @@
   //!> internal vector of observed values
   CountedObservedValues_t ObservedValues;
+
+  //!> typedef for map with subjectKilledCounts for each instance
+  typedef std::map<id, size_t> subjectKilledCount_t;
+
+  //!> counts how many ObservedValues have already been subjectKilled()
+  subjectKilledCount_t subjectKilledCount;
 
   //!> name used in describing the instance type
Index: src/UIElements/Qt4/InstanceBoard/ObservedValuesContainer_impl.hpp
===================================================================
--- src/UIElements/Qt4/InstanceBoard/ObservedValuesContainer_impl.hpp	(revision 494478e91be04149753f2f153a7dfad4d8911944)
+++ src/UIElements/Qt4/InstanceBoard/ObservedValuesContainer_impl.hpp	(revision 90821d3e29139e45d3df56d7c7f116d631c88f26)
@@ -90,4 +90,28 @@
 
 template <class T, typename id>
+void ObservedValuesContainer<T,id>::countsubjectKilled(
+    const id _id,
+    boost::function<void (const id _id)> _onDestroy)
+{
+  LOG(3, "DEBUG: ObservedValuesContainer got subjectKilled() for an observed value of "
+      << NameOfType << " " << _id);
+  typename subjectKilledCount_t::iterator iter = subjectKilledCount.find(_id);
+  if (iter == subjectKilledCount.end()) {
+    std::pair<typename subjectKilledCount_t::iterator, bool> inserter =
+        subjectKilledCount.insert( std::make_pair(_id, 0) );
+    iter = inserter.first;
+  }
+  ++(iter->second);
+
+  if (iter->second > T::MAX_ObservedTypes) {
+    ASSERT( getRefCount(_id) == 0,
+        "ObservedValuesContainer::countsubjectKilled() - observed Values for "
+        +NameOfType+" "+toString(_id)+" are still being held somewhere.");
+    _onDestroy(_id);
+    subjectKilledCount.erase(iter);
+  }
+}
+
+template <class T, typename id>
 bool ObservedValuesContainer<T,id>::insert(const id _id, ObservedValues_t &_obsvalues)
 {
@@ -103,5 +127,8 @@
   const typename CountedObservedValues_t::iterator Colditer = ObservedValues.find(_oldid);
   const typename CountedObservedValues_t::iterator Cnewiter = ObservedValues.find(_newid);
+  const typename subjectKilledCount_t::iterator Solditer = subjectKilledCount.find(_oldid);
+  const typename subjectKilledCount_t::iterator Snewiter = subjectKilledCount.find(_newid);
   bool status = ((Colditer != ObservedValues.end()) && (Cnewiter == ObservedValues.end()));
+  status &= ((Solditer != subjectKilledCount.end()) && (Snewiter == subjectKilledCount.end()));
   // change id here only if still present
   if (status) {
@@ -110,4 +137,9 @@
       ObservedValues.erase(Colditer);
       ObservedValues.insert( std::make_pair(_newid, obsvalues) );
+    }
+    {
+      const size_t countvalue = Solditer->second;
+      subjectKilledCount.erase(Solditer);
+      subjectKilledCount.insert( std::make_pair(_newid, countvalue) );
     }
     return true;
Index: src/UIElements/Qt4/InstanceBoard/QtObservedAtom.cpp
===================================================================
--- src/UIElements/Qt4/InstanceBoard/QtObservedAtom.cpp	(revision 494478e91be04149753f2f153a7dfad4d8911944)
+++ src/UIElements/Qt4/InstanceBoard/QtObservedAtom.cpp	(revision 90821d3e29139e45d3df56d7c7f116d631c88f26)
@@ -173,5 +173,5 @@
     owner = NULL;
 
-    board.atomcountsubjectKilled(getAtomIndex());
+    board.returnObservedAtom(getAtomIndex());
   }
 }
Index: src/UIElements/Qt4/InstanceBoard/QtObservedInstanceBoard.cpp
===================================================================
--- src/UIElements/Qt4/InstanceBoard/QtObservedInstanceBoard.cpp	(revision 494478e91be04149753f2f153a7dfad4d8911944)
+++ src/UIElements/Qt4/InstanceBoard/QtObservedInstanceBoard.cpp	(revision 90821d3e29139e45d3df56d7c7f116d631c88f26)
@@ -56,12 +56,25 @@
   atomObservedValues("atom", *this),
   moleculeObservedValues("molecule", *this),
-  atomSubjectKilled(
-      boost::bind(&QtObservedInstanceBoard::atomcountsubjectKilled, this, _1)),
-  moleculeSubjectKilled(
-      boost::bind(&QtObservedInstanceBoard::moleculecountsubjectKilled, this, _1)),
   lastremovedatom((atomId_t)-1),
   lastremovedatomsmolecule( std::make_pair((moleculeId_t)-1,(atomId_t)-1) ),
   lastremovedmolecule((moleculeId_t)-1)
 {
+  boost::function<void (const atomId_t _id)> atomfctor =
+      boost::bind(&QtObservedInstanceBoard::atomcountsubjectKilled, this, _1);
+  atomSubjectKilled = 
+      boost::bind(&ObservedValuesContainer<QtObservedAtom, atomId_t>::countsubjectKilled,
+          boost::ref(atomObservedValues),
+          _1,
+          atomfctor
+          );
+  boost::function<void (const moleculeId_t _id)> molfctor = 
+      boost::bind(&QtObservedInstanceBoard::moleculecountsubjectKilled, this, _1);
+  moleculeSubjectKilled = 
+      boost::bind(&ObservedValuesContainer<QtObservedMolecule, moleculeId_t>::countsubjectKilled,
+          boost::ref(moleculeObservedValues),
+          _1,
+          molfctor
+          );
+
   // be first (besides ObservedValues to know about new insertions)
   World::getInstance().signOn(this, World::AtomInserted, GlobalObservableInfo::PriorityLevel(int(-10)));
@@ -294,45 +307,14 @@
 void QtObservedInstanceBoard::atomcountsubjectKilled(const atomId_t _atomid)
 {
-  LOG(3, "DEBUG: InformationBoard got subjectKilled() for a value of atom " << _atomid);
-  atomsubjectKilledCount_t::iterator iter = atomsubjectKilledCount.find(_atomid);
-  if (iter == atomsubjectKilledCount.end()) {
-    std::pair<atomsubjectKilledCount_t::iterator, bool> inserter =
-        atomsubjectKilledCount.insert( std::make_pair(_atomid, 0) );
-    iter = inserter.first;
-  }
-  ++(iter->second);
-
-  if (iter->second > QtObservedAtom::MAX_ObservedTypes) {
-    ASSERT( atomObservedValues.getRefCount(_atomid) == 0,
-        "QtObservedInstanceBoard::atomcountsubjectKilled() - observed Values for atom "
-        +toString(_atomid)+" are still being held somewhere.");
-    if (_atomid == lastremovedatomsmolecule.second)
-      emit atomRemoved(lastremovedatomsmolecule.first, lastremovedatomsmolecule.second);
-    else
-      ELOG(2, "QtObservedInstanceBoard::atomcountsubjectKilled() - id " << _atomid
-          << " not fitting with " << lastremovedatomsmolecule);
-    atomsubjectKilledCount.erase(iter);
-  }
+  if (_atomid == lastremovedatomsmolecule.second)
+    emit atomRemoved(lastremovedatomsmolecule.first, lastremovedatomsmolecule.second);
+  else
+    ELOG(2, "QtObservedInstanceBoard::atomcountsubjectKilled() - id " << _atomid
+        << " not fitting with " << lastremovedatomsmolecule);
 }
 
 void QtObservedInstanceBoard::moleculecountsubjectKilled(const moleculeId_t _molid)
 {
-  LOG(3, "DEBUG: InformationBoard got subjectKilled() for a value of molecule " << _molid);
-  moleculesubjectKilledCount_t::iterator iter = moleculesubjectKilledCount.find(_molid);
-  if (iter == moleculesubjectKilledCount.end()) {
-    std::pair<moleculesubjectKilledCount_t::iterator, bool> inserter =
-        moleculesubjectKilledCount.insert( std::make_pair(_molid, 0) );
-    iter = inserter.first;
-  }
-  ++(iter->second);
-
-  if (iter->second > QtObservedMolecule::MAX_ObservedTypes) {
-    ASSERT( moleculeObservedValues.getRefCount(_molid) == 0,
-        "QtObservedInstanceBoard::moleculecountsubjectKilled() - observed Values for molecule "
-        +toString(_molid)+" are still being held somewhere.");
-    // then free the instance
-    emit moleculeRemoved(_molid);
-    moleculesubjectKilledCount.erase(iter);
-  }
+  emit moleculeRemoved(_molid);
 }
 
Index: src/UIElements/Qt4/InstanceBoard/QtObservedInstanceBoard.hpp
===================================================================
--- src/UIElements/Qt4/InstanceBoard/QtObservedInstanceBoard.hpp	(revision 494478e91be04149753f2f153a7dfad4d8911944)
+++ src/UIElements/Qt4/InstanceBoard/QtObservedInstanceBoard.hpp	(revision 90821d3e29139e45d3df56d7c7f116d631c88f26)
@@ -133,16 +133,4 @@
   void moleculecountsubjectKilled(const moleculeId_t _molid);
 
-  //!> typedef for map with subjectKilledCounts for each atom
-  typedef typename std::map<atomId_t, size_t> atomsubjectKilledCount_t;
-
-  //!> typedef for map with subjectKilledCounts for each molecule
-  typedef typename std::map<moleculeId_t, size_t> moleculesubjectKilledCount_t;
-
-  //!> counts how many ObservedValues have already been subjectKilled()
-  atomsubjectKilledCount_t atomsubjectKilledCount;
-
-  //!> counts how many ObservedValues have already been subjectKilled()
-  moleculesubjectKilledCount_t moleculesubjectKilledCount;
-
   //!> container with all ObservedValues for each atom, associated by id
   ObservedValuesContainer<QtObservedAtom, atomId_t> atomObservedValues;
@@ -151,8 +139,7 @@
 
   //!> stored callback function for notifying QtObservedInstanceBoard about subjectKilled in atom
-  boost::function<void (atomId_t)> atomSubjectKilled;
+  boost::function<void (const atomId_t)> atomSubjectKilled;
   //!> stored callback function for notifying QtObservedInstanceBoard about subjectKilled in molecule
-  boost::function<void (moleculeId_t)> moleculeSubjectKilled;
-
+  boost::function<void (const moleculeId_t)> moleculeSubjectKilled;
   //!> note down atom id of last removed atom to drop its ObservedValues
   atomId_t lastremovedatom;
Index: src/UIElements/Qt4/InstanceBoard/QtObservedMolecule.cpp
===================================================================
--- src/UIElements/Qt4/InstanceBoard/QtObservedMolecule.cpp	(revision 494478e91be04149753f2f153a7dfad4d8911944)
+++ src/UIElements/Qt4/InstanceBoard/QtObservedMolecule.cpp	(revision 90821d3e29139e45d3df56d7c7f116d631c88f26)
@@ -132,5 +132,5 @@
     owner = NULL;
 
-    board.moleculecountsubjectKilled(getMolIndex());
+    board.returnObservedMolecule(getMolIndex());
   }
 }
