Index: src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp	(revision 785d89098de752b05e69ab46e0145f0a07a87128)
+++ src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp	(revision f1b5ca904ef2ca5bf64048122b7d6dc1ed4716e3)
@@ -43,6 +43,4 @@
 
 #include "CodePatterns/MemDebug.hpp"
-
-#include <boost/assign.hpp>
 
 #include "CodePatterns/Assert.hpp"
@@ -61,15 +59,4 @@
 #include "World.hpp"
 
-using namespace boost::assign;
-
-static Observable::channels_t getAllAtomicChangesChannels()
-{
-  Observable::channels_t channels;
-  channels += molecule::AtomInserted, molecule::AtomRemoved, molecule::AtomMoved;
-  return channels;
-}
-
-const Observable::channels_t GLMoleculeObject_molecule::HullChannels(getAllAtomicChangesChannels());
-
 static QGLSceneNode *createMoleculeMesh(const QGeometryData &_geo)
 {
@@ -83,10 +70,7 @@
 GLMoleculeObject_molecule::GLMoleculeObject_molecule(
     QObject *parent,
-    QtObservedInstanceBoard &_board,
     QtObservedMolecule::ptr &_ObservedMolecule) :
   GLMoleculeObject((QGLSceneNode *)NULL, parent),
-  owner(NULL),
   hoverAtomId(-1),
-  board(_board),
   ObservedMolecule(_ObservedMolecule)
 {
@@ -97,10 +81,7 @@
     QGLSceneNode *mesh[],
     QObject *parent,
-    QtObservedInstanceBoard &_board,
     QtObservedMolecule::ptr &_ObservedMolecule) :
   GLMoleculeObject(mesh, parent),
-  owner(NULL),
   hoverAtomId(-1),
-  board(_board),
   ObservedMolecule(_ObservedMolecule)
 {
@@ -118,6 +99,4 @@
   m_visible = false;
 
-  connect (this, SIGNAL(hoverChanged(GLMoleculeObject *)), this, SLOT(hoverChangedSignalled(GLMoleculeObject *)));
-  connect (this, SIGNAL(hoverChanged(GLMoleculeObject *)), this, SIGNAL(changed()));
   connect (ObservedMolecule.get(), SIGNAL(tesselationhullChanged()), this, SLOT(resetTesselationHull()));
   connect (ObservedMolecule.get(), SIGNAL(boundingboxChanged()), this, SLOT(resetBoundingBox()));
@@ -130,6 +109,4 @@
 //      this, SLOT(atomRemoved(const atomId_t)) );
   connect (ObservedMolecule.get(), SIGNAL(selectedChanged()), this, SLOT(resetSelected()));
-
-  connect( this, SIGNAL(clicked()), this, SLOT(wasClicked()));
 }
 
@@ -152,4 +129,5 @@
   // check minimum bond radius in molecule
   double minlength = std::numeric_limits<double>::max();
+  size_t NoAtoms = 0;
   for (molecule::const_iterator iter = molref->begin();
       iter != molref->end(); ++iter) {
@@ -160,9 +138,10 @@
       minlength = std::min(bond_distance, minlength);
     }
+    ++NoAtoms;
   }
   minradius = std::max( std::max(minradius, minlength), 1.);
 
   // we need at least three points for tesselation
-  if (AtomsinSceneMap.size() >= 3) {
+  if (NoAtoms >= 3) {
     // Tesselate the points.
     Tesselation T;
@@ -218,8 +197,6 @@
 void GLMoleculeObject_molecule::resetTesselationHull()
 {
-  if (owner != NULL) {
-    TesselationHull = updateTesselationHull();
-    updateMesh(createMoleculeMesh(TesselationHull));
-  }
+  TesselationHull = updateTesselationHull();
+  updateMesh(createMoleculeMesh(TesselationHull));
 }
 
@@ -334,152 +311,4 @@
 }
 
-/** Adds an atom of this molecule to the scene.
- *
- * @param _atom atom to add
- */
-void GLMoleculeObject_molecule::atomInserted(QtObservedAtom::ptr _atom)
-{
-  const ObservedValue_Index_t atomid = _atom->getIndex();
-  LOG(3, "INFO: GLMoleculeObject_molecule: Received signal atomInserted for atom "
-      << _atom->getAtomIndex());
-
-  if (_atom) {
-    GLMoleculeObject_atom *atomObject =
-        new GLMoleculeObject_atom(
-            GLMoleculeObject::meshSphere,
-            this,
-            _atom);
-    ASSERT( atomObject != NULL,
-        "GLMoleculeObject_molecule::atomInserted - could not create atom object for "
-        +toString(_atom->getAtomIndex()));
-    AtomNodeMap::iterator iter = AtomsinSceneMap.find(atomid);
-    ASSERT(iter == AtomsinSceneMap.end(),
-        "GLMoleculeObject_molecule::atomInserted - same atom with id "
-        +toString(_atom->getAtomIndex())+" added again.");
-    AtomsinSceneMap.insert( make_pair(atomid, atomObject) );
-
-    qRegisterMetaType<atomId_t>("atomId_t");
-    qRegisterMetaType<GLMoleculeObject_bond::SideOfBond>("GLMoleculeObject_bond::SideOfBond");
-    connect (atomObject, SIGNAL(clicked(atomId_t)), this, SIGNAL(atomClicked(atomId_t)));
-    connect (atomObject, SIGNAL(changed()), this, SIGNAL(changed()));
-    connect (atomObject, SIGNAL(hoverChanged(GLMoleculeObject *)), this, SIGNAL(changed()));
-    connect (atomObject, SIGNAL(hoverChanged(GLMoleculeObject *)), this, SLOT(hoverChangedSignalled(GLMoleculeObject *)));
-
-    if (m_objectId  == -1)
-      setObjectId(_atom->getAtomIndex());
-
-    emit changed();
-    emit changeOccured();
-  }
-}
-
-/** Removes an atom of this molecule from the scene.
- *
- * We just the id as the atom might have already been destroyed.
- *
- * @param _id id of atom to remove
- */
-void GLMoleculeObject_molecule::atomRemoved(ObservedValue_Index_t _id)
-{
-  LOG(3, "INFO: GLMoleculeObject_molecule: Received signal atomRemoved for atom "+toString(_id)+".");
-  // bonds are removed by signal coming from ~bond
-
-  // remove atoms
-  AtomNodeMap::iterator iter = AtomsinSceneMap.find(_id);
-  ASSERT(iter != AtomsinSceneMap.end(),
-      "GLMoleculeObject_molecule::atomRemoved() - atom "+toString(_id)+" not on display.");
-  GLMoleculeObject_atom *atomObject = iter->second;
-  AtomsinSceneMap.erase(iter);
-  atomObject->disconnect();
-  delete atomObject;
-
-  emit changed();
-  emit changeOccured();
-
-  if (AtomsinSceneMap.empty())
-    emit moleculeEmptied(ObservedMolecule);
-}
-
-void GLMoleculeObject_molecule::hoverChangedSignalled(GLMoleculeObject *ob)
-{
-  // Find the atom, ob corresponds to.
-  hoverAtomId = -1;
-  GLMoleculeObject_atom *atomObject = dynamic_cast<GLMoleculeObject_atom *>(ob);
-  if (atomObject){
-    for (AtomNodeMap::iterator iter = AtomsinSceneMap.begin();iter != AtomsinSceneMap.end(); ++ iter){
-      if (iter->second == atomObject)
-        hoverAtomId = iter->second->objectId();
-    }
-
-    // Propagate signal.
-    emit hoverChanged(hoverAtomId);
-  } else {
-    // Find the atom, ob corresponds to.
-    GLMoleculeObject_molecule *moleculeObject = dynamic_cast<GLMoleculeObject_molecule *>(ob);
-    if (moleculeObject == this){
-      // Propagate signal.
-      emit hoverChanged(ObservedMolecule->getMolIndex(), 0);
-    }
-  }
-}
-
-/** Adds a bond to the scene.
- *
- * @param _bond bond to add
- */
-void GLMoleculeObject_molecule::bondInserted(
-    QtObservedBond::ptr _bond)
-{
-  static const std::vector< GLMoleculeObject_bond::SideOfBond > bondsides =
-      boost::assign::list_of<GLMoleculeObject_bond::SideOfBond>
-          (GLMoleculeObject_bond::left)
-          (GLMoleculeObject_bond::right);
-  LOG(3, "INFO: GLWorldScene::bondInserted() - Adding bonds " << _bond->getBondIndex());
-  //LOG(4, "INFO: Currently present bonds " << BondsinSceneMap << ".");
-
-  const ObservedValue_Index_t bondid = _bond->getIndex();
-  const std::pair<BondNodeMap::iterator, BondNodeMap::iterator> iters =
-      BondsinSceneMap.equal_range(bondid);
-  if (iters.first == iters.second) {
-    for (size_t i=0;i<2;++i) {
-      GLMoleculeObject_bond * bondObject =
-          new GLMoleculeObject_bond(GLMoleculeObject::meshCylinder, this, _bond, bondsides[i]);
-      connect (bondObject, SIGNAL(changed()), this, SIGNAL(changed()));
-      BondsinSceneMap.insert( std::make_pair(bondid, bondObject) );
-    }
-  } else {
-    for (BondNodeMap::iterator iter = iters.first; iter != iters.second; ++iter) {
-      iter->second->resetPosition();
-      iter->second->resetWidth();
-    }
-  }
-  emit changed();
-  emit changeOccured();
-}
-
-/** Removes a bond from the scene.
- *
- * @param _bond bond to remove
- */
-void GLMoleculeObject_molecule::bondRemoved(ObservedValue_Index_t _id)
-{
-  LOG(3, "INFO: GLWorldScene::bondRemoved() - Removing bond to id " << _id);
-  {
-    // left bond
-    const std::pair<BondNodeMap::iterator, BondNodeMap::iterator> iters =
-        BondsinSceneMap.equal_range(_id);
-    for (BondNodeMap::iterator iter = iters.first; iter != iters.second; ++iter) {
-      GLMoleculeObject_bond *bondObject = iter->second;
-      bondObject->disconnect();
-      delete bondObject; // is done by signal from bond itself
-      //LOG(4, "INFO: Still present bonds " << BondsinSceneMap << ".");
-    }
-    BondsinSceneMap.erase(_id);
-  }
-
-  emit changed();
-  emit changeOccured();
-}
-
 void GLMoleculeObject_molecule::setVisible(bool value)
 {
@@ -499,9 +328,2 @@
   return ost;
 }
-
-void GLMoleculeObject_molecule::wasClicked()
-{
-  LOG(4, "INFO: GLMoleculeObject_molecule: atom "
-      << ObservedMolecule->getMolIndex() << " has been clicked");
-  emit moleculeClicked(ObservedMolecule->getMolIndex());
-}
Index: src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.hpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.hpp	(revision 785d89098de752b05e69ab46e0145f0a07a87128)
+++ src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.hpp	(revision f1b5ca904ef2ca5bf64048122b7d6dc1ed4716e3)
@@ -41,10 +41,8 @@
   GLMoleculeObject_molecule(
       QObject *parent,
-      QtObservedInstanceBoard &_board,
       QtObservedMolecule::ptr &_ObservedMolecule);
   GLMoleculeObject_molecule(
       QGLSceneNode *mesh[],
       QObject *parent,
-      QtObservedInstanceBoard &_board,
       QtObservedMolecule::ptr &_ObservedMolecule);
   virtual ~GLMoleculeObject_molecule();
@@ -59,21 +57,8 @@
   void changed();
   void changeOccured();
-  void hoverChanged(const atomId_t);
-  void hoverChanged(const moleculeId_t, int);
-  void atomClicked(atomId_t);
-  void moleculeClicked(moleculeId_t);
-  void moleculeEmptied(QtObservedMolecule::ptr);
-  void IsSelectedChanged();
 
 private slots:
   //!> grant GLWorldScene access to private slots
   friend class GLWorldScene;
-
-  void wasClicked();
-  void atomInserted(QtObservedAtom::ptr _atom);
-  void atomRemoved(ObservedValue_Index_t _id);
-  void bondInserted(QtObservedBond::ptr _bond);
-  void bondRemoved(ObservedValue_Index_t _id);
-  void hoverChangedSignalled(GLMoleculeObject *ob);
 
   void setVisible(bool value);
@@ -90,23 +75,11 @@
 private:
 
-  //!> the Observable we are signed on, also indicates whether we are sign on (not NULL)
-  const Observable * owner;
-
   QGeometryData updateTesselationHull() const;
-
-  //!> list of channels when tesselation hull needs to update
-  static const Observable::channels_t HullChannels;
 
   //!> contains current version of the tesselation hull on request
   QGeometryData TesselationHull;
 
-  typedef std::map< ObservedValue_Index_t, GLMoleculeObject_atom* > AtomNodeMap;
-  typedef std::multimap< ObservedValue_Index_t, GLMoleculeObject_bond* > BondNodeMap;
-  AtomNodeMap AtomsinSceneMap;
-  BondNodeMap BondsinSceneMap;
 
   atomId_t hoverAtomId;
-
-  QtObservedInstanceBoard &board;
 
   QtObservedMolecule::ptr ObservedMolecule;
Index: src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp	(revision 785d89098de752b05e69ab46e0145f0a07a87128)
+++ src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp	(revision f1b5ca904ef2ca5bf64048122b7d6dc1ed4716e3)
@@ -54,4 +54,6 @@
 
 #include "CodePatterns/Log.hpp"
+
+#include <boost/assign.hpp>
 
 #include "Actions/SelectionAction/Atoms/AtomByIdAction.hpp"
@@ -79,4 +81,7 @@
   board(_board)
 {
+  qRegisterMetaType<atomId_t>("atomId_t");
+  qRegisterMetaType<GLMoleculeObject_bond::SideOfBond>("GLMoleculeObject_bond::SideOfBond");
+
   int sphereDetails[] = {5, 3, 2, 0};
   int cylinderDetails[] = {16, 8, 6, 3};
@@ -94,7 +99,7 @@
   }
   connect(board, SIGNAL(moleculeInserted(QtObservedMolecule::ptr)),
-      this, SLOT(moleculeSignOn(QtObservedMolecule::ptr)), Qt::DirectConnection);
+      this, SLOT(moleculeInserted(QtObservedMolecule::ptr)));
   connect(board, SIGNAL(moleculeRemoved(ObservedValue_Index_t)),
-      this, SLOT(moleculeSignOff(ObservedValue_Index_t)), Qt::DirectConnection);
+      this, SLOT(moleculeRemoved(ObservedValue_Index_t)));
   connect(board, SIGNAL(atomInserted(QtObservedAtom::ptr)),
       this, SLOT(atomInserted(QtObservedAtom::ptr)));
@@ -105,8 +110,4 @@
   connect(board, SIGNAL(bondRemoved(ObservedValue_Index_t)),
       this, SLOT(bondRemoved(ObservedValue_Index_t)));
-  connect(this, SIGNAL(insertMolecule(QtObservedMolecule::ptr)),
-      this, SLOT(moleculeInserted(QtObservedMolecule::ptr)) );
-  connect(this, SIGNAL(removeMolecule(QtObservedMolecule*)),
-      this, SLOT(moleculeRemoved(QtObservedMolecule*)) );
 
 //  connect(this, SIGNAL(updated()), this, SLOT(update()));
@@ -143,4 +144,130 @@
 }
 
+/** Adds an atom to the scene.
+ *
+ * @param _atom atom to add
+ */
+void GLWorldScene::atomInserted(QtObservedAtom::ptr _atom)
+{
+  LOG(3, "INFO: GLWorldScene: Received signal atomInserted for atom "
+      << _atom->getAtomIndex());
+
+  GLMoleculeObject_atom *atomObject =
+      new GLMoleculeObject_atom(
+          GLMoleculeObject::meshSphere,
+          this, /* parent is GLWorldScene */
+          _atom);
+  ASSERT( atomObject != NULL,
+      "GLWorldScene::atomInserted - could not create atom object for "
+      +toString(_atom->getAtomIndex()));
+  const ObservedValue_Index_t atomid = _atom->getIndex();
+  AtomNodeMap::iterator iter = AtomsinSceneMap.find(atomid);
+  ASSERT(iter == AtomsinSceneMap.end(),
+      "GLWorldScene::atomInserted - same atom with id "
+      +toString(_atom->getAtomIndex())+" added again.");
+  AtomsinSceneMap.insert( make_pair(atomid, atomObject) );
+
+  connect (atomObject, SIGNAL(clicked(atomId_t)), this, SLOT(atomClicked(atomId_t)));
+  connect (atomObject, SIGNAL(changed()), this, SIGNAL(changed()));
+  connect (atomObject, SIGNAL(hoverChanged(GLMoleculeObject *)), this, SIGNAL(changed()));
+  connect (atomObject, SIGNAL(hoverChanged(GLMoleculeObject *)), this, SLOT(hoverChangedSignalled(GLMoleculeObject *)));
+
+  emit changed();
+  emit changeOccured();
+}
+
+/** Removes an atom.
+ *
+ * @param _atomid index of the atom that is removed
+ */
+void GLWorldScene::atomRemoved(ObservedValue_Index_t _atomid)
+{
+  LOG(3, "INFO: GLWorldScene: Received signal atomRemoved for atom "+toString(_atomid)+".");
+  // bonds are removed by signal coming from ~bond
+
+  // remove atoms
+  AtomNodeMap::iterator iter = AtomsinSceneMap.find(_atomid);
+  ASSERT(iter != AtomsinSceneMap.end(),
+      "GLWorldScene::atomRemoved() - atom "+toString(_atomid)+" not on display.");
+  GLMoleculeObject_atom *atomObject = iter->second;
+  AtomsinSceneMap.erase(iter);
+  delete atomObject;
+
+  emit changed();
+  emit changeOccured();
+}
+
+/** Adds a bond to the scene.
+ *
+ * @param _bond bond to add
+ */
+void GLWorldScene::bondInserted(QtObservedBond::ptr _bond)
+{
+  static const std::vector< GLMoleculeObject_bond::SideOfBond > bondsides =
+      boost::assign::list_of<GLMoleculeObject_bond::SideOfBond>
+          (GLMoleculeObject_bond::left)
+          (GLMoleculeObject_bond::right);
+  LOG(3, "INFO: GLWorldScene::bondInserted() - Adding bonds " << _bond->getBondIndex());
+  //LOG(4, "INFO: Currently present bonds " << BondsinSceneMap << ".");
+
+  const ObservedValue_Index_t bondid = _bond->getIndex();
+  BondNodeMap::iterator iter = BondsinSceneMap.find(bondid);
+  ASSERT( iter == BondsinSceneMap.end(),
+      "GLWorldScene::bondInserted() - bond "+toString(bondid)+" is already known.");
+  for (size_t i=0;i<2;++i) {
+    GLMoleculeObject_bond * bondObject =
+        new GLMoleculeObject_bond(GLMoleculeObject::meshCylinder, this, _bond, bondsides[i]);
+    connect (bondObject, SIGNAL(changed()), this, SIGNAL(changed()));
+    BondsinSceneMap.insert( std::make_pair(bondid, bondObject) );
+  }
+
+  emit changed();
+  emit changeOccured();
+}
+
+/** Removes a bond.
+ *
+ * @param _bondid id of bond to remove
+ */
+void GLWorldScene::bondRemoved(ObservedValue_Index_t _bondid)
+{
+  LOG(3, "INFO: GLWorldScene::bondRemoved() - Removing bond to id " << _bondid);
+
+  // left bond
+  BondNodeMap::iterator iter = BondsinSceneMap.find(_bondid);
+  ASSERT( iter != BondsinSceneMap.end(),
+      "GLWorldScene::bondRemoved() - could not find bond to id "+toString(_bondid));
+  GLMoleculeObject_bond *bondObject = iter->second;
+  delete bondObject; // is done by signal from bond itself
+  //LOG(4, "INFO: Still present bonds " << BondsinSceneMap << ".");
+  BondsinSceneMap.erase(iter);
+
+  emit changed();
+  emit changeOccured();
+}
+
+void GLWorldScene::hoverChangedSignalled(GLMoleculeObject *ob)
+{
+  // Find the atom, ob corresponds to.
+  hoverAtomId = -1;
+  GLMoleculeObject_atom *atomObject = dynamic_cast<GLMoleculeObject_atom *>(ob);
+  if (atomObject){
+    for (AtomNodeMap::iterator iter = AtomsinSceneMap.begin();iter != AtomsinSceneMap.end(); ++ iter){
+      if (iter->second == atomObject)
+        hoverAtomId = iter->second->objectId();
+    }
+
+    // Propagate signal.
+    emit hoverChanged(hoverAtomId);
+  } else {
+    // Find the atom, ob corresponds to.
+    GLMoleculeObject_molecule *moleculeObject = dynamic_cast<GLMoleculeObject_molecule *>(ob);
+    if (moleculeObject){
+      // Propagate signal.
+      emit hoverChanged(moleculeObject->objectId(), 0);
+    }
+  }
+}
+
 void GLWorldScene::moleculeClicked(moleculeId_t no)
 {
@@ -157,405 +284,4 @@
 }
 
-/** Prepares insertion of a general atom.
- *
- * This is called before the insertion into a molecule and thus before the
- * insertion into the scene.
- *
- * @param _atom atom to insert
- */
-void GLWorldScene::atomInserted(QtObservedAtom::ptr _atom)
-{
-  const ObservedValue_Index_t atomid = _atom->getIndex();
-  ASSERT( QtObservedAtomMap.find(atomid) == QtObservedAtomMap.end(),
-      "GLWorldScene::AtomInserted() - atom with id "+toString(_atom->getAtomIndex())
-      +" is already present in QtObservedAtomMap.");
-  QtObservedAtomMap[atomid] = _atom;
-}
-
-/** Removes an general atom.
- *
- * This is called when the atom has been removed from the molecule.
- *
- * @param _atom atom to remove
- */
-void GLWorldScene::atomRemoved(ObservedValue_Index_t _atomid)
-{
-  const QtObservedAtomMap_t::iterator eraseiter = QtObservedAtomMap.find(_atomid);
-  ASSERT( eraseiter != QtObservedAtomMap.end(),
-      "GLWorldScene::AtomRemoved() - atom with id "+toString(_atomid)
-      +" is not present in QtObservedAtomMap.");
-  QtObservedAtomMap.erase(eraseiter);
-}
-
-/** Prepares insertion of a bond.
- *
- * This is called before the insertion into a molecule and thus before the
- * insertion into the scene.
- *
- * @param _bond bond to insert
- */
-void GLWorldScene::bondInserted(QtObservedBond::ptr _bond)
-{
-  const ObservedValue_Index_t bondid = _bond->getIndex();
-  ASSERT( QtObservedBondMap.find(bondid) == QtObservedBondMap.end(),
-      "GLWorldScene::BondInserted() - bond with id "+toString(_bond->getBondIndex())
-      +" is already present in QtObservedBondMap.");
-  QtObservedBondMap[bondid] = _bond;
-
-  // assign to its molecule if present
-  const moleculeId_t molid = _bond->getMoleculeIndex();
-  if (molid != (moleculeId_t)-1) {
-    QtObservedMolecule::ptr mol = board->getObservedMolecule(molid);
-    emit moleculesBondInserted(_bond, mol.get());
-  } else {
-    // watch bond till it has a molecule
-    connect( _bond.get(), SIGNAL(moleculeIndexChanged(moleculeId_t,moleculeId_t)),
-        this, SLOT(bondsMoleculeChanged(moleculeId_t, moleculeId_t)));
-  }
-}
-
-/** Handle change of molecule from initial none.
- *
- */
-void GLWorldScene::bondsMoleculeChanged(moleculeId_t _oldid, moleculeId_t _newid)
-{
-  ASSERT( _oldid == (moleculeId_t)-1,
-      "GLWorldScene::bondsMoleculeChanged() - got true index change from "
-      +toString(_oldid)+" to "+toString(_newid)+" and not just added to mol.");
-  QtObservedBond* bondref = static_cast<QtObservedBond*>(sender());
-
-  // disconnect from further molecule changes
-  disconnect( bondref, SIGNAL(moleculeIndexChanged(moleculeId_t,moleculeId_t)),
-      this, SLOT(bondsMoleculeChanged(moleculeId_t, moleculeId_t)));
-
-  // add it to its molecule
-  QtObservedMolecule::ptr mol = board->getObservedMolecule(_newid);
-  emit moleculesBondInserted(bondref->getRef(), mol.get());
-}
-
-
-/** Removes an general bond.
- *
- * This is called when the bond has been removed from the molecule.
- *
- * @param _bond bond to remove
- */
-void GLWorldScene::bondRemoved(ObservedValue_Index_t _bondid)
-{
-  const QtObservedBondMap_t::iterator eraseiter = QtObservedBondMap.find(_bondid);
-  ASSERT( eraseiter != QtObservedBondMap.end(),
-      "GLWorldScene::BondRemoved() - bond with id "+toString(_bondid)
-      +" is not present in QtObservedBondMap.");
-  QtObservedBond::ptr bondref = eraseiter->second;
-
-  // tell its assigned molecule if present
-  const moleculeId_t molid = bondref->getMoleculeIndex();
-  if (molid != (moleculeId_t)-1) {
-    QtObservedMolecule::ptr mol = board->getObservedMolecule(molid);
-    emit moleculesBondRemoved(_bondid, mol.get());
-  } else {
-    // it might have still been waiting for a molecule assignment
-    disconnect( bondref.get(), SIGNAL(moleculeIndexChanged(moleculeId_t,moleculeId_t)),
-        this, SLOT(bondsMoleculeChanged(moleculeId_t, moleculeId_t)));
-  }
-  QtObservedBondMap.erase(eraseiter);
-}
-
-/** Inserts an atom into the scene when molecule is present.
- *
- * @param _atom atom to insert
- */
-void GLWorldScene::moleculesAtomInserted(QtObservedAtom::ptr _atom, QtObservedMolecule * _mol)
-{
-  const ObservedValue_Index_t atomid = _atom->getIndex();
-  // this ASSERT cannot work: The same molecule may get reassigned to a different
-  // molecule, when e.g. the time step changes (which triggers an update-molecules).
-  // The GUI is slow and may lack behind and thus get  to execute the event
-  // moleculeAtomInserted when the change has been already been done.
-//  ASSERT( (atommol == NULL) || (_mol == atommol),
-//      "GLWorldScene::moleculesAtomInserted() - atom "+toString(atomid)
-//      +" claims to belong to QtObservedMolecule "+toString(atommol)
-//      +" but signal came from QtObservedMolecule "+toString(_mol)+".");
-  LOG(3, "INFO: GLWorldScene: Received signal atomInserted for atom " << _atom->getAtomIndex());
-  const ObservedValue_Index_t molid = _mol->getIndex();
-
-  // check of molecule is already present
-  boost::recursive_mutex::scoped_lock lock(MoleculeinSceneMap_mutex);
-  const MoleculeNodeMap::iterator moliter = MoleculesinSceneMap.find(molid);
-  if (moliter != MoleculesinSceneMap.end()) {
-    const RemovedMoleculesMap_t::iterator emptyiter = EmptyMolecules.find(_mol);
-    if (emptyiter != EmptyMolecules.end())
-      EmptyMolecules.erase(emptyiter);
-    // check that it is the right molecule
-    QtObservedMolecule::ptr &checkmol = moliter->second->ObservedMolecule;
-    if (checkmol.get() == _mol) {
-      LOG(3, "INFO: GLWorldScene: Sending signal moleculesAtomInserted for atom "
-          << _atom->getAtomIndex());
-      QMetaObject::invokeMethod(moliter->second,        // pointer to a QObject
-                                "atomInserted",       // member name (no parameters here)
-                                Qt::QueuedConnection,     // connection type
-                                Q_ARG(QtObservedAtom::ptr, _atom));     // parameters
-    } else {
-      // relay atomRemoved to GLMoleculeObject_molecule in RemovedMolecules
-//      LOG(3, "INFO: GLWorldScene: Sending signal moleculesAtomInserted for atom "+toString(_atomid)
-//          +" to molecule in RemovedMolecules.");
-//      const RemovedMoleculesMap_t::iterator removedmoliter = RemovedMolecules.find(molid);
-//      ASSERT( removedmoliter != RemovedMolecules.end(),
-//          "GLWorldScene::moleculesAtomInserted() - signal from old mol "
-//          +toString(molid)+", but not present in RemovedMolecules");
-//      QMetaObject::invokeMethod(removedmoliter->second,        // pointer to a QObject
-//                                "atomInserted ",       // member name (no parameters here)
-//                                Qt::QueuedConnection,     // connection type
-//                                Q_ARG(QtObservedAtom::ptr, _atom));     // parameters
-      ASSERT( 0,
-          "GLWorldScene::moleculesAtomInserted() - would need to send atomInserted to already removed molecule.");
-    }
-  } else {
-    const RemovedMoleculesMap_t::iterator removedmoliter = RemovedMolecules.find(_mol);
-    if (removedmoliter != RemovedMolecules.end()) {
-      ASSERT( 0,
-          "GLWorldScene::moleculesAtomInserted() - would need to send atomInserted to already removed molecule.");
-    } else {
-      boost::recursive_mutex::scoped_lock lock(MoleculeMissedStateMap_mutex);
-      // only record missed state for molecule if (still) present but not instantiated
-      if (QtObservedMoleculeMap.count(molid)) {
-        // store signal for when it is instantiated
-        if (MoleculeMissedStateMap.count(molid) == 0)
-          MoleculeMissedStateMap.insert( std::make_pair(molid ,StateChangeMap_t()) );
-        MoleculeMissedStateMap[molid].insert( std::make_pair(atomid, atomInsertedState) );
-        ASSERT( QtObservedAtomMap[atomid] == _atom,
-            "GLWorldScene::moleculesAtomInserted() - atom "+toString(atomid)
-            +" inserted in molecule "+toString(_mol->getMolIndex())
-            +" which does not match atom in QtObservedAtomMap.");
-        LOG(3, "INFO: GLWorldScene: Placing atomInserted for atom " << _atom->getAtomIndex()
-             << " and molecule " << _mol->getMolIndex() << " into missed state map.");
-      }
-    }
-  }
-}
-
-/** Removes an atom into the scene before molecule is present.
- *
- * @param _atomid atom to remove
- */
-void GLWorldScene::moleculesAtomRemoved(ObservedValue_Index_t _atomid, QtObservedMolecule * _mol)
-{
-  LOG(3, "INFO: GLWorldScene: Received signal atomRemoved for atom "+toString(_atomid)+".");
-
-  const ObservedValue_Index_t molid = _mol->getIndex();
-  // check of molecule is already present
-  boost::recursive_mutex::scoped_lock lock(MoleculeinSceneMap_mutex);
-  const MoleculeNodeMap::iterator moliter = MoleculesinSceneMap.find(molid);
-  if (moliter != MoleculesinSceneMap.end()) {
-    const QtObservedMolecule::ptr &checkmol = moliter->second->ObservedMolecule;
-    if (checkmol.get() == _mol) {
-      LOG(3, "INFO: GLWorldScene: Sending signal moleculesAtomRemoved for atom "+toString(_atomid)+".");
-      QMetaObject::invokeMethod(moliter->second,        // pointer to a QObject
-                                "atomRemoved",       // member name (no parameters here)
-                                Qt::QueuedConnection,     // connection type
-                                Q_ARG(ObservedValue_Index_t, _atomid));     // parameters
-    } else {
-      // relay atomRemoved to GLMoleculeObject_molecule in RemovedMolecules
-      LOG(3, "INFO: GLWorldScene: Sending signal moleculesAtomRemoved for atom "+toString(_atomid)
-          +" to molecule in RemovedMolecules.");
-      const RemovedMoleculesMap_t::iterator removedmoliter = RemovedMolecules.find(_mol);
-      ASSERT( removedmoliter != RemovedMolecules.end(),
-          "GLWorldScene::moleculesAtomRemoved() - signal from old molecule "
-          +toString(molid)+", but not present in RemovedMolecules");
-#ifndef NDEBUG
-      const QtObservedMolecule::ptr &othercheckmol = removedmoliter->second->ObservedMolecule;
-#endif
-      ASSERT( othercheckmol.get() == _mol,
-          "GLWorldScene::moleculesAtomRemoved() - signal from old molecule "
-          +toString(molid)+", but different one "+toString(othercheckmol)
-          +" present in RemovedMolecules.");
-      QMetaObject::invokeMethod(removedmoliter->second,        // pointer to a QObject
-                                "atomRemoved",       // member name (no parameters here)
-                                Qt::QueuedConnection,     // connection type
-                                Q_ARG(ObservedValue_Index_t, _atomid));     // parameters
-    }
-  } else {
-    const RemovedMoleculesMap_t::iterator removedmoliter = RemovedMolecules.find(_mol);
-    if (removedmoliter != RemovedMolecules.end()) {
-      ASSERT( removedmoliter != RemovedMolecules.end(),
-          "GLWorldScene::moleculesAtomRemoved() - signal from old molecule "
-          +toString(molid)+", but not present in RemovedMolecules");
-#ifndef NDEBUG
-      const QtObservedMolecule::ptr &othercheckmol = removedmoliter->second->ObservedMolecule;
-#endif
-      ASSERT( othercheckmol.get() == _mol,
-          "GLWorldScene::moleculesAtomRemoved() - signal from old molecule "
-          +toString(molid)+", but different one "+toString(othercheckmol)
-          +" present in RemovedMolecules.");
-      QMetaObject::invokeMethod(removedmoliter->second,        // pointer to a QObject
-                                "atomRemoved",       // member name (no parameters here)
-                                Qt::QueuedConnection,     // connection type
-                                Q_ARG(ObservedValue_Index_t, _atomid));     // parameters
-    } else {
-      boost::recursive_mutex::scoped_lock lock(MoleculeMissedStateMap_mutex);
-      // only record missed state for molecule if (still) present but not instantiated
-      if (QtObservedMoleculeMap.count(molid)) {
-        // store signal for when it is instantiated
-        if (MoleculeMissedStateMap.count(molid) == 0)
-          MoleculeMissedStateMap.insert( std::make_pair(molid, StateChangeMap_t()) );
-        MoleculeMissedStateMap[molid].insert( std::make_pair(_atomid, atomRemovedState) );
-        LOG(3, "INFO: GLWorldScene: Placing atomRemoved for atom " << _atomid
-             << " and molecule " << molid << " into missed state map.");
-      }
-    }
-  }
-}
-
-/** Inserts an bond into the scene when molecule is present.
- *
- * @param _bond bond to insert
- */
-void GLWorldScene::moleculesBondInserted(QtObservedBond::ptr _bond, QtObservedMolecule * _mol)
-{
-  const ObservedValue_Index_t bondid = _bond->getIndex();
-  LOG(3, "INFO: GLWorldScene: Received signal bondInserted for bond " << _bond->getBondIndex());
-  const ObservedValue_Index_t molid = _mol->getIndex();
-
-  // check of molecule is already present
-  boost::recursive_mutex::scoped_lock lock(MoleculeinSceneMap_mutex);
-  const MoleculeNodeMap::iterator moliter = MoleculesinSceneMap.find(molid);
-  if (moliter != MoleculesinSceneMap.end()) {
-    // check that it is the right molecule
-    QtObservedMolecule::ptr &checkmol = moliter->second->ObservedMolecule;
-    ASSERT( checkmol.get() == _mol,
-        "GLWorldScene::moleculesBondInserted() - claimed and present molecule differ.");
-    LOG(3, "INFO: GLWorldScene: Sending signal moleculesBondInserted for bond "
-        << _bond->getBondIndex());
-    QMetaObject::invokeMethod(moliter->second,        // pointer to a QObject
-                              "bondInserted",       // member name (no parameters here)
-                              Qt::QueuedConnection,     // connection type
-                              Q_ARG(QtObservedBond::ptr, _bond));     // parameters
-  } else {
-#ifndef NDEBUG
-    const RemovedMoleculesMap_t::iterator removedmoliter = RemovedMolecules.find(_mol);
-    ASSERT( removedmoliter != RemovedMolecules.end(),
-          "GLWorldScene::moleculesBondInserted() - would need to send bondInserted to already removed molecule.");
-#endif
-    boost::recursive_mutex::scoped_lock lock(MoleculeMissedStateMap_mutex);
-    // only record missed state for molecule if (still) present but not instantiated
-    if (QtObservedMoleculeMap.count(molid)) {
-      // store signal for when it is instantiated
-      if (MoleculeMissedStateMap.count(molid) == 0)
-        MoleculeMissedStateMap.insert( std::make_pair(molid ,StateChangeMap_t()) );
-      MoleculeMissedStateMap[molid].insert( std::make_pair(bondid, bondInsertedState) );
-      ASSERT( QtObservedBondMap[bondid] == _bond,
-          "GLWorldScene::moleculesBondInserted() - bond "+toString(bondid)
-          +" inserted in molecule "+toString(_mol->getMolIndex())
-          +" which does not match bond in QtObservedBondMap.");
-      LOG(3, "INFO: GLWorldScene: Placing bondInserted for bond " << _bond->getBondIndex()
-           << " and molecule " << _mol->getMolIndex() << " into missed state map.");
-    }
-  }
-}
-
-/** Removes an bond into the scene before molecule is present.
- *
- * @param _bondid bond to remove
- */
-void GLWorldScene::moleculesBondRemoved(ObservedValue_Index_t _bondid, QtObservedMolecule * _mol)
-{
-  LOG(3, "INFO: GLWorldScene: Received signal bondRemoved for bond "+toString(_bondid)+".");
-
-  const ObservedValue_Index_t molid = _mol->getIndex();
-  // check of molecule is already present
-  boost::recursive_mutex::scoped_lock lock(MoleculeinSceneMap_mutex);
-  const MoleculeNodeMap::iterator moliter = MoleculesinSceneMap.find(molid);
-  if (moliter != MoleculesinSceneMap.end()) {
-    const QtObservedMolecule::ptr &checkmol = moliter->second->ObservedMolecule;
-    if (checkmol.get() == _mol) {
-      LOG(3, "INFO: GLWorldScene: Sending signal moleculesBondRemoved for bond "+toString(_bondid)+".");
-      QMetaObject::invokeMethod(moliter->second,        // pointer to a QObject
-                                "bondRemoved",       // member name (no parameters here)
-                                Qt::QueuedConnection,     // connection type
-                                Q_ARG(ObservedValue_Index_t, _bondid));     // parameters
-    } else {
-      // relay bondRemoved to GLMoleculeObject_molecule in RemovedMolecules
-      LOG(3, "INFO: GLWorldScene: Sending signal moleculesBondRemoved for bond "+toString(_bondid)
-          +" to molecule in RemovedMolecules.");
-      const RemovedMoleculesMap_t::iterator removedmoliter = RemovedMolecules.find(_mol);
-      ASSERT( removedmoliter != RemovedMolecules.end(),
-          "GLWorldScene::moleculesBondRemoved() - signal from old molecule "
-          +toString(molid)+", but not present in RemovedMolecules");
-#ifndef NDEBUG
-      const QtObservedMolecule::ptr &othercheckmol = removedmoliter->second->ObservedMolecule;
-      ASSERT( othercheckmol.get() == _mol,
-          "GLWorldScene::moleculesBondRemoved() - signal from old molecule "
-          +toString(molid)+", but different one "+toString(othercheckmol)
-          +" present in RemovedMolecules.");
-#endif
-      QMetaObject::invokeMethod(removedmoliter->second,        // pointer to a QObject
-                                "bondRemoved",       // member name (no parameters here)
-                                Qt::QueuedConnection,     // connection type
-                                Q_ARG(ObservedValue_Index_t, _bondid));     // parameters
-    }
-  } else {
-    const RemovedMoleculesMap_t::iterator removedmoliter = RemovedMolecules.find(_mol);
-    if (removedmoliter != RemovedMolecules.end()) {
-      ASSERT( removedmoliter != RemovedMolecules.end(),
-          "GLWorldScene::moleculesBondRemoved() - signal from old molecule "
-          +toString(molid)+", but not present in RemovedMolecules");
-#ifndef NDEBUG
-      const QtObservedMolecule::ptr &othercheckmol = removedmoliter->second->ObservedMolecule;
-      ASSERT( othercheckmol.get() == _mol,
-          "GLWorldScene::moleculesBondRemoved() - signal from old molecule "
-          +toString(molid)+", but different one "+toString(othercheckmol)
-          +" present in RemovedMolecules.");
-#endif
-      QMetaObject::invokeMethod(removedmoliter->second,        // pointer to a QObject
-                                "bondRemoved",       // member name (no parameters here)
-                                Qt::QueuedConnection,     // connection type
-                                Q_ARG(ObservedValue_Index_t, _bondid));     // parameters
-    } else {
-      boost::recursive_mutex::scoped_lock lock(MoleculeMissedStateMap_mutex);
-      // only record missed state for molecule if (still) present but not instantiated
-      if (QtObservedMoleculeMap.count(molid)) {
-        // store signal for when it is instantiated
-        if (MoleculeMissedStateMap.count(molid) == 0)
-          MoleculeMissedStateMap.insert( std::make_pair(molid, StateChangeMap_t()) );
-        MoleculeMissedStateMap[molid].insert( std::make_pair(_bondid, bondRemovedState) );
-        LOG(3, "INFO: GLWorldScene: Placing bondRemoved for bond " << _bondid
-             << " and molecule " << molid << " into missed state map.");
-      }
-    }
-  }
-}
-
-void GLWorldScene::moleculeSignOn(QtObservedMolecule::ptr _mol)
-{
-  // sign on to QtObservedMolecule to get atomInserted/..Removed signals from same
-  // source as GLMoleculeObject_molecule would
-  connect(_mol.get(), SIGNAL(atomInserted(QtObservedAtom::ptr, QtObservedMolecule *)),
-      this, SLOT(moleculesAtomInserted(QtObservedAtom::ptr, QtObservedMolecule *)) );
-  connect(_mol.get(), SIGNAL(atomRemoved(ObservedValue_Index_t, QtObservedMolecule *)),
-      this, SLOT(moleculesAtomRemoved(ObservedValue_Index_t, QtObservedMolecule *)) );
-  const ObservedValue_Index_t molid = _mol->getIndex();
-  ASSERT( QtObservedMoleculeMap.find(molid) == QtObservedMoleculeMap.end(),
-      "GLWorldScene::moleculeSignOn() - molecule with id "+toString(_mol->getMolIndex())
-      +" is already present in QtObservedMoleculeMap.");
-  QtObservedMoleculeMap[molid] = _mol;
-
-  LOG(3, "INFO: GLWorldScene: Received signal moleculeSignOn for molecule " << _mol->getMolIndex());
-
-  emit insertMolecule(_mol);
-}
-
-void GLWorldScene::moleculeSignOff(ObservedValue_Index_t _id)
-{
-  const QtObservedMoleculeMap_t::iterator eraseiter = QtObservedMoleculeMap.find(_id);
-  ASSERT( eraseiter != QtObservedMoleculeMap.end(),
-      "GLWorldScene::moleculeSignOff() - cannot find id "+toString(_id)+" in map.");
-  QtObservedMolecule * mol = eraseiter->second.get();
-  QtObservedMoleculeMap.erase(eraseiter);
-
-  LOG(3, "INFO: GLWorldScene: Received signal moleculeSignOff for molecule " << mol->getMolIndex());
-
-  emit removeMolecule(mol);
-}
-
 /** Inserts a molecule into the scene.
  *
@@ -564,11 +290,7 @@
 void GLWorldScene::moleculeInserted(QtObservedMolecule::ptr _mol)
 {
-  ASSERT (_mol,
-      "GLWorldScene::moleculeInserted() - received shared_ptr for molecule is empty?");
   const ObservedValue_Index_t molid = _mol->getIndex();
   LOG(3, "INFO: GLWorldScene: Received signal moleculeInserted for molecule "
       << _mol->getMolIndex());
-
-  boost::recursive_mutex::scoped_lock lock(MoleculeinSceneMap_mutex);
 
   MoleculeNodeMap::const_iterator iter = MoleculesinSceneMap.find(molid);
@@ -583,5 +305,4 @@
           GLMoleculeObject::meshEmpty,
           this,
-          *board,
           _mol);
   ASSERT( molObject != NULL,
@@ -596,207 +317,34 @@
       +" already present in scene.");
 
-  // now handle all state changes that came up before the instantiation
-  if (MoleculeMissedStateMap.count(molid) != 0) {
-//      ASSERT( !MoleculeMissedStateMap[molid].empty(),
-//          "GLWorldScene::moleculeInserted() - we have an empty state change map for molecule with id "
-//          +toString(molid));
-    boost::recursive_mutex::scoped_lock lock(MoleculeMissedStateMap_mutex);
-    for (StateChangeMap_t::iterator iter = MoleculeMissedStateMap[molid].begin();
-        !MoleculeMissedStateMap[molid].empty();
-        iter = MoleculeMissedStateMap[molid].begin()) {
-      std::pair<StateChangeMap_t::iterator, StateChangeMap_t::iterator> rangeiter =
-          MoleculeMissedStateMap[molid].equal_range(iter->first);
-      const size_t StateCounts = std::distance(rangeiter.first, rangeiter.second);
-      if (StateCounts > 1) {
-        // more than one state change, have to combine
-        typedef std::map<StateChangeType, size_t> StateChangeAmounts_t;
-        StateChangeAmounts_t StateChangeAmounts;
-        for (StateChangeMap_t::const_iterator stateiter = rangeiter.first;
-            stateiter != rangeiter.second; ++stateiter)
-          ++StateChangeAmounts[stateiter->second];
-        // is it an atom?
-        if ((StateChangeAmounts[atomInsertedState] + StateChangeAmounts[atomRemovedState]) != 0) {
-          ASSERT( StateChangeAmounts[atomInsertedState] >= StateChangeAmounts[atomRemovedState],
-              "GLWorldScene::moleculeInserted() - more atomRemoved states "
-              +toString(StateChangeAmounts[atomRemovedState])+" than atomInserted "
-              +toString(StateChangeAmounts[atomInsertedState])+" for atom "+toString(iter->first));
-          if (StateChangeAmounts[atomInsertedState] > StateChangeAmounts[atomRemovedState]) {
-            LOG(1, "INFO: invoking atomInserted for atom " << iter->first);
-            QMetaObject::invokeMethod(molObject,        // pointer to a QObject
-                                      "atomInserted",       // member name (no parameters here)
-                                      Qt::QueuedConnection,     // connection type
-                                      Q_ARG(QtObservedAtom::ptr, QtObservedAtomMap[iter->first]));     // parameters
-          } else {
-            LOG(1, "INFO: Atom " << iter->first << " has been inserted and removed already.");
-          }
-        }
-        // or is it a bond?
-        if ((StateChangeAmounts[bondInsertedState] + StateChangeAmounts[bondInsertedState]) != 0) {
-          ASSERT( StateChangeAmounts[bondInsertedState] >= StateChangeAmounts[bondRemovedState],
-              "GLWorldScene::moleculeInserted() - more bondRemoved states "
-              +toString(StateChangeAmounts[bondRemovedState])+" than bondInserted "
-              +toString(StateChangeAmounts[bondInsertedState])+" for bond "+toString(iter->first));
-          if (StateChangeAmounts[bondInsertedState] > StateChangeAmounts[bondRemovedState]) {
-            LOG(1, "INFO: invoking bondInserted for bond " << iter->first);
-            QMetaObject::invokeMethod(molObject,        // pointer to a QObject
-                                      "bondInserted",       // member name (no parameters here)
-                                      Qt::QueuedConnection,     // connection type
-                                      Q_ARG(QtObservedBond::ptr, QtObservedBondMap[iter->first]));     // parameters
-          } else {
-            LOG(1, "INFO: Bond " << iter->first << " has been inserted and removed already.");
-          }
-        }
-        ASSERT( (StateChangeAmounts[bondInsertedState] + StateChangeAmounts[bondInsertedState]
-            + StateChangeAmounts[atomInsertedState] + StateChangeAmounts[atomRemovedState]) != 0,
-            "GLWorldScene::moleculeInserted() - state with no changes for "+toString(iter->first));
-        // removed all state changes for this atom/bond
-        MoleculeMissedStateMap[molid].erase(rangeiter.first, rangeiter.second);
-      } else {
-        // can only be an insertion
-        switch (rangeiter.first->second) {
-          case atomRemovedState:
-            ASSERT( 0,
-                "GLWorldScene::moleculeInserted() - atomRemoved state without atomInserted for atom "
-                +toString(iter->first));
-            break;
-          case atomInsertedState:
-          {
-            LOG(1, "INFO: invoking atomInserted for atom " << iter->first);
-            QMetaObject::invokeMethod(molObject,        // pointer to a QObject
-                                      "atomInserted",       // member name (no parameters here)
-                                      Qt::QueuedConnection,     // connection type
-                                      Q_ARG(QtObservedAtom::ptr, QtObservedAtomMap[iter->first]));     // parameters
-            break;
-          }
-          case bondRemovedState:
-            ASSERT( 0,
-                "GLWorldScene::moleculeInserted() - bondRemoved state without bondInserted for bond "
-                +toString(iter->first));
-            break;
-          case bondInsertedState:
-          {
-            LOG(1, "INFO: invoking bondInserted for bond " << iter->first);
-            QMetaObject::invokeMethod(molObject,        // pointer to a QObject
-                                      "bondInserted",       // member name (no parameters here)
-                                      Qt::QueuedConnection,     // connection type
-                                      Q_ARG(QtObservedBond::ptr, QtObservedBondMap[iter->first]));     // parameters
-            break;
-          }
-          default:
-            ASSERT( 0,
-                "GLWorldScene::moleculeInserted() - there are unknown change states.");
-            break;
-        }
-        // removed state changes for this atom/bond
-        MoleculeMissedStateMap[molid].erase(iter);
-      }
-    }
-  }
-
   connect (molObject, SIGNAL(changed()), this, SIGNAL(changed()));
   connect (molObject, SIGNAL(changeOccured()), this, SIGNAL(changeOccured()));
-  connect (molObject, SIGNAL(atomClicked(atomId_t)), this, SLOT(atomClicked(atomId_t)));
-  connect (molObject, SIGNAL(moleculeClicked(moleculeId_t)), this, SLOT(moleculeClicked(moleculeId_t)));
-  connect (molObject, SIGNAL(moleculeEmptied(QtObservedMolecule::ptr)), this, SLOT(moleculeEmpty(QtObservedMolecule::ptr)));
-  connect (molObject, SIGNAL(selectionChanged()), this, SIGNAL(changed()));
-  connect (molObject, SIGNAL(selectionChanged()), this, SIGNAL(changed()));
-  connect (molObject, SIGNAL(hoverChanged(const atomId_t)), this, SIGNAL(hoverChanged(const atomId_t)));
-  connect (molObject, SIGNAL(hoverChanged(const moleculeId_t, int)), this, SIGNAL(hoverChanged(const moleculeId_t, int)));
-  connect (molObject, SIGNAL(hoverChanged(const moleculeId_t, int)), this, SIGNAL(hoverChanged(const moleculeId_t, int)));
-
-  emit changed();
-  emit changeOccured();
-
-  // remove state change map for the molecule
-  {
-    boost::recursive_mutex::scoped_lock lock(MoleculeMissedStateMap_mutex);
-    MoleculeMissedStateMap.erase(molid);
-  }
+
+  emit changed();
+  emit changeOccured();
 }
 
 /** Removes a molecule from the scene.
  *
- * @param _mol QtObservedMolecule instance of molecule to remove
- */
-void GLWorldScene::moleculeRemoved(QtObservedMolecule* _mol)
-{
-  const ObservedValue_Index_t molid = _mol->getIndex();
-  LOG(3, "INFO: GLWorldScene: Received signal moleculeRemoved for molecule "+toString(molid)+".");
-
-  boost::recursive_mutex::scoped_lock lock(MoleculeinSceneMap_mutex);
-
-  MoleculeNodeMap::iterator iter = MoleculesinSceneMap.find(molid);
+ * @param _molid index of the molecule to remove
+ */
+void GLWorldScene::moleculeRemoved(ObservedValue_Index_t _molid)
+{
+  LOG(3, "INFO: GLWorldScene: Received signal moleculeRemoved for molecule "+toString(_molid)+".");
+
+  MoleculeNodeMap::iterator iter = MoleculesinSceneMap.find(_molid);
   ASSERT ( iter != MoleculesinSceneMap.end(),
-      "GLWorldScene::moleculeRemoved() - to be removed molecule "+toString(_mol->getMolIndex())
+      "GLWorldScene::moleculeRemoved() - to be removed molecule "+toString(_molid)
       +" is already gone.");
   // check if it's already empty
-  const RemovedMoleculesMap_t::iterator emptyiter = EmptyMolecules.find(_mol);
-  if (emptyiter != EmptyMolecules.end()) {
-    LOG(1, "DEBUG: Removing empty GLMoleculeObject_molecule to id " << _mol->getMolIndex()
-        << " from scene.");
-    // it's already empty, remove it
-    ASSERT( emptyiter->second == iter->second,
-        "GLWorldScene::moleculeRemoved() - empty molecule "
-        +toString(emptyiter->second)+" and removed molecule "
-        +toString(iter->second)+" don't match.");
-    LOG(1, "DEBUG: Deleting already empty GLMoleculeObject_molecule to id " << _mol->getMolIndex());
-    GLMoleculeObject_molecule *molObject = emptyiter->second;
-    EmptyMolecules.erase(emptyiter);
-    molObject->disconnect();
-    delete molObject;
-
-    emit changed();
-    emit changeOccured();
-  } else {
-    // otherwise note it as removal candidate
-    RemovedMolecules.insert( std::make_pair(_mol, iter->second) );
-  }
+  GLMoleculeObject_molecule *molObject = iter->second;
+  delete molObject;
   MoleculesinSceneMap.erase(iter);
 
-  // remove any possible state changes left
-  {
-    boost::recursive_mutex::scoped_lock lock(MoleculeMissedStateMap_mutex);
-    MoleculeMissedStateMap.erase(molid);
-  }
-}
-
-void GLWorldScene::moleculeEmpty(QtObservedMolecule::ptr _mol)
-{
-  LOG(3, "INFO: GLWorldScene: Received signal moleculeEmpty for molecule "
-      +toString(_mol->getMolIndex())+".");
-
-  boost::recursive_mutex::scoped_lock lock(MoleculeinSceneMap_mutex);
-
-  const ObservedValue_Index_t molid = _mol->getIndex();
-  MoleculeNodeMap::iterator iter = MoleculesinSceneMap.find(molid);
-  if ( iter == MoleculesinSceneMap.end()) {
-    RemovedMoleculesMap_t::iterator removeiter = RemovedMolecules.find(_mol.get());
-    ASSERT ( removeiter != RemovedMolecules.end(),
-        "GLWorldScene::moleculeEmpty() - to be removed molecule "+toString(_mol->getMolIndex())
-        +" is neither in MoleculesinSceneMap, nor in RemovedMolecules.");
-    // it's noted for removal already, remove it
-    LOG(1, "DEBUG: Deleting empty GLMoleculeObject_molecule to id " << _mol->getMolIndex());
-    GLMoleculeObject_molecule *molObject = removeiter->second;
-    RemovedMolecules.erase(removeiter);
-    molObject->disconnect();
-    delete molObject;
-
-    emit changed();
-    emit changeOccured();
-  } else {
-    // otherwise just note it as empty
-    EmptyMolecules.insert( std::make_pair(_mol.get(), iter->second) );
-  }
-
-//  // remove any possible state changes left
-//  {
-//    boost::recursive_mutex::scoped_lock lock(MoleculeMissedStateMap_mutex);
-//    MoleculeMissedStateMap.erase(molid);
-//  }
+  emit changed();
+  emit changeOccured();
 }
 
 void GLWorldScene::moleculesVisibilityChanged(ObservedValue_Index_t _id, bool _visible)
 {
-  boost::recursive_mutex::scoped_lock lock(MoleculeinSceneMap_mutex);
   MoleculeNodeMap::iterator iter = MoleculesinSceneMap.find(_id);
   ASSERT( iter != MoleculesinSceneMap.end(),
Index: src/UIElements/Views/Qt4/Qt3D/GLWorldScene.hpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLWorldScene.hpp	(revision 785d89098de752b05e69ab46e0145f0a07a87128)
+++ src/UIElements/Views/Qt4/Qt3D/GLWorldScene.hpp	(revision f1b5ca904ef2ca5bf64048122b7d6dc1ed4716e3)
@@ -19,6 +19,4 @@
 
 #include <iosfwd>
-
-#include <boost/thread/recursive_mutex.hpp>
 
 #include "Bond/bond.hpp"
@@ -85,24 +83,14 @@
   void hoverChanged(const atomId_t);
   void hoverChanged(const moleculeId_t, int);
-  void insertMolecule(QtObservedMolecule::ptr);
-  void removeMolecule(QtObservedMolecule*);
 
 private slots:
   void atomClicked(atomId_t no);
-  void moleculeClicked(moleculeId_t no);
-  void moleculeRemoved(QtObservedMolecule* _mol);
-  void moleculeEmpty(QtObservedMolecule::ptr _mol);
-  void moleculeInserted(QtObservedMolecule::ptr);
-  void moleculeSignOn(QtObservedMolecule::ptr);
-  void moleculeSignOff(ObservedValue_Index_t _id);
-  void moleculesAtomRemoved(ObservedValue_Index_t _atomid, QtObservedMolecule * _mol);
-  void moleculesAtomInserted(QtObservedAtom::ptr, QtObservedMolecule *_mol);
-  void moleculesBondRemoved(ObservedValue_Index_t _bondid, QtObservedMolecule * _mol);
-  void moleculesBondInserted(QtObservedBond::ptr, QtObservedMolecule *_mol);
   void atomRemoved(ObservedValue_Index_t _atomid);
   void atomInserted(QtObservedAtom::ptr);
   void bondRemoved(ObservedValue_Index_t _bondid);
   void bondInserted(QtObservedBond::ptr);
-  void bondsMoleculeChanged(moleculeId_t _oldid, moleculeId_t _newid);
+  void moleculeClicked(moleculeId_t no);
+  void moleculeRemoved(ObservedValue_Index_t _molid);
+  void moleculeInserted(QtObservedMolecule::ptr);
   void setSelectionModeAtom();
   void setSelectionModeMolecule();
@@ -111,4 +99,5 @@
 //  void update();
   void moleculesVisibilityChanged(ObservedValue_Index_t _id, bool _visible);
+  void hoverChangedSignalled(GLMoleculeObject *ob);
 
 public:
@@ -117,42 +106,16 @@
 private:
 
+  //!> id of atom hovered over
+  atomId_t hoverAtomId;
+
   typedef std::map< ObservedValue_Index_t , GLMoleculeObject_molecule* > MoleculeNodeMap;
+  typedef std::map< ObservedValue_Index_t, GLMoleculeObject_atom* > AtomNodeMap;
+  typedef std::map< ObservedValue_Index_t, GLMoleculeObject_bond* > BondNodeMap;
   typedef std::map< std::string , GLMoleculeObject_shape* > ShapeNodeMap;
+
+  AtomNodeMap AtomsinSceneMap;
+  BondNodeMap BondsinSceneMap;
   MoleculeNodeMap MoleculesinSceneMap;
   ShapeNodeMap ShapesinSceneMap;
-  //!> flag to indicate whether state map is currently worked on
-  boost::recursive_mutex MoleculeinSceneMap_mutex;
-
-  //!> enumeration of all possible changes molecule might have missed before instantiation
-  enum StateChangeType {
-    atomInsertedState,
-    atomRemovedState,
-    bondInsertedState,
-    bondRemovedState,
-    MAX_StateChangeType
-  };
-  typedef std::map< ObservedValue_Index_t, QtObservedAtom::ptr> QtObservedAtomMap_t;
-  typedef std::map< ObservedValue_Index_t, QtObservedBond::ptr> QtObservedBondMap_t;
-  typedef std::map< ObservedValue_Index_t, QtObservedMolecule::ptr> QtObservedMoleculeMap_t;
-  typedef std::multimap< ObservedValue_Index_t, StateChangeType> StateChangeMap_t;
-  typedef std::map< ObservedValue_Index_t, StateChangeMap_t> MissedStateMap_t;
-  //!> map of all missed state changes
-  MissedStateMap_t MoleculeMissedStateMap;
-  //!> map to contain all QtObservedAtom that have not been instantiated so far
-  QtObservedAtomMap_t QtObservedAtomMap;
-  //!> map to contain all QtObservedBond that have not been instantiated so far
-  QtObservedBondMap_t QtObservedBondMap;
-  //!> map to contain all QtObservedMolecule that have not been instantiated so far
-  QtObservedMoleculeMap_t QtObservedMoleculeMap;
-
-  //!> map to get from QtObservedMolecule to the visual representant
-  typedef std::map< QtObservedMolecule* , GLMoleculeObject_molecule* > RemovedMoleculesMap_t;
-  //!> set of all currently removed molecules
-  RemovedMoleculesMap_t RemovedMolecules;
-  //!> set of all currently empty molecules (about to be removed)
-  RemovedMoleculesMap_t EmptyMolecules;
-
-  //!> flag to indicate whether state map is currently worked on
-  boost::recursive_mutex MoleculeMissedStateMap_mutex;
 
   SelectionModeType selectionMode;
