Index: src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp	(revision 1c096148307b79af138ecbd1dba0c35ec4c1f96f)
+++ src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp	(revision 8281ccea226e5aed0efe851c821e72456e18aa1a)
@@ -94,13 +94,13 @@
   }
   connect(board, SIGNAL(moleculeInserted(QtObservedMolecule::ptr)),
-      this, SLOT(moleculeInserted(QtObservedMolecule::ptr)));
+      this, SLOT(moleculeSignOn(QtObservedMolecule::ptr)));
   connect(board, SIGNAL(moleculeRemoved(const moleculeId_t)),
-      this, SLOT(moleculeRemoved(const moleculeId_t)));
+      this, SLOT(moleculeSignOff(const moleculeId_t)));
   connect(board, SIGNAL(moleculeIndexChanged(const moleculeId_t, const moleculeId_t)),
       this, SLOT(moleculeIndexChanged(const moleculeId_t, const moleculeId_t)));
-  connect(board, SIGNAL(atomInserted(QtObservedAtom::ptr)),
-      this, SLOT(atomInserted(QtObservedAtom::ptr)));
-  connect(board, SIGNAL(atomRemoved(const moleculeId_t, const atomId_t)),
-      this, SLOT(atomRemoved(const moleculeId_t, const atomId_t)));
+  connect(this, SIGNAL(insertMolecule(QtObservedMolecule::ptr)),
+      this, SLOT(moleculeInserted(QtObservedMolecule::ptr)) );
+  connect(this, SIGNAL(removeMolecule(const moleculeId_t)),
+      this, SLOT(moleculeRemoved(const moleculeId_t)) );
 
 //  connect(this, SIGNAL(updated()), this, SLOT(update()));
@@ -174,4 +174,6 @@
     MoleculeMissedStateMap[molid].insert( std::make_pair(atomid, atomInsertedState) );
     QtObservedAtomMap[atomid] = _atom;
+    connect(_atom.get(), SIGNAL(indexChanged(const atomId_t,const atomId_t)),
+        this, SLOT(atomIndexChanged(const atomId_t,const atomId_t)) );
     LOG(3, "INFO: GLWorldScene: Placing atomInserted for atom " << atomid
          << " and molecule " << molid << " into missed state map.");
@@ -184,22 +186,56 @@
  * @param _atomid atom to insert
  */
-void GLWorldScene::atomRemoved(const moleculeId_t _molid, const atomId_t _atomid)
-{
+void GLWorldScene::atomRemoved(const atomId_t _atomid)
+{
+  boost::recursive_mutex::scoped_lock lock(MoleculeMissedStateMap_mutex);
+
   LOG(3, "INFO: GLWorldScene: Received signal atomRemoved for atom "+toString(_atomid)+".");
 
-  boost::recursive_mutex::scoped_lock lock(MoleculeMissedStateMap_mutex);
-
-  // check of molecule is already present
-  MoleculeNodeMap::iterator moliter = MoleculesinSceneMap.find(_molid);
-  if (moliter != MoleculesinSceneMap.end()) {
-    // no action, is also caught via QtObservedMolecule by GLMoleculeObject_molecule
-  } else {
-    // 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.");
-  }
+  // if atom is not in map, then GLMoleculeObject_molecule is already present anyway.
+  if (QtObservedAtomMap.count(_atomid)) {
+    const QtObservedAtom::ptr atom = QtObservedAtomMap[_atomid];
+    const moleculeId_t molid = atom->getAtomMoleculeIndex();
+    // check of molecule is already present
+    MoleculeNodeMap::iterator moliter = MoleculesinSceneMap.find(molid);
+    if (moliter != MoleculesinSceneMap.end()) {
+      // no action, is also caught via QtObservedMolecule by GLMoleculeObject_molecule
+    } else {
+      // 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.");
+    }
+  }
+}
+
+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)),
+      this, SLOT(atomInserted(QtObservedAtom::ptr)) );
+  connect(_mol.get(), SIGNAL(atomRemoved(const atomId_t)),
+      this, SLOT(atomRemoved(const atomId_t)) );
+  const moleculeId_t molid = _mol->getMolIndex();
+  QtObservedMoleculeMap.insert( std::make_pair(molid, _mol) );
+
+  LOG(3, "INFO: GLWorldScene: Received signal moleculeSignOn for molecule "+toString(molid)+".");
+
+  emit insertMolecule(_mol);
+}
+
+void GLWorldScene::moleculeSignOff(const moleculeId_t _id)
+{
+  ASSERT( QtObservedMoleculeMap.count(_id),
+      "GLWorldScene::moleculeSignOff() - cannot find id "+toString(_id)+" in map.");
+  const QtObservedMolecule::ptr mol = QtObservedMoleculeMap[_id];
+  mol->disconnect(this);
+  QtObservedMoleculeMap.erase(_id);
+
+  LOG(3, "INFO: GLWorldScene: Received signal moleculeSignOff for molecule "+toString(_id)+".");
+
+  emit removeMolecule(_id);
 }
 
@@ -289,4 +325,5 @@
           {
             LOG(1, "INFO: invoking atomInserted for atom " << iter->first);
+            const QtObservedAtom::ptr walker = QtObservedAtomMap[iter->first];
             QMetaObject::invokeMethod(molObject,        // pointer to a QObject
                                       "atomInserted",       // member name (no parameters here)
@@ -357,4 +394,13 @@
 }
 
+void GLWorldScene::atomIndexChanged(const atomId_t _oldid, const atomId_t _newid)
+{
+  if (QtObservedAtomMap.count(_oldid)) {
+    const QtObservedAtom::ptr atom = QtObservedAtomMap[_oldid];
+    QtObservedAtomMap.erase(_oldid);
+    QtObservedAtomMap.insert( std::make_pair(_newid, atom) );
+  }
+}
+
 void GLWorldScene::moleculeIndexChanged(const moleculeId_t _oldid, const moleculeId_t _newid)
 {
@@ -367,4 +413,9 @@
     RemovalMolecules.erase(removeiter);
     RemovalMolecules.insert(_newid);
+    if (QtObservedMoleculeMap.count(_oldid)) {
+      const QtObservedMolecule::ptr mol = QtObservedMoleculeMap[_oldid];
+      QtObservedMoleculeMap.erase(_oldid);
+      QtObservedMoleculeMap.insert( std::make_pair(_newid, mol) );
+    }
   } else {
     LOG(1, "DEBUG: Changing GLMoleculeObject_molecule from " << _oldid << " to id " << _newid);
@@ -467,41 +518,2 @@
 }
 
-void GLWorldScene::changeMoleculeId(
-    GLMoleculeObject_molecule *ob,
-    const moleculeId_t oldId,
-    const moleculeId_t newId)
-{
-  LOG(3, "INFO: GLWorldScene - change molecule id " << oldId << " to " << newId << ".");
-
-  {
-    boost::recursive_mutex::scoped_lock lock(MoleculeinSceneMap_mutex);
-    // Remove from map.
-    MoleculeNodeMap::iterator iter = MoleculesinSceneMap.find(oldId);
-    ASSERT(iter != MoleculesinSceneMap.end(),
-        "GLWorldScene::changeMoleculeId() - molecule with old id "+toString(oldId)+" not on display.");
-    ASSERT(iter->second == ob,
-        "GLWorldScene::changeMoleculeId() - molecule with id "
-        +toString(oldId)+" does not match with object in MoleculesinSceneMap.");
-    MoleculesinSceneMap.erase(iter);
-
-    // Reinsert with new id.
-    {
-      MoleculeNodeMap::iterator iter = MoleculesinSceneMap.find(newId);
-      ASSERT(iter == MoleculesinSceneMap.end(),
-            "GLWorldScene::changeMoleculeId() -  moleculewith new id "+toString(newId)+" already known.");
-    }
-    MoleculesinSceneMap.insert( make_pair(newId, ob) );
-  }
-
-  {
-    boost::recursive_mutex::scoped_lock lock(MoleculeMissedStateMap_mutex);
-    // Remove and re-insert from map if present.
-    MoleculeMissedStateMap_t::iterator iter = MoleculeMissedStateMap.find(oldId);
-    if (iter != MoleculeMissedStateMap.end()) {
-      StateChangeMap_t changemap = iter->second;
-      MoleculeMissedStateMap.erase(iter);
-      MoleculeMissedStateMap.insert( std::make_pair(newId, changemap) );
-    }
-  }
-}
-
Index: src/UIElements/Views/Qt4/Qt3D/GLWorldScene.hpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLWorldScene.hpp	(revision 1c096148307b79af138ecbd1dba0c35ec4c1f96f)
+++ src/UIElements/Views/Qt4/Qt3D/GLWorldScene.hpp	(revision 8281ccea226e5aed0efe851c821e72456e18aa1a)
@@ -84,4 +84,6 @@
   void hoverChanged(const atomId_t);
   void hoverChanged(const moleculeId_t, int);
+  void insertMolecule(QtObservedMolecule::ptr);
+  void removeMolecule(const moleculeId_t);
 
 private slots:
@@ -89,8 +91,11 @@
   void moleculeClicked(moleculeId_t no);
   void moleculeRemoved(const moleculeId_t _id);
+  void moleculeSignOff(const moleculeId_t _id);
   void moleculeInserted(QtObservedMolecule::ptr);
+  void moleculeSignOn(QtObservedMolecule::ptr);
   void moleculeIndexChanged(const moleculeId_t _oldid, const moleculeId_t _newid);
-  void atomRemoved(const moleculeId_t _molid, const atomId_t _atomid);
+  void atomRemoved(const atomId_t _atomid);
   void atomInserted(QtObservedAtom::ptr);
+  void atomIndexChanged(const atomId_t _oldid, const atomId_t _newid);
   void setSelectionModeAtom();
   void setSelectionModeMolecule();
@@ -99,5 +104,4 @@
 //  void update();
   void moleculesVisibilityChanged(const moleculeId_t _id, bool _visible);
-  void changeMoleculeId(GLMoleculeObject_molecule *, const moleculeId_t, const moleculeId_t);
 
 public:
@@ -124,4 +128,5 @@
   };
   typedef std::map< atomId_t, QtObservedAtom::ptr> QtObservedAtomMap_t;
+  typedef std::map< moleculeId_t, QtObservedMolecule::ptr> QtObservedMoleculeMap_t;
   typedef std::multimap< atomId_t, StateChangeType> StateChangeMap_t;
   typedef std::map< moleculeId_t, StateChangeMap_t> MoleculeMissedStateMap_t;
@@ -130,4 +135,6 @@
   //!> map to contain all QtObservedAtom that have not been instantiated so far
   QtObservedAtomMap_t QtObservedAtomMap;
+  //!> map to contain all QtObservedMolecule that have not been instantiated so far
+  QtObservedMoleculeMap_t QtObservedMoleculeMap;
   //!> flag to indicate whether state map is currently worked on
   boost::recursive_mutex MoleculeMissedStateMap_mutex;
