Index: src/UIElements/Views/Qt4/MoleculeList/QtMoleculeItem.cpp
===================================================================
--- src/UIElements/Views/Qt4/MoleculeList/QtMoleculeItem.cpp	(revision 704d59ccf5f2559ab48b197552d1bea827b92ad2)
+++ src/UIElements/Views/Qt4/MoleculeList/QtMoleculeItem.cpp	(revision 69b434b1d1a5180a87c3d669024542593104c8e0)
@@ -41,17 +41,22 @@
 #include "CodePatterns/MemDebug.hpp"
 
+#include "CodePatterns/Assert.hpp"
+#include "CodePatterns/toString.hpp"
+
 #include "CodePatterns/Observer/Notification.hpp"
 
 #include <algorithm>
 
+#include "Descriptors/MoleculeIdDescriptor.hpp"
 #include "molecule.hpp"
+#include "World.hpp"
 
 QtMoleculeItem::QtMoleculeItem(
-     const molecule * const _mol,
+     const moleculeId_t _molid,
      const channellist_t &_channellist,
      const enum MoveTypes _movetype,
      const emitDirtyState_t _emitDirtyState) :
   Observer("QtMoleculeItem"),
-  mol(_mol),
+  molid(_molid),
   movetype(_movetype),
   channellist(_channellist),
@@ -66,17 +71,23 @@
 void QtMoleculeItem::signOnToMolecule()
 {
-  if (!IsSignedOn)
-    for (channellist_t::const_iterator channeliter = channellist.begin();
-        channeliter != channellist.end(); ++channeliter)
-      mol->signOn(this, *channeliter);
-  IsSignedOn = true;
+  const molecule *mol = World::getInstance().getMolecule(MoleculeById(molid));
+  if (mol != NULL) {
+    if (!IsSignedOn)
+      for (channellist_t::const_iterator channeliter = channellist.begin();
+          channeliter != channellist.end(); ++channeliter)
+        mol->signOn(this, *channeliter);
+    IsSignedOn = true;
+  }
 }
 
 void QtMoleculeItem::signOffFromMolecule()
 {
-  if (IsSignedOn)
-    for (channellist_t::const_iterator channeliter = channellist.begin();
-        channeliter != channellist.end(); ++channeliter)
-      mol->signOff(this, *channeliter);
+  const molecule *mol = World::getInstance().getMolecule(MoleculeById(molid));
+  if (mol != NULL) {
+    if (IsSignedOn)
+      for (channellist_t::const_iterator channeliter = channellist.begin();
+          channeliter != channellist.end(); ++channeliter)
+        mol->signOff(this, *channeliter);
+  }
   IsSignedOn = false;
 }
@@ -104,5 +115,5 @@
       signOffFromMolecule();
       // prevent any remaining updates from accessing the molecule
-      //mol = NULL;
+      //molid = -1;
       dirty = false;
     } else {
@@ -126,2 +137,10 @@
   dirty = false;
 }
+
+const molecule * const QtMoleculeItem::getMolecule() const
+{
+  const molecule * mol = World::getInstance().getMolecule(MoleculeById(molid));
+  ASSERT (mol != NULL,
+      "QtMoleculeItem::getMolecule() - mol with "+toString(molid)+" is gone.");
+  return mol;
+}
Index: src/UIElements/Views/Qt4/MoleculeList/QtMoleculeItem.hpp
===================================================================
--- src/UIElements/Views/Qt4/MoleculeList/QtMoleculeItem.hpp	(revision 704d59ccf5f2559ab48b197552d1bea827b92ad2)
+++ src/UIElements/Views/Qt4/MoleculeList/QtMoleculeItem.hpp	(revision 69b434b1d1a5180a87c3d669024542593104c8e0)
@@ -52,5 +52,5 @@
 
   QtMoleculeItem(
-      const molecule * const _mol,
+      const moleculeId_t _molid,
       const channellist_t &_channellist,
       const enum MoveTypes _movetype,
@@ -67,6 +67,5 @@
    * \return const ref to \a mol
    */
-  const molecule * const getMolecule() const
-  { return mol; }
+  const molecule * const getMolecule() const;
 
 private:
@@ -85,5 +84,5 @@
 
   //!> molecule we are signed on to
-  const molecule * const mol;
+  const moleculeId_t molid;
 
 private:
Index: src/UIElements/Views/Qt4/MoleculeList/QtMoleculeItemFactory.cpp
===================================================================
--- src/UIElements/Views/Qt4/MoleculeList/QtMoleculeItemFactory.cpp	(revision 704d59ccf5f2559ab48b197552d1bea827b92ad2)
+++ src/UIElements/Views/Qt4/MoleculeList/QtMoleculeItemFactory.cpp	(revision 69b434b1d1a5180a87c3d669024542593104c8e0)
@@ -85,13 +85,13 @@
 QList<QStandardItem *>
 QtMoleculeItemFactory::createMoleculeItems(
-    const molecule * const _mol,
+    const moleculeId_t _molid,
     const QtMoleculeItem::emitDirtyState_t &_emitDirtyState)
 {
   QList<QStandardItem *> molItems;
-  molItems << new QtMoleculeItem_name(_mol, _emitDirtyState);
-  molItems << new QtMoleculeItem_visibility(_mol, _emitDirtyState);
-  molItems << new QtMoleculeItem_atomcount(_mol, _emitDirtyState);
-  molItems << new QtMoleculeItem_formula(_mol, _emitDirtyState);
-  molItems << new QtMoleculeItem_occurrence(_mol, _emitDirtyState);
+  molItems << new QtMoleculeItem_name(_molid, _emitDirtyState);
+  molItems << new QtMoleculeItem_visibility(_molid, _emitDirtyState);
+  molItems << new QtMoleculeItem_atomcount(_molid, _emitDirtyState);
+  molItems << new QtMoleculeItem_formula(_molid, _emitDirtyState);
+  molItems << new QtMoleculeItem_occurrence(_molid, _emitDirtyState);
   return molItems;
 }
Index: src/UIElements/Views/Qt4/MoleculeList/QtMoleculeItemFactory.hpp
===================================================================
--- src/UIElements/Views/Qt4/MoleculeList/QtMoleculeItemFactory.hpp	(revision 704d59ccf5f2559ab48b197552d1bea827b92ad2)
+++ src/UIElements/Views/Qt4/MoleculeList/QtMoleculeItemFactory.hpp	(revision 69b434b1d1a5180a87c3d669024542593104c8e0)
@@ -46,10 +46,10 @@
   /** Creates all QtMoleculeItem's that make up the row for a single molecule.
    *
-   * \param _mol ref to molecule which is stored internally
+   * \param _molid id of molecule
    * \param _emitDirtyState callback function to model to inform about required state update
    * \return list of prepared items to be appended to a group item
    */
   QList<QStandardItem *> createMoleculeItems(
-      const molecule * const _mol,
+      const moleculeId_t _molid,
       const QtMoleculeItem::emitDirtyState_t &_emitDirtyState);
 
Index: src/UIElements/Views/Qt4/MoleculeList/QtMoleculeList.cpp
===================================================================
--- src/UIElements/Views/Qt4/MoleculeList/QtMoleculeList.cpp	(revision 704d59ccf5f2559ab48b197552d1bea827b92ad2)
+++ src/UIElements/Views/Qt4/MoleculeList/QtMoleculeList.cpp	(revision 69b434b1d1a5180a87c3d669024542593104c8e0)
@@ -102,8 +102,8 @@
 }
 
-QtMoleculeItem * QtMoleculeList::MoleculeToItem(const molecule * const _mol) const
+QtMoleculeItem * QtMoleculeList::MoleculeIdToItem(const moleculeId_t _molid) const
 {
   MoleculeItemBiMap_t::left_const_iterator iter =
-      MoleculeItemBiMap.left.find(_mol);
+      MoleculeItemBiMap.left.find(_molid);
   if( iter != MoleculeItemBiMap.left.end())
     return iter->second;
@@ -112,5 +112,5 @@
 }
 
-const molecule * const QtMoleculeList::ItemToMolecule(const QtMoleculeItem * const _item) const
+const moleculeId_t QtMoleculeList::ItemToMoleculeId(const QtMoleculeItem * const _item) const
 {
   const MoleculeItemBiMap_t::right_const_iterator iter =
@@ -119,14 +119,14 @@
     return iter->second;
   else
-      return NULL;
-}
-
-const molecule * const QtMoleculeList::IndexToMolecule(const QModelIndex &_index) const
+    return -1;
+}
+
+const moleculeId_t QtMoleculeList::IndexToMoleculeId(const QModelIndex &_index) const
 {
   QtMoleculeItem * const item = dynamic_cast<QtMoleculeItem *>(itemFromIndex(_index));
   if (item == NULL)
-    return NULL;
+    return -1;
   else
-    return ItemToMolecule(item);
+    return ItemToMoleculeId(item);
 }
 
@@ -153,5 +153,5 @@
         list_accessing = false;
 
-        const QtMoleculeItem *mol_item = MoleculeToItem(mol);
+        const QtMoleculeItem *mol_item = MoleculeIdToItem(mol->getId());
         if (mol_item != NULL) {
           QStandardItem *parent_item = mol_item->parent();
@@ -194,13 +194,13 @@
 void QtMoleculeList::addMoleculeItem(
     QStandardItem *_groupitem,
-    const molecule * const _mol,
+    const moleculeId_t _molid,
     const std::string &_molecule_formula)
 {
   QList<QStandardItem *> molItems =
-      QtMoleculeItemFactory::getInstance().createMoleculeItems(_mol, callback_DirtyItems);
+      QtMoleculeItemFactory::getInstance().createMoleculeItems(_molid, callback_DirtyItems);
   QtMoleculeItem *mol_item = dynamic_cast<QtMoleculeItem *>(molItems.front());
   ASSERT( mol_item != NULL,
       "QtMoleculeList::addMoleculeItem() - item from factory was not a QtMoleculeItem?");
-  MoleculeItemBiMap.left.insert( std::make_pair(_mol, mol_item) );
+  MoleculeItemBiMap.left.insert( std::make_pair(_molid, mol_item) );
 //  LOG(1, "Inserting molecule " << _mol->getId() << ": " << _mol);
   _groupitem->appendRow(molItems);
@@ -242,5 +242,5 @@
 
   // add molecule
-  addMoleculeItem(groupItem, _mol, molecule_formula);
+  addMoleculeItem(groupItem, _mol->getId(), molecule_formula);
 }
 
@@ -567,5 +567,5 @@
   for (std::vector<const molecule *>::iterator removeiter = toBeRemovedItems_copy.begin();
       removeiter != toBeRemovedItems_copy.end(); ++removeiter) {
-    QtMoleculeItem *item = MoleculeToItem(*removeiter);
+    QtMoleculeItem *item = MoleculeIdToItem((*removeiter)->getId());
     dirtyItems_copy.erase(item);
     toBeMovedItems_copy.erase(item);
@@ -577,5 +577,6 @@
             (*visiter)->index().row(),
             QtMoleculeItemFactory::NAME));
-    const molecule *mol = ItemToMolecule(_item);
+    const moleculeId_t molid = ItemToMoleculeId(_item);
+    const molecule *mol = World::getInstance().getMolecule(MoleculeById(molid));
     if (std::binary_search(
             toBeRemovedItems_copy.begin(), toBeRemovedItems_copy.end(),
@@ -613,5 +614,5 @@
       removeiter != toBeRemovedItems_copy.end(); ++removeiter) {
 //    LOG(1, "Removing molecule " << *removeiter); // cannot access directly, molecule is gone
-    QtMoleculeItem *item = MoleculeToItem(*removeiter);
+    QtMoleculeItem *item = MoleculeIdToItem((*removeiter)->getId());
     if (item != NULL)
       removeItem(item);
Index: src/UIElements/Views/Qt4/MoleculeList/QtMoleculeList.hpp
===================================================================
--- src/UIElements/Views/Qt4/MoleculeList/QtMoleculeList.hpp	(revision 704d59ccf5f2559ab48b197552d1bea827b92ad2)
+++ src/UIElements/Views/Qt4/MoleculeList/QtMoleculeList.hpp	(revision 69b434b1d1a5180a87c3d669024542593104c8e0)
@@ -81,11 +81,11 @@
   friend class QtMoleculeListView;
 
-  QtMoleculeItem * MoleculeToItem(const molecule * const _mol) const;
-  const molecule * const IndexToMolecule(const QModelIndex &_index) const;
-  const molecule * const ItemToMolecule(const QtMoleculeItem * const _item) const;
+  QtMoleculeItem * MoleculeIdToItem(const moleculeId_t _molid) const;
+  const moleculeId_t IndexToMoleculeId(const QModelIndex &_index) const;
+  const moleculeId_t ItemToMoleculeId(const QtMoleculeItem * const _item) const;
 
   void addMolecule(const molecule * const _mol);
   void addGroupItem(QStandardItem *&mainitem, const std::string &_molecule_formula);
-  void addMoleculeItem(QStandardItem *_groupitem, const molecule * const _mol, const std::string &molecule_formula);
+  void addMoleculeItem(QStandardItem *_groupitem, const moleculeId_t _molid, const std::string &molecule_formula);
   void removeItem(QtMoleculeItem * const _item);
   int setOccurrence(QStandardItem * const _groupitem);
@@ -106,5 +106,5 @@
   FormulaTreeItemMap_t formula;
 
-  typedef boost::bimap<const molecule *, QtMoleculeItem*> MoleculeItemBiMap_t;
+  typedef boost::bimap<moleculeId_t, QtMoleculeItem*> MoleculeItemBiMap_t;
   MoleculeItemBiMap_t MoleculeItemBiMap;
 
Index: src/UIElements/Views/Qt4/MoleculeList/QtMoleculeListView.cpp
===================================================================
--- src/UIElements/Views/Qt4/MoleculeList/QtMoleculeListView.cpp	(revision 704d59ccf5f2559ab48b197552d1bea827b92ad2)
+++ src/UIElements/Views/Qt4/MoleculeList/QtMoleculeListView.cpp	(revision 69b434b1d1a5180a87c3d669024542593104c8e0)
@@ -105,13 +105,11 @@
     foreach (index, items)
       if ((index.column() == 0) && (selectionModel()->isSelected(index))) {
-        const molecule *mol = moleculelist->IndexToMolecule(index);
-        if (mol == NULL) // means we are looking at deselection because of removal
-          continue;
-        int mol_id = mol->getId();
+        const moleculeId_t mol_id = moleculelist->IndexToMoleculeId(index);
+        const molecule * const mol = World::getInstance().getMolecule(MoleculeById(mol_id));
         // check for invalid molecule
         if (mol_id < 0)
           continue;
         // means we are looking at deselection because of removal (in World)
-        if (World::getInstance().getMolecule(MoleculeById(mol_id)) != mol)
+        if (mol == NULL)
           continue;
         if (!World::getInstance().isSelected(mol))
@@ -129,14 +127,12 @@
     ids.reserve(items.size());
     foreach (index, items)
-    if ((index.column() == 0) && (!selectionModel()->isSelected(index))) {
-        const molecule *mol = moleculelist->IndexToMolecule(index);
-        if (mol == NULL) // means we are looking at deselection because of removal
-          continue;
-        int mol_id = mol->getId();
+      if ((index.column() == 0) && (!selectionModel()->isSelected(index))) {
+        const moleculeId_t mol_id = moleculelist->IndexToMoleculeId(index);
+        const molecule * const mol = World::getInstance().getMolecule(MoleculeById(mol_id));
         // check for invalid molecule
         if (mol_id < 0)
           continue;
         // means we are looking at deselection because of removal (in World)
-        if (World::getInstance().getMolecule(MoleculeById(mol_id)) != mol)
+        if (mol == NULL)
           continue;
         if (World::getInstance().isSelected(mol))
@@ -167,5 +163,5 @@
         for (std::vector<molecule *>::const_iterator iter = selectedMolecules.begin();
             iter != selectedMolecules.end(); ++iter) {
-          QtMoleculeItem *item = moleculelist->MoleculeToItem(*iter);
+          QtMoleculeItem *item = moleculelist->MoleculeIdToItem((*iter)->getId());
           if (item != NULL) {
             QModelIndex mol_index = item->index();
Index: src/UIElements/Views/Qt4/MoleculeList/SpecificItems/QtMoleculeItem_atomcount.hpp
===================================================================
--- src/UIElements/Views/Qt4/MoleculeList/SpecificItems/QtMoleculeItem_atomcount.hpp	(revision 704d59ccf5f2559ab48b197552d1bea827b92ad2)
+++ src/UIElements/Views/Qt4/MoleculeList/SpecificItems/QtMoleculeItem_atomcount.hpp	(revision 69b434b1d1a5180a87c3d669024542593104c8e0)
@@ -16,5 +16,7 @@
 #include "UIElements/Views/Qt4/MoleculeList/QtMoleculeItem.hpp"
 
+#include "Descriptors/MoleculeIdDescriptor.hpp"
 #include "molecule.hpp"
+#include "World.hpp"
 
 class QtMoleculeItemFactory;
@@ -29,7 +31,7 @@
 
   QtMoleculeItem_atomcount(
-      const molecule * const _mol,
+      const moleculeId_t _molid,
       emitDirtyState_t _emitDirtyState) :
-        QtMoleculeItem(_mol, channellist_atomcount, QtMoleculeItem::NeedsMove, _emitDirtyState)
+        QtMoleculeItem(_molid, channellist_atomcount, QtMoleculeItem::NeedsMove, _emitDirtyState)
   {
     // cannot call pure virtual function in QtMoleculeItem's cstor
@@ -42,5 +44,9 @@
   void internal_updateState()
   {
-    setText(QString::number(mol->getAtomCount()));
+    const molecule * mol = World::getInstance().getMolecule(MoleculeById(molid));
+    if (mol != NULL)
+      setText(QString::number(mol->getAtomCount()));
+    else
+      setText(QString::number(-1));
   }
 
Index: src/UIElements/Views/Qt4/MoleculeList/SpecificItems/QtMoleculeItem_formula.hpp
===================================================================
--- src/UIElements/Views/Qt4/MoleculeList/SpecificItems/QtMoleculeItem_formula.hpp	(revision 704d59ccf5f2559ab48b197552d1bea827b92ad2)
+++ src/UIElements/Views/Qt4/MoleculeList/SpecificItems/QtMoleculeItem_formula.hpp	(revision 69b434b1d1a5180a87c3d669024542593104c8e0)
@@ -18,6 +18,8 @@
 #include <string>
 
+#include "Descriptors/MoleculeIdDescriptor.hpp"
 #include "Formula.hpp"
 #include "molecule.hpp"
+#include "World.hpp"
 
 class QtMoleculeItemFactory;
@@ -32,7 +34,7 @@
 
   QtMoleculeItem_formula(
-      const molecule * const _mol,
+      const moleculeId_t _molid,
       emitDirtyState_t _emitDirtyState) :
-        QtMoleculeItem(_mol, channellist_formula, QtMoleculeItem::NeedsMove, _emitDirtyState)
+        QtMoleculeItem(_molid, channellist_formula, QtMoleculeItem::NeedsMove, _emitDirtyState)
   {
     // cannot call pure virtual function in QtMoleculeItem's cstor
@@ -45,5 +47,9 @@
   void internal_updateState()
   {
-    setText(QString(mol->getFormula().toString().c_str()));
+    const molecule * mol = World::getInstance().getMolecule(MoleculeById(molid));
+    if (mol != NULL)
+      setText(QString(mol->getFormula().toString().c_str()));
+    else
+      setText(QString(""));
   }
 
Index: src/UIElements/Views/Qt4/MoleculeList/SpecificItems/QtMoleculeItem_name.hpp
===================================================================
--- src/UIElements/Views/Qt4/MoleculeList/SpecificItems/QtMoleculeItem_name.hpp	(revision 704d59ccf5f2559ab48b197552d1bea827b92ad2)
+++ src/UIElements/Views/Qt4/MoleculeList/SpecificItems/QtMoleculeItem_name.hpp	(revision 69b434b1d1a5180a87c3d669024542593104c8e0)
@@ -16,5 +16,7 @@
 #include "UIElements/Views/Qt4/MoleculeList/QtMoleculeItem.hpp"
 
+#include "Descriptors/MoleculeIdDescriptor.hpp"
 #include "molecule.hpp"
+#include "World.hpp"
 
 class QtMoleculeItemFactory;
@@ -29,7 +31,7 @@
 
   QtMoleculeItem_name(
-      const molecule * const _mol,
+      const moleculeId_t _molid,
       emitDirtyState_t _emitDirtyState) :
-        QtMoleculeItem(_mol, channellist_name, QtMoleculeItem::DoesNotMove, _emitDirtyState)
+        QtMoleculeItem(_molid, channellist_name, QtMoleculeItem::DoesNotMove, _emitDirtyState)
   {
     // cannot call pure virtual function in QtMoleculeItem's cstor
@@ -42,5 +44,9 @@
   void internal_updateState()
   {
-    setText(QString(mol->getName().c_str()));
+    const molecule * mol = World::getInstance().getMolecule(MoleculeById(molid));
+    if (mol != NULL)
+      setText(QString(mol->getName().c_str()));
+    else
+      setText(QString("to be removed"));
   }
 
Index: src/UIElements/Views/Qt4/MoleculeList/SpecificItems/QtMoleculeItem_occurrence.hpp
===================================================================
--- src/UIElements/Views/Qt4/MoleculeList/SpecificItems/QtMoleculeItem_occurrence.hpp	(revision 704d59ccf5f2559ab48b197552d1bea827b92ad2)
+++ src/UIElements/Views/Qt4/MoleculeList/SpecificItems/QtMoleculeItem_occurrence.hpp	(revision 69b434b1d1a5180a87c3d669024542593104c8e0)
@@ -27,7 +27,7 @@
 
   QtMoleculeItem_occurrence(
-      const molecule * const _mol,
+      const moleculeId_t _molid,
       emitDirtyState_t _emitDirtyState) :
-        QtMoleculeItem(_mol, channellist_occurrence, QtMoleculeItem::DoesNotMove, _emitDirtyState)
+        QtMoleculeItem(_molid, channellist_occurrence, QtMoleculeItem::DoesNotMove, _emitDirtyState)
   {
     // cannot call pure virtual function in QtMoleculeItem's cstor
Index: src/UIElements/Views/Qt4/MoleculeList/SpecificItems/QtMoleculeItem_visibility.hpp
===================================================================
--- src/UIElements/Views/Qt4/MoleculeList/SpecificItems/QtMoleculeItem_visibility.hpp	(revision 704d59ccf5f2559ab48b197552d1bea827b92ad2)
+++ src/UIElements/Views/Qt4/MoleculeList/SpecificItems/QtMoleculeItem_visibility.hpp	(revision 69b434b1d1a5180a87c3d669024542593104c8e0)
@@ -27,7 +27,7 @@
 
   QtMoleculeItem_visibility(
-      const molecule * const _mol,
+      const moleculeId_t _molid,
       emitDirtyState_t _emitDirtyState) :
-        QtMoleculeItem(_mol, channellist_visibility, QtMoleculeItem::DoesNotMove, _emitDirtyState)
+        QtMoleculeItem(_molid, channellist_visibility, QtMoleculeItem::DoesNotMove, _emitDirtyState)
   {
     setFlags(flags() | Qt::ItemIsUserCheckable);
