Index: src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_atom.cpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_atom.cpp	(revision eac542d5b19b04687918ad9252e1d9cb4adfc4cd)
+++ src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_atom.cpp	(revision 704d59ccf5f2559ab48b197552d1bea827b92ad2)
@@ -241,5 +241,6 @@
     switch (notification->getChannelNo()) {
       case World::SelectionChanged:
-        setSelected(World::getInstance().isSelected(_atom));
+        if (_atom != NULL)
+          setSelected(World::getInstance().isSelected(_atom));
         break;
       default:
Index: src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp	(revision eac542d5b19b04687918ad9252e1d9cb4adfc4cd)
+++ src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp	(revision 704d59ccf5f2559ab48b197552d1bea827b92ad2)
@@ -53,4 +53,5 @@
 #include "molecule.hpp"
 #include "Descriptors/AtomIdDescriptor.hpp"
+#include "Descriptors/MoleculeIdDescriptor.hpp"
 #include "Element/element.hpp"
 #include "LinearAlgebra/Vector.hpp"
@@ -66,6 +67,11 @@
 #include "GLMoleculeObject_atom.hpp"
 
-static QGLSceneNode *createMoleculeMesh(const molecule *molref, QObject *parent)
-{
+static QGLSceneNode *createMoleculeMesh(const moleculeId_t molid, QObject *parent)
+{
+  const molecule *molref = World::getInstance().getMolecule(MoleculeById(molid));
+  if (molref == NULL) {
+    ELOG(1, "Could not createMoleculeMesh, molecule with id " << molid << " already gone.");
+    return NULL;
+  }
 //  Shape shape = molref->getBoundingSphere();
   double minradius = 2.; // TODO: set to maximum bond length value
@@ -140,18 +146,23 @@
 }
 
-GLMoleculeObject_molecule::GLMoleculeObject_molecule(QObject *parent, const molecule *molref) :
-  GLMoleculeObject(createMoleculeMesh(molref, parent), parent),
-  Observer(std::string("GLMoleculeObject_molecule")+toString(molref->getId())),
+GLMoleculeObject_molecule::GLMoleculeObject_molecule(QObject *parent, const moleculeId_t molid) :
+  GLMoleculeObject(createMoleculeMesh(molid, parent), parent),
+  Observer(std::string("GLMoleculeObject_molecule")+toString(molid)),
   isBoundingBoxUptodate(true),
   isSignedOn(false),
-  _molecule(molref),
+  moleculeid(molid),
   TesselationHullUptodate(true),
-  hoverAtom(NULL)
+  hoverAtomId(-1)
 {
   // sign on as observer (obtain non-const instance before)
-  _molecule->signOn(this, molecule::AtomInserted);
-  _molecule->signOn(this, molecule::AtomRemoved);
-  _molecule->signOn(this, molecule::AtomMoved);
-  isSignedOn = true;
+  const molecule *_molecule = World::getInstance().getMolecule(MoleculeById(moleculeid));
+  if (_molecule != NULL) {
+    _molecule->signOn(this, molecule::AtomInserted);
+    _molecule->signOn(this, molecule::AtomRemoved);
+    _molecule->signOn(this, molecule::AtomMoved);
+    isSignedOn = true;
+  } else {
+    ELOG(1, "GLMoleculeObject_molecule() - added null object for not present mol id " << moleculeid);
+  }
   /*molref->signOn(this, AtomObservable::IndexChanged);
   molref->signOn(this, AtomObservable::PositionChanged);
@@ -173,18 +184,23 @@
 }
 
-GLMoleculeObject_molecule::GLMoleculeObject_molecule(QGLSceneNode *mesh[], QObject *parent, const molecule *molref) :
+GLMoleculeObject_molecule::GLMoleculeObject_molecule(QGLSceneNode *mesh[], QObject *parent, const moleculeId_t molid) :
   GLMoleculeObject(mesh, parent),
-  Observer(std::string("GLMoleculeObject_molecule")+toString(molref->getId())),
+  Observer(std::string("GLMoleculeObject_molecule")+toString(molid)),
   isBoundingBoxUptodate(true),
   isSignedOn(false),
-  _molecule(molref),
+  moleculeid(molid),
   TesselationHullUptodate(true),
-  hoverAtom(NULL)
+  hoverAtomId(-1)
 {
   // sign on as observer (obtain non-const instance before)
-  _molecule->signOn(this, molecule::AtomInserted);
-  _molecule->signOn(this, molecule::AtomRemoved);
-  _molecule->signOn(this, molecule::AtomMoved);
-  isSignedOn = true;
+  const molecule *_molecule = World::getInstance().getMolecule(MoleculeById(moleculeid));
+  if (_molecule != NULL) {
+    _molecule->signOn(this, molecule::AtomInserted);
+    _molecule->signOn(this, molecule::AtomRemoved);
+    _molecule->signOn(this, molecule::AtomMoved);
+    isSignedOn = true;
+  } else {
+    ELOG(1, "GLMoleculeObject_molecule() - added null object for not present mol id " << moleculeid);
+  }
   /*molref->signOn(this, AtomObservable::IndexChanged);
   molref->signOn(this, AtomObservable::PositionChanged);
@@ -209,7 +225,13 @@
 {
   if (isSignedOn) {
-    _molecule->signOff(this, molecule::AtomInserted);
-    _molecule->signOff(this, molecule::AtomRemoved);
-    _molecule->signOff(this, molecule::AtomMoved);
+    const molecule *_molecule = World::getInstance().getMolecule(MoleculeById(moleculeid));
+    if (_molecule != NULL) {
+      _molecule->signOff(this, molecule::AtomInserted);
+      _molecule->signOff(this, molecule::AtomRemoved);
+      _molecule->signOff(this, molecule::AtomMoved);
+    } else {
+      ELOG(1, "GLMoleculeObject_molecule cannot sign off, molecule with "
+          << moleculeid << " has disappeared.");
+    }
   }
   /*_atom->signOff(this, AtomObservable::IndexChanged);
@@ -225,4 +247,10 @@
 void GLMoleculeObject_molecule::init()
 {
+  const molecule *_molecule = World::getInstance().getMolecule(MoleculeById(moleculeid));
+  if (_molecule == NULL) {
+    ELOG(1, "GLMoleculeObject_molecule cannot init, molecule with "
+        << moleculeid << " has disappeared.");
+    return;
+  }
   if (_molecule->begin() != _molecule->end()) {
     int atomicid = -1;
@@ -292,4 +320,10 @@
 void GLMoleculeObject_molecule::reinit()
 {
+  const molecule *_molecule = World::getInstance().getMolecule(MoleculeById(moleculeid));
+  if (_molecule == NULL) {
+    ELOG(1, "GLMoleculeObject_molecule cannot reinit, molecule with "
+        << moleculeid << " has disappeared.");
+    return;
+  }
   if (_molecule->getAtomCount() > 0) {
     for (molecule::const_iterator atomiter = _molecule->begin();
@@ -314,4 +348,10 @@
 {
   isBoundingBoxUptodate = true;
+  const molecule *_molecule = World::getInstance().getMolecule(MoleculeById(moleculeid));
+  if (_molecule == NULL) {
+    ELOG(1, "GLMoleculeObject_molecule cannot updateBoundingBox, molecule with "
+        << moleculeid << " has disappeared.");
+    return;
+  }
   Shape shape = _molecule->getBoundingSphere();
   Vector v = shape.getCenter();
@@ -335,4 +375,5 @@
 void GLMoleculeObject_molecule::recieveNotification(Observable *publisher, Notification_ptr notification)
 {
+  const molecule *_molecule = World::getInstance().getMolecule(MoleculeById(moleculeid));
   if (publisher == dynamic_cast<const Observable*>(_molecule)){
     // notofication from atom
@@ -387,5 +428,10 @@
     switch (notification->getChannelNo()) {
       case World::SelectionChanged:
-        setSelected(World::getInstance().isSelected(_molecule));
+        if (_molecule != NULL) {
+          setSelected(World::getInstance().isSelected(_molecule));
+        } else {
+          ELOG(1, "GLMoleculeObject_molecule cannot change selection, molecule with "
+              << moleculeid << " has disappeared.");
+        }
         break;
       default:
@@ -489,4 +535,6 @@
   LOG(3, "INFO: GLWorldScene: Received signal atomInserted for atom "+toString(_id)+".");
   GLMoleculeObject_atom *atomObject = new GLMoleculeObject_atom(GLMoleculeObject::meshSphere, this, _id);
+  ASSERT( atomObject != NULL,
+      "GLMoleculeObject_molecule::atomInserted - could not create atom object for "+toString(_id));
   AtomNodeMap::iterator iter = AtomsinSceneMap.find(_id);
   ASSERT(iter == AtomsinSceneMap.end(),
@@ -512,5 +560,8 @@
   // add all bonds
   const atom *Walker = World::getInstance().getAtom(AtomById(_id));
-  addAtomBonds(Walker);
+  if (Walker != NULL)
+    addAtomBonds(Walker);
+  else
+    ELOG(1, "GLMoleculeObject_atom disappeared while about to add bonds.");
 
   emit changeOccured();
@@ -528,5 +579,5 @@
   // bonds are removed by signal coming from ~bond
 
-  if (m_objectId == _id)
+  if ((unsigned int)m_objectId == _id)
     setObjectId(-1);
 
@@ -536,6 +587,6 @@
       "GLWorldScene::atomRemoved() - atom "+toString(_id)+" not on display.");
   GLMoleculeObject_atom *atomObject = iter->second;
+  AtomsinSceneMap.erase(iter);
   atomObject->disconnect();
-  AtomsinSceneMap.erase(iter);
   delete atomObject;
 
@@ -548,14 +599,14 @@
 {
   // Find the atom, ob corresponds to.
-  hoverAtom = NULL;
+  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)
-        hoverAtom = World::getInstance().getAtom(AtomById(iter->first));
+        hoverAtomId = iter->first;
     }
 
     // Propagate signal.
-    emit hoverChanged(*hoverAtom);
+    emit hoverChanged(hoverAtomId);
   } else {
     // Find the atom, ob corresponds to.
@@ -563,5 +614,5 @@
     if (moleculeObject == this){
       // Propagate signal.
-      emit hoverChanged(*_molecule, 0);
+      emit hoverChanged(moleculeid, 0);
     }
   }
@@ -653,5 +704,5 @@
 {
   if (!TesselationHullUptodate) {
-    updateMesh(createMoleculeMesh(_molecule, parent()));
+    updateMesh(createMoleculeMesh(moleculeid, parent()));
     TesselationHullUptodate = true;
   }
@@ -666,5 +717,5 @@
 void GLMoleculeObject_molecule::wasClicked()
 {
-  LOG(4, "INFO: GLMoleculeObject_molecule: atom " << _molecule->getId() << " has been clicked");
-  emit moleculeClicked(_molecule->getId());
-}
+  LOG(4, "INFO: GLMoleculeObject_molecule: atom " << moleculeid << " has been clicked");
+  emit moleculeClicked(moleculeid);
+}
Index: src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.hpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.hpp	(revision eac542d5b19b04687918ad9252e1d9cb4adfc4cd)
+++ src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.hpp	(revision 704d59ccf5f2559ab48b197552d1bea827b92ad2)
@@ -30,6 +30,6 @@
   Q_OBJECT
 public:
-  GLMoleculeObject_molecule(QObject *parent, const molecule *molref);
-  GLMoleculeObject_molecule(QGLSceneNode *mesh[], QObject *parent, const molecule *molref);
+  GLMoleculeObject_molecule(QObject *parent, const moleculeId_t molid);
+  GLMoleculeObject_molecule(QGLSceneNode *mesh[], QObject *parent, const moleculeId_t molid);
   virtual ~GLMoleculeObject_molecule();
 
@@ -57,6 +57,6 @@
   void changed();
   void changeOccured();
-  void hoverChanged(const atom&);
-  void hoverChanged(const molecule&, int);
+  void hoverChanged(const atomId_t);
+  void hoverChanged(const moleculeId_t, int);
   void atomClicked(atomId_t no);
   void moleculeClicked(moleculeId_t no);
@@ -95,5 +95,5 @@
   bool isSignedOn;
 
-  const molecule *_molecule;
+  const moleculeId_t moleculeid;
 
   bool TesselationHullUptodate;
@@ -104,5 +104,5 @@
   BondNodeMap BondsinSceneMap;
 
-  const atom *hoverAtom;
+  atomId_t hoverAtomId;
 };
 
Index: src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp	(revision eac542d5b19b04687918ad9252e1d9cb4adfc4cd)
+++ src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp	(revision 704d59ccf5f2559ab48b197552d1bea827b92ad2)
@@ -275,26 +275,19 @@
 
   // add new object
-  const molecule *_mol = World::getInstance().getMolecule(MoleculeById(_id));
-  if (_mol != NULL) {
-    GLMoleculeObject_molecule *molObject = new GLMoleculeObject_molecule(GLMoleculeObject::meshEmpty, this, _mol);
-    MoleculesinSceneMap.insert( make_pair(_id, molObject) );
-    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(changeAtomId(GLMoleculeObject_atom *, int, int)), this, SLOT(changeAtomId(GLMoleculeObject_atom *, int, int)));
-    connect (molObject, SIGNAL(selectionChanged()), this, SIGNAL(changed()));
-    connect (molObject, SIGNAL(selectionChanged()), this, SIGNAL(changed()));
-    connect (molObject, SIGNAL(hoverChanged(const atom &)), this, SIGNAL(hoverChanged(const atom &)));
-    connect (molObject, SIGNAL(hoverChanged(const molecule &, int)), this, SIGNAL(hoverChanged(const molecule &, int)));
-    emit changed();
-    emit changeOccured();
-  } else {
-    // the molecule is already gone, we add it nonetheless as null object as
-    // lateron moleculeRemoved wants to erase it.
-    ELOG(1, "GLWorldScene::moleculeInserted() - added null object for not present mol id " << _id);
-    GLMoleculeObject_molecule *molObject = NULL;
-    MoleculesinSceneMap.insert( make_pair(_id, molObject) );
-  }
+  GLMoleculeObject_molecule *molObject = new GLMoleculeObject_molecule(GLMoleculeObject::meshEmpty, this, _id);
+  ASSERT( molObject != NULL,
+      "GLWorldScene::moleculeInserted - could not create molecule object for "+toString(_id));
+  MoleculesinSceneMap.insert( make_pair(_id, molObject) );
+  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(changeAtomId(GLMoleculeObject_atom *, int, int)), this, SLOT(changeAtomId(GLMoleculeObject_atom *, int, int)));
+  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)));
+  emit changed();
+  emit changeOccured();
 }
 
Index: src/UIElements/Views/Qt4/Qt3D/GLWorldScene.hpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLWorldScene.hpp	(revision eac542d5b19b04687918ad9252e1d9cb4adfc4cd)
+++ src/UIElements/Views/Qt4/Qt3D/GLWorldScene.hpp	(revision 704d59ccf5f2559ab48b197552d1bea827b92ad2)
@@ -75,6 +75,6 @@
   void clicked(atomId_t);
   void doubleClicked();
-  void hoverChanged(const atom &);
-  void hoverChanged(const molecule &, int);
+  void hoverChanged(const atomId_t);
+  void hoverChanged(const moleculeId_t, int);
 
 private slots:
Index: src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp	(revision eac542d5b19b04687918ad9252e1d9cb4adfc4cd)
+++ src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp	(revision 704d59ccf5f2559ab48b197552d1bea827b92ad2)
@@ -87,6 +87,6 @@
   connect(worldscene, SIGNAL(changeOccured()), this, SLOT(changeSignalled()));
   connect(worldscene, SIGNAL(changed()), this, SIGNAL(changed()));
-  connect(worldscene, SIGNAL(hoverChanged(const atom &)), this, SLOT(sceneHoverSignalled(const atom &)));
-  connect(worldscene, SIGNAL(hoverChanged(const molecule &, int)), this, SLOT(sceneHoverSignalled(const molecule &, int)));
+  connect(worldscene, SIGNAL(hoverChanged(const atomId_t)), this, SLOT(sceneHoverSignalled(const atomId_t)));
+  connect(worldscene, SIGNAL(hoverChanged(const moleculeId_t, int)), this, SLOT(sceneHoverSignalled(const moleculeId_t, int)));
   connect(this, SIGNAL(worldSelectionChanged()), worldscene, SLOT(worldSelectionChanged()));
   connect(this, SIGNAL(moleculeRemoved(const moleculeId_t)), worldscene, SLOT(moleculeRemoved(const moleculeId_t)));
@@ -762,11 +762,11 @@
 }
 
-void GLWorldView::sceneHoverSignalled(const atom &_atom)
-{
-  emit hoverChanged(_atom);
-}
-
-void GLWorldView::sceneHoverSignalled(const molecule &_mol, int _i)
-{
-  emit hoverChanged(_mol, _i);
-}
+void GLWorldView::sceneHoverSignalled(const atomId_t _id)
+{
+  emit hoverChanged(_id);
+}
+
+void GLWorldView::sceneHoverSignalled(const moleculeId_t _id, int _i)
+{
+  emit hoverChanged(_id, _i);
+}
Index: src/UIElements/Views/Qt4/Qt3D/GLWorldView.hpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLWorldView.hpp	(revision eac542d5b19b04687918ad9252e1d9cb4adfc4cd)
+++ src/UIElements/Views/Qt4/Qt3D/GLWorldView.hpp	(revision 704d59ccf5f2559ab48b197552d1bea827b92ad2)
@@ -51,6 +51,6 @@
   void checkChanges();
   void sceneChangeSignalled();
-  void sceneHoverSignalled(const atom &_atom);
-  void sceneHoverSignalled(const molecule &_mol, int);
+  void sceneHoverSignalled(const atomId_t _id);
+  void sceneHoverSignalled(const moleculeId_t _id, int);
   void changeDreiBein();
   void changeDomain();
@@ -62,6 +62,6 @@
   void moleculeRemoved(const moleculeId_t _id);
   void worldSelectionChanged();
-  void hoverChanged(const atom &_atom);
-  void hoverChanged(const molecule &_mol, int);
+  void hoverChanged(const atomId_t _id);
+  void hoverChanged(const moleculeId_t _id, int);
   void ShapeAdded();
   void ShapeRemoved();
