Index: src/UIElements/Makefile.am
===================================================================
--- src/UIElements/Makefile.am	(revision 0070aa122a6cee1ec7c2dcbadb8a53a98d6eac6d)
+++ src/UIElements/Makefile.am	(revision 98c35cae2ab1845620fc345902fa7bd0a1ab5d53)
@@ -144,4 +144,5 @@
   UIElements/GlobalListOfParameterQueries.hpp \
   UIElements/MainWindow.hpp \
+  UIElements/Qt4/InstanceBoard/ObservedValue_types.hpp \
   UIElements/Views/Qt4/Qt3D/ObservedValue_UpdateAtoms.hpp \
   UIElements/Views/Qt4/Qt3D/ObservedValue_wCallback.hpp
Index: src/UIElements/Qt4/InstanceBoard/ObservedValue_types.hpp
===================================================================
--- src/UIElements/Qt4/InstanceBoard/ObservedValue_types.hpp	(revision 98c35cae2ab1845620fc345902fa7bd0a1ab5d53)
+++ src/UIElements/Qt4/InstanceBoard/ObservedValue_types.hpp	(revision 98c35cae2ab1845620fc345902fa7bd0a1ab5d53)
@@ -0,0 +1,28 @@
+/*
+ * ObservedValue_types.hpp
+ *
+ *  Created on: Oct 28, 2015
+ *      Author: heber
+ */
+
+
+#ifndef OBSERVEDVALUE_TYPES_HPP_
+#define OBSERVEDVALUE_TYPES_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <vector>
+
+#include <boost/any.hpp>
+
+/** typedef for a vector of ObservedValue's (each is due to templating its
+ * own type. Therefore, we need to use boost::any).
+ */
+typedef std::vector<boost::any> ObservedValues_t;
+
+
+
+#endif /* OBSERVEDVALUE_TYPES_HPP_ */
Index: src/UIElements/Qt4/InstanceBoard/QtObservedAtom.cpp
===================================================================
--- src/UIElements/Qt4/InstanceBoard/QtObservedAtom.cpp	(revision 0070aa122a6cee1ec7c2dcbadb8a53a98d6eac6d)
+++ src/UIElements/Qt4/InstanceBoard/QtObservedAtom.cpp	(revision 98c35cae2ab1845620fc345902fa7bd0a1ab5d53)
@@ -38,9 +38,21 @@
 #include "CodePatterns/MemDebug.hpp"
 
-QtObservedAtom::QtObservedAtom(QWidget * _parent) :
+QtObservedAtom::QtObservedAtom(
+    const ObservedValues_t &_obsvalues,
+    QWidget * _parent) :
   QWidget(_parent),
-  Observer("QtObservedAtom")
+  Observer("QtObservedAtom"),
+  obsvalues(_obsvalues)
 {}
 
 QtObservedAtom::~QtObservedAtom()
 {}
+
+void QtObservedAtom::update(Observable *publisher)
+{}
+
+void QtObservedAtom::subjectKilled(Observable *publisher)
+{}
+
+void QtObservedAtom::recieveNotification(Observable *publisher, Notification_ptr notification)
+{}
Index: src/UIElements/Qt4/InstanceBoard/QtObservedAtom.hpp
===================================================================
--- src/UIElements/Qt4/InstanceBoard/QtObservedAtom.hpp	(revision 0070aa122a6cee1ec7c2dcbadb8a53a98d6eac6d)
+++ src/UIElements/Qt4/InstanceBoard/QtObservedAtom.hpp	(revision 98c35cae2ab1845620fc345902fa7bd0a1ab5d53)
@@ -17,12 +17,13 @@
 #include <QtGui/QWidget>
 
-#include <vector>
 
-#include <boost/any.hpp>
+#include <boost/shared_ptr.hpp>
 
 #include "CodePatterns/Observer/Observer.hpp"
-#include "CodePatterns/ObservedValue.hpp"
 
+#include "UIElements/Qt4/InstanceBoard/ObservedValue_types.hpp"
 #include "types.hpp"
+
+class QtObservedInstanceBoard;
 
 /** This instance is the ObservedValue representation of a World's atom.
@@ -40,9 +41,20 @@
   Q_OBJECT
 
+  //!> QtObservedInstanceBoard needs to access private cstor and dstor
+  friend class QtObservedInstanceBoard;
+
+  //!> typedef for instance wrapped in shared ptr
+  typedef boost::shared_ptr<QtObservedAtom> ptr;
+
   /** Cstor of QtObservedAtom.
    *
+   * \param _obsvalues ref to set of observed values for this instance
    * \param _parent Qt parent to automatically destroy when parent is destroyed
    */
-  QtObservedAtom(QWidget * _parent=0);
+  QtObservedAtom(
+      const ObservedValues_t &_obsvalues,
+      QWidget * _parent=0);
+
+public:
 
   /** Dstor of QtObservedAtom.
@@ -50,4 +62,9 @@
    */
   ~QtObservedAtom();
+
+  // Observer functions
+  void update(Observable *publisher);
+  void subjectKilled(Observable *publisher);
+  void recieveNotification(Observable *publisher, Notification_ptr notification);
 
 signals:
@@ -57,5 +74,6 @@
 
 private:
-
+  //!> internal reference to ObservedValues held by QtObservedInstanceBoard
+  const ObservedValues_t &obsvalues;
 };
 
Index: src/UIElements/Qt4/InstanceBoard/QtObservedInstanceBoard.cpp
===================================================================
--- src/UIElements/Qt4/InstanceBoard/QtObservedInstanceBoard.cpp	(revision 0070aa122a6cee1ec7c2dcbadb8a53a98d6eac6d)
+++ src/UIElements/Qt4/InstanceBoard/QtObservedInstanceBoard.cpp	(revision 98c35cae2ab1845620fc345902fa7bd0a1ab5d53)
@@ -142,5 +142,5 @@
 #endif
               moleculeObservedValues.insert(
-                  std::make_pair( _id, ObservedValues));
+                  std::make_pair( _id, std::make_pair(ObservedValues,0) ));
           ASSERT( inserter.second,
               "QtObservedInstanceBoard::recieveNotification() - could not insert ObservedValues for"
@@ -190,5 +190,5 @@
 #endif
               atomObservedValues.insert(
-                  std::make_pair( _id, ObservedValues));
+                  std::make_pair( _id, std::make_pair(ObservedValues,0) ));
           ASSERT( inserter.second,
               "QtObservedInstanceBoard::recieveNotification() - could not insert ObservedValues for"
@@ -259,5 +259,5 @@
           // change id here only if still present
           if (iter != moleculeObservedValues.end()) {
-            ObservedValues_t obsvalues = iter->second;
+            RefCountedObservedValues_t obsvalues = iter->second;
             moleculeObservedValues.erase(iter);
             ASSERT( moleculeObservedValues.find(newmoleculeId) == moleculeObservedValues.end(),
@@ -290,5 +290,5 @@
           // change id here only if still present
           if (iter != atomObservedValues.end()) {
-            ObservedValues_t obsvalues = iter->second;
+            RefCountedObservedValues_t obsvalues = iter->second;
             atomObservedValues.erase(iter);
             ASSERT( atomObservedValues.find(newatomId) == atomObservedValues.end(),
@@ -326,4 +326,7 @@
 
   if (iter->second > GLMoleculeObject_atom::MAX_ObservedTypes) {
+    ASSERT( atomObservedValues[_atomid].second == 0,
+        "QtObservedInstanceBoard::atomcountsubjectKilled() - observed Values for atom "
+        +toString(_atomid)+" are still being held somewhere.");
     if (_atomid == lastremovedatomsmolecule.second)
       emit atomRemoved(lastremovedatomsmolecule.first, lastremovedatomsmolecule.second);
@@ -347,4 +350,7 @@
 
   if (iter->second > GLMoleculeObject_molecule::MAX_ObservedTypes) {
+    ASSERT( moleculeObservedValues[_molid].second == 0,
+        "QtObservedInstanceBoard::moleculecountsubjectKilled() - observed Values for molecule "
+        +toString(_molid)+" are still being held somewhere.");
     // then free the instance
     emit moleculeRemoved(_molid);
@@ -353,5 +359,5 @@
 }
 
-QtObservedInstanceBoard::ObservedValues_t
+ObservedValues_t
 QtObservedInstanceBoard::getAtomObservedValues(const atomId_t _id)
 {
@@ -362,5 +368,5 @@
       +toString(_id));
   if (iter->first == _id) {
-    returnvalues = iter->second;
+    returnvalues = iter->second.first;
     atomObservedValues.erase(iter);
   }
@@ -368,5 +374,5 @@
 }
 
-QtObservedInstanceBoard::ObservedValues_t
+ObservedValues_t
 QtObservedInstanceBoard::getMoleculeObservedValues(const moleculeId_t _id)
 {
@@ -377,5 +383,5 @@
       +toString(_id));
   if (iter->first == _id) {
-    returnvalues = iter->second;
+    returnvalues = iter->second.first;
     moleculeObservedValues.erase(iter);
   }
@@ -392,5 +398,5 @@
 #endif
         atomObservedValues.insert(
-            std::make_pair( _id, _observedvalues) );
+            std::make_pair( _id, std::make_pair(_observedvalues,0) ) );
     ASSERT( inserter.second,
         "QtObservedInstanceBoard::returnAtomObservedValues() - could not insert ObservedValues for"
@@ -409,5 +415,5 @@
 #endif
           moleculeObservedValues.insert(
-              std::make_pair( _id, _observedvalues) );
+              std::make_pair( _id, std::make_pair(_observedvalues,0) ) );
       ASSERT( inserter.second,
           "QtObservedInstanceBoard::returnMoleculeObservedValues() - could not insert ObservedValues for"
@@ -416,2 +422,63 @@
     lastremovedmolecule = (moleculeId_t)-1;
 }
+
+QtObservedAtom::ptr QtObservedInstanceBoard::getObservedAtom(const atomId_t _id)
+{
+  atomObservedValues_t::iterator iter = atomObservedValues.find(_id);
+  ASSERT( iter != atomObservedValues.end(),
+      "QtObservedInstanceBoard::getObservedAtom() - no observed values present for atom "
+      +toString(_id));
+  const ObservedValues_t &obsvalues = iter->second.first;
+  // increase refcount
+  ++(iter->second.second);
+  QtObservedAtom::ptr _atom(new QtObservedAtom(obsvalues));
+
+  return _atom;
+}
+
+QtObservedMolecule::ptr QtObservedInstanceBoard::getObservedMolecule(const moleculeId_t _id)
+{
+  moleculeObservedValues_t::iterator iter = moleculeObservedValues.find(_id);
+  ASSERT( iter != moleculeObservedValues.end(),
+      "QtObservedInstanceBoard::getObservedMolecule() - no observed values present for molecule "
+      +toString(_id));
+  const ObservedValues_t &obsvalues = iter->second.first;
+  // increase refcount
+  ++(iter->second.second);
+  QtObservedMolecule::ptr _molecule(new QtObservedMolecule(obsvalues));
+
+  return _molecule;
+}
+
+void QtObservedInstanceBoard::returnObservedAtom(const atomId_t _id)
+{
+  atomObservedValues_t::iterator iter = atomObservedValues.find(_id);
+  ASSERT( iter != atomObservedValues.end(),
+      "QtObservedInstanceBoard::returnObservedAtom() - no observed values present for atom "
+      +toString(_id));
+  ASSERT( iter->second.second != 0,
+      "QtObservedInstanceBoard::returnObservedAtom() - all ObservedAtoms for atom "
+      +toString(_id)+" have already been returned.");
+  // decrease refcount
+  --(iter->second.second);
+  if (iter->second.second == 0) {
+    // free instance
+  }
+}
+
+void QtObservedInstanceBoard::returnObservedMolecule(const moleculeId_t _id)
+{
+  moleculeObservedValues_t::iterator iter = moleculeObservedValues.find(_id);
+  ASSERT( iter != moleculeObservedValues.end(),
+      "QtObservedInstanceBoard::returnObservedMolecule() - no observed values present for molecule "
+      +toString(_id));
+  ASSERT( iter->second.second != 0,
+      "QtObservedInstanceBoard::returnObservedMolecule() - all ObservedMolecules for molecule "
+      +toString(_id)+" have already been returned.");
+  // decrease refcount
+  --(iter->second.second);
+  if (iter->second.second == 0) {
+    // free instance
+  }
+}
+
Index: src/UIElements/Qt4/InstanceBoard/QtObservedInstanceBoard.hpp
===================================================================
--- src/UIElements/Qt4/InstanceBoard/QtObservedInstanceBoard.hpp	(revision 0070aa122a6cee1ec7c2dcbadb8a53a98d6eac6d)
+++ src/UIElements/Qt4/InstanceBoard/QtObservedInstanceBoard.hpp	(revision 98c35cae2ab1845620fc345902fa7bd0a1ab5d53)
@@ -17,12 +17,13 @@
 #include <QtGui/QWidget>
 
+#include "UIElements/Qt4/InstanceBoard/QtObservedAtom.hpp"
+#include "UIElements/Qt4/InstanceBoard/QtObservedMolecule.hpp"
+
 #include <map>
-#include <vector>
-
-#include <boost/any.hpp>
+#include <boost/function.hpp>
 
 #include "CodePatterns/Observer/Observer.hpp"
-#include "CodePatterns/ObservedValue.hpp"
 
+#include "UIElements/Qt4/InstanceBoard/ObservedValue_types.hpp"
 #include "types.hpp"
 
@@ -62,9 +63,4 @@
 
 public:
-  /** typedef for a vector of ObservedValue's (each is due to templating its
-   * own type. Therefore, we need to use boost::any).
-   */
-  typedef std::vector<boost::any> ObservedValues_t;
-
   /** Cstor of QtObservedInstanceBoard.
    *
@@ -83,6 +79,12 @@
   void recieveNotification(Observable *publisher, Notification_ptr notification);
 
+  QtObservedAtom::ptr getObservedAtom(const atomId_t _id);
+  QtObservedMolecule::ptr getObservedMolecule(const moleculeId_t _id);
+
   ObservedValues_t getAtomObservedValues(const atomId_t _id);
   ObservedValues_t getMoleculeObservedValues(const moleculeId_t _id);
+
+  void returnObservedAtom(const atomId_t _id);
+  void returnObservedMolecule(const moleculeId_t _id);
 
   void returnAtomObservedValues(const atomId_t _id, ObservedValues_t &_observedvalues);
@@ -144,11 +146,13 @@
   moleculesubjectKilledCount_t moleculesubjectKilledCount;
 
+  typedef std::pair<ObservedValues_t, size_t> RefCountedObservedValues_t;
+
   //!> typedef for the map of id to each one's ObservedValues
-  typedef typename std::map<atomId_t, ObservedValues_t> atomObservedValues_t;
+  typedef typename std::map<atomId_t, RefCountedObservedValues_t> atomObservedValues_t;
   //!> map containing all ObservedValues for each atom, associated by id
   atomObservedValues_t atomObservedValues;
 
   //!> typedef for the map of id to each one's ObservedValues
-  typedef typename std::map<moleculeId_t, ObservedValues_t> moleculeObservedValues_t;
+  typedef typename std::map<moleculeId_t, RefCountedObservedValues_t> moleculeObservedValues_t;
   //!> map containing all ObservedValues for each molecule, associated by id
   moleculeObservedValues_t moleculeObservedValues;
Index: src/UIElements/Qt4/InstanceBoard/QtObservedMolecule.cpp
===================================================================
--- src/UIElements/Qt4/InstanceBoard/QtObservedMolecule.cpp	(revision 0070aa122a6cee1ec7c2dcbadb8a53a98d6eac6d)
+++ src/UIElements/Qt4/InstanceBoard/QtObservedMolecule.cpp	(revision 98c35cae2ab1845620fc345902fa7bd0a1ab5d53)
@@ -38,9 +38,21 @@
 #include "CodePatterns/MemDebug.hpp"
 
-QtObservedMolecule::QtObservedMolecule(QWidget * _parent) :
+QtObservedMolecule::QtObservedMolecule(
+    const ObservedValues_t &_obsvalues,
+    QWidget * _parent) :
   QWidget(_parent),
-  Observer("QtObservedMolecule")
+  Observer("QtObservedMolecule"),
+  obsvalues(_obsvalues)
 {}
 
 QtObservedMolecule::~QtObservedMolecule()
 {}
+
+void QtObservedMolecule::update(Observable *publisher)
+{}
+
+void QtObservedMolecule::subjectKilled(Observable *publisher)
+{}
+
+void QtObservedMolecule::recieveNotification(Observable *publisher, Notification_ptr notification)
+{}
Index: src/UIElements/Qt4/InstanceBoard/QtObservedMolecule.hpp
===================================================================
--- src/UIElements/Qt4/InstanceBoard/QtObservedMolecule.hpp	(revision 0070aa122a6cee1ec7c2dcbadb8a53a98d6eac6d)
+++ src/UIElements/Qt4/InstanceBoard/QtObservedMolecule.hpp	(revision 98c35cae2ab1845620fc345902fa7bd0a1ab5d53)
@@ -17,12 +17,12 @@
 #include <QtGui/QWidget>
 
-#include <vector>
-
-#include <boost/any.hpp>
+#include <boost/shared_ptr.hpp>
 
 #include "CodePatterns/Observer/Observer.hpp"
-#include "CodePatterns/ObservedValue.hpp"
 
+#include "UIElements/Qt4/InstanceBoard/ObservedValue_types.hpp"
 #include "types.hpp"
+
+class QtObservedInstanceBoard;
 
 /** This instance is the ObservedValue representation of a World's molecule.
@@ -40,9 +40,20 @@
   Q_OBJECT
 
+  //!> QtObservedInstanceBoard needs to access private cstor and dstor
+  friend class QtObservedInstanceBoard;
+
+  //!> typedef for instance wrapped in shared ptr
+  typedef boost::shared_ptr<QtObservedMolecule> ptr;
+
   /** Cstor of QtObservedMolecule.
    *
+   * \param _obsvalues ref to set of observed values for this instance
    * \param _parent Qt parent to automatically destroy when parent is destroyed
    */
-  QtObservedMolecule(QWidget * _parent=0);
+  QtObservedMolecule(
+      const ObservedValues_t &_obsvalues,
+      QWidget * _parent=0);
+
+public:
 
   /** Dstor of QtObservedMolecule.
@@ -50,4 +61,9 @@
    */
   ~QtObservedMolecule();
+
+  // Observer functions
+  void update(Observable *publisher);
+  void subjectKilled(Observable *publisher);
+  void recieveNotification(Observable *publisher, Notification_ptr notification);
 
 signals:
@@ -57,5 +73,6 @@
 
 private:
-
+  //!> internal reference to ObservedValues held by QtObservedInstanceBoard
+  const ObservedValues_t &obsvalues;
 };
 
