Index: src/RandomNumbers/RandomNumberDistributionFactory.cpp
===================================================================
--- src/RandomNumbers/RandomNumberDistributionFactory.cpp	(revision 076a7747f6149944af692526338b96c2659d9e53)
+++ src/RandomNumbers/RandomNumberDistributionFactory.cpp	(revision 9b3476e89c8176ecacfb1a4825157fcc620108b1)
@@ -45,13 +45,20 @@
 #include "RandomNumberDistributionFactory.hpp"
 
-// has to be included BEFORE Factory_impl.hpp!
+// has to be included BEFORE PrototypeFactory_impl.hpp!
 #include "RandomNumberDistributionFactory.def"
-#include "CodePatterns/Factory_impl.hpp"
+#include "CodePatterns/PrototypeFactory_impl.hpp"
 
-RandomNumberDistributionFactory::RandomNumberDistributionFactory() {}
-RandomNumberDistributionFactory::~RandomNumberDistributionFactory() {}
+RandomNumberDistributionFactory::RandomNumberDistributionFactory()
+{
+  FillPrototypeTable();
+}
+
+RandomNumberDistributionFactory::~RandomNumberDistributionFactory()
+{
+  EmptyPrototypeTable();
+}
 
 CONSTRUCT_SINGLETON(RandomNumberDistributionFactory)
-CONSTRUCT_FACTORY(RandomNumberDistribution)
+CONSTRUCT_PROTOTYPEFACTORY(RandomNumberDistribution)
 
 #include "RandomNumberDistributionFactory.undef"
Index: src/RandomNumbers/RandomNumberDistributionFactory.def
===================================================================
--- src/RandomNumbers/RandomNumberDistributionFactory.def	(revision 076a7747f6149944af692526338b96c2659d9e53)
+++ src/RandomNumbers/RandomNumberDistributionFactory.def	(revision 9b3476e89c8176ecacfb1a4825157fcc620108b1)
@@ -25,4 +25,5 @@
 */
 
+#define FactoryNAME RandomNumberDistributionFactory
 #define Abstract_Interface_Class RandomNumberDistribution
 #define Abstract_Encapsulation_Class RandomNumberDistribution_Encapsulation
Index: src/RandomNumbers/RandomNumberDistributionFactory.hpp
===================================================================
--- src/RandomNumbers/RandomNumberDistributionFactory.hpp	(revision 076a7747f6149944af692526338b96c2659d9e53)
+++ src/RandomNumbers/RandomNumberDistributionFactory.hpp	(revision 9b3476e89c8176ecacfb1a4825157fcc620108b1)
@@ -16,15 +16,15 @@
 #include "CodePatterns/Singleton.hpp"
 
-// this defines stuff necessary PREVIOUS of Factory.hpp inclusion
+// this defines stuff necessary PREVIOUS of PrototypeFactory.hpp inclusion
 #include "RandomNumberDistributionFactory.def"
 #include "CodePatterns/FactoryTypeList.hpp"
-#include "CodePatterns/Factory.hpp"
+#include "RandomNumberDistributionFactory.undef"
+
+#include "CodePatterns/PrototypeFactory.hpp"
 
 #include <map>
 
-#include "unittests/RandomNumberDistributionFactoryUnitTest.hpp"
-
-
 class RandomNumberDistribution;
+class RandomNumberDistributionFactoryUnitTest;
 
 /** This is the abstract factory class for random number distributions.
@@ -39,5 +39,5 @@
 class RandomNumberDistributionFactory :
   public Singleton<RandomNumberDistributionFactory>,
-  public Factory<RandomNumberDistribution>
+  public PrototypeFactory<RandomNumberDistribution>
 {
   friend class Singleton<RandomNumberDistributionFactory>;
@@ -45,4 +45,7 @@
 
 protected:
+  void FillPrototypeTable();
+  void EmptyPrototypeTable();
+
   RandomNumberDistributionFactory();
   virtual ~RandomNumberDistributionFactory();
@@ -50,5 +53,3 @@
 };
 
-#include "RandomNumberDistributionFactory.undef"
-
 #endif /* RANDOMNUMBERDISTRIBUTIONFACTORY_HPP_ */
Index: src/RandomNumbers/RandomNumberDistributionFactory.undef
===================================================================
--- src/RandomNumbers/RandomNumberDistributionFactory.undef	(revision 076a7747f6149944af692526338b96c2659d9e53)
+++ src/RandomNumbers/RandomNumberDistributionFactory.undef	(revision 9b3476e89c8176ecacfb1a4825157fcc620108b1)
@@ -3,4 +3,5 @@
 #undef type_seq
 #undef type_seq_size
+#undef FactoryNAME
 #undef Abstract_Interface_Class
 #undef Abstract_Encapsulation_Class
Index: src/RandomNumbers/RandomNumberDistribution_Encapsulation.hpp
===================================================================
--- src/RandomNumbers/RandomNumberDistribution_Encapsulation.hpp	(revision 076a7747f6149944af692526338b96c2659d9e53)
+++ src/RandomNumbers/RandomNumberDistribution_Encapsulation.hpp	(revision 9b3476e89c8176ecacfb1a4825157fcc620108b1)
@@ -35,6 +35,8 @@
 #include <boost/random/uniform_smallint.hpp>
 
-#include "CodePatterns/Creator.hpp"
+#include "CodePatterns/Clone.hpp"
 #include "RandomNumberDistribution.hpp"
+
+class RandomNumberDistributionFactory;
 
 /** Template class that encapsulates the random number distributions from
@@ -48,9 +50,12 @@
 class RandomNumberDistribution_Encapsulation :
   public RandomNumberDistribution,
-  public Creator<
-    RandomNumberDistribution,
-    RandomNumberDistribution_Encapsulation<distribution>
-  >
+  public Clone<RandomNumberDistribution>
 {
+    /**
+     * Factory is friend such that it can access private cstor when filling its
+     * table
+     */
+    friend class RandomNumberDistributionFactory;
+
 public:
 
@@ -70,4 +75,17 @@
   }
 
+  /** Clones the current instance.
+   *
+   * Implementation of Clone pattern.
+   *
+   * @return interface reference to cloned instance
+   */
+  RandomNumberDistribution* clone() const {
+    RandomNumberDistribution* MyClone = NULL;
+    MyClone = new RandomNumberDistribution_Encapsulation<distribution>();
+    return MyClone;
+  }
+
+protected:
   /** Constructor that instantiates a specific random number generator and
    * distribution.
Index: src/RandomNumbers/RandomNumberEngine.hpp
===================================================================
--- src/RandomNumbers/RandomNumberEngine.hpp	(revision 076a7747f6149944af692526338b96c2659d9e53)
+++ src/RandomNumbers/RandomNumberEngine.hpp	(revision 9b3476e89c8176ecacfb1a4825157fcc620108b1)
@@ -30,4 +30,10 @@
   virtual void seed(unsigned int _seed)=0;
 
+  /** Getter for the generator's seed.
+   *
+   * @return _seed seed to set to
+   */
+  virtual unsigned int getseed() const = 0;
+
   /** Getter for the type name of the internal engine.
    *
Index: src/RandomNumbers/RandomNumberEngineFactory.cpp
===================================================================
--- src/RandomNumbers/RandomNumberEngineFactory.cpp	(revision 076a7747f6149944af692526338b96c2659d9e53)
+++ src/RandomNumbers/RandomNumberEngineFactory.cpp	(revision 9b3476e89c8176ecacfb1a4825157fcc620108b1)
@@ -43,13 +43,20 @@
 #include "RandomNumberEngineFactory.hpp"
 
-// has to be included BEFORE Factory_impl.hpp!
+// has to be included BEFORE PrototypeFactory_impl.hpp!
 #include "RandomNumberEngineFactory.def"
-#include "CodePatterns/Factory_impl.hpp"
+#include "CodePatterns/PrototypeFactory_impl.hpp"
 
-RandomNumberEngineFactory::RandomNumberEngineFactory() {}
-RandomNumberEngineFactory::~RandomNumberEngineFactory() {}
+RandomNumberEngineFactory::RandomNumberEngineFactory()
+{
+  FillPrototypeTable();
+}
+
+RandomNumberEngineFactory::~RandomNumberEngineFactory()
+{
+  EmptyPrototypeTable();
+}
 
 CONSTRUCT_SINGLETON(RandomNumberEngineFactory)
-CONSTRUCT_FACTORY(RandomNumberEngine)
+CONSTRUCT_PROTOTYPEFACTORY(RandomNumberEngine)
 
 #include "RandomNumberEngineFactory.undef"
Index: src/RandomNumbers/RandomNumberEngineFactory.def
===================================================================
--- src/RandomNumbers/RandomNumberEngineFactory.def	(revision 076a7747f6149944af692526338b96c2659d9e53)
+++ src/RandomNumbers/RandomNumberEngineFactory.def	(revision 9b3476e89c8176ecacfb1a4825157fcc620108b1)
@@ -42,4 +42,5 @@
 #define type_seq engine_seq engine_seq_a
 
+#define FactoryNAME RandomNumberEngineFactory
 #define Abstract_Interface_Class RandomNumberEngine
 #define Abstract_Encapsulation_Class RandomNumberEngine_Encapsulation
Index: src/RandomNumbers/RandomNumberEngineFactory.hpp
===================================================================
--- src/RandomNumbers/RandomNumberEngineFactory.hpp	(revision 076a7747f6149944af692526338b96c2659d9e53)
+++ src/RandomNumbers/RandomNumberEngineFactory.hpp	(revision 9b3476e89c8176ecacfb1a4825157fcc620108b1)
@@ -16,17 +16,17 @@
 #include "CodePatterns/Singleton.hpp"
 
-// this defines stuff necessary PREVIOUS of Factory.hpp inclusion
+// this defines stuff necessary PREVIOUS of PrototypeFactory.hpp inclusion
 #include "RandomNumberEngineFactory.def"
 #include "CodePatterns/FactoryTypeList.hpp"
-#include "CodePatterns/Factory.hpp"
+#include "RandomNumberEngineFactory.undef"
+
+#include "CodePatterns/PrototypeFactory.hpp"
 
 #include <map>
 
-#include "unittests/RandomNumberEngineFactoryUnitTest.hpp"
+class RandomNumberEngine;
+class RandomNumberEngineFactoryUnitTest;
 
-
-class RandomNumberEngine;
-
-/** This is the abstract factory class for random number engines.
+/** This is the Prototype factory class for random number engines.
  *
  * The reason for creating the engines as this is that we would like to set
@@ -39,5 +39,5 @@
 class RandomNumberEngineFactory :
   public Singleton<RandomNumberEngineFactory>,
-  public Factory<RandomNumberEngine>
+  public PrototypeFactory<RandomNumberEngine>
 {
   friend class Singleton<RandomNumberEngineFactory>;
@@ -45,4 +45,7 @@
 
 protected:
+  void FillPrototypeTable();
+  void EmptyPrototypeTable();
+
   RandomNumberEngineFactory();
   virtual ~RandomNumberEngineFactory();
@@ -50,5 +53,3 @@
 };
 
-#include "RandomNumberEngineFactory.undef"
-
 #endif /* RANDOMNUMBERENGINEFACTORY_HPP_ */
Index: src/RandomNumbers/RandomNumberEngineFactory.undef
===================================================================
--- src/RandomNumbers/RandomNumberEngineFactory.undef	(revision 076a7747f6149944af692526338b96c2659d9e53)
+++ src/RandomNumbers/RandomNumberEngineFactory.undef	(revision 9b3476e89c8176ecacfb1a4825157fcc620108b1)
@@ -3,4 +3,5 @@
 #undef type_seq
 #undef type_seq_size
+#undef FactoryNAME
 #undef Abstract_Interface_Class
 #undef Abstract_Encapsulation_Class
Index: src/RandomNumbers/RandomNumberEngine_Encapsulation.hpp
===================================================================
--- src/RandomNumbers/RandomNumberEngine_Encapsulation.hpp	(revision 076a7747f6149944af692526338b96c2659d9e53)
+++ src/RandomNumbers/RandomNumberEngine_Encapsulation.hpp	(revision 9b3476e89c8176ecacfb1a4825157fcc620108b1)
@@ -31,6 +31,8 @@
 #include <boost/random/xor_combine.hpp>
 
-#include "CodePatterns/Creator.hpp"
+#include "CodePatterns/Clone.hpp"
 #include "RandomNumberEngine.hpp"
+
+class RandomNumberEngineFactory;
 
 /** Template class that encapsulates the random number engines from
@@ -44,9 +46,12 @@
 class RandomNumberEngine_Encapsulation :
   public RandomNumberEngine,
-  public Creator<
-    RandomNumberEngine,
-    RandomNumberEngine_Encapsulation<engine>
-  >
+  public Clone<RandomNumberEngine>
 {
+    /**
+     * Factory is friend such that it can access private cstor when filling its
+     * table
+     */
+    friend class RandomNumberEngineFactory;
+
 public:
   /** Set the engine's seed.
@@ -55,5 +60,14 @@
    */
   void seed(unsigned int _seed) {
-    engine_type.seed(_seed);
+    value_seed = _seed;
+    engine_type.seed(value_seed);
+  }
+
+  /** Getter for the engine's seed.
+   *
+   * @return seed
+   */
+  unsigned int getseed() const {
+    return value_seed;
   }
 
@@ -73,9 +87,24 @@
   }
 
+  /** Clones the current instance.
+   *
+   * Implementation of Clone pattern.
+   *
+   * @return interface reference to cloned instance
+   */
+  RandomNumberEngine* clone() const {
+    RandomNumberEngine* MyClone = NULL;
+    MyClone = new RandomNumberEngine_Encapsulation<engine>();
+    MyClone->seed(getseed());
+    return MyClone;
+  }
+
+protected:
   /** Constructor that instantiates a specific random number generator and
    * distribution.
    * @param _engine_type instance of the desired engine
    */
-  RandomNumberEngine_Encapsulation()
+  RandomNumberEngine_Encapsulation() :
+    value_seed(1)
   {}
 
@@ -86,4 +115,5 @@
 private:
   engine engine_type;
+  unsigned int value_seed;
 };
 
Index: src/RandomNumbers/RandomNumberGeneratorFactory.hpp
===================================================================
--- src/RandomNumbers/RandomNumberGeneratorFactory.hpp	(revision 076a7747f6149944af692526338b96c2659d9e53)
+++ src/RandomNumbers/RandomNumberGeneratorFactory.hpp	(revision 9b3476e89c8176ecacfb1a4825157fcc620108b1)
@@ -40,6 +40,4 @@
   friend class Singleton<RandomNumberGeneratorFactory>;
   friend class RandomNumberGeneratorFactoryTest;
-
-public:
 
 protected:
Index: src/RandomNumbers/unittests/RandomNumberDistributionFactoryUnitTest.cpp
===================================================================
--- src/RandomNumbers/unittests/RandomNumberDistributionFactoryUnitTest.cpp	(revision 076a7747f6149944af692526338b96c2659d9e53)
+++ src/RandomNumbers/unittests/RandomNumberDistributionFactoryUnitTest.cpp	(revision 9b3476e89c8176ecacfb1a4825157fcc620108b1)
@@ -21,4 +21,6 @@
 
 #include "RandomNumberDistributionFactoryUnitTest.hpp"
+
+#include "RandomNumbers/RandomNumberDistribution.hpp"
 #include "RandomNumbers/RandomNumberDistribution_Encapsulation.hpp"
 #include "RandomNumbers/RandomNumberDistributionFactory.hpp"
@@ -68,4 +70,7 @@
 void RandomNumberDistributionFactoryTest::setUp()
 {
+  rndA = NULL;
+  rndA_1 = NULL;
+  rndA_2 = NULL;
   RandomNumberDistributionFactory::getInstance();
 }
@@ -73,4 +78,7 @@
 void RandomNumberDistributionFactoryTest::tearDown()
 {
+  delete rndA;
+  delete rndA_1;
+  delete rndA_2;
   RandomNumberDistributionFactory::purgeInstance();
 }
@@ -94,11 +102,10 @@
 
   // check one of the distributions in the table
-  RandomNumberDistribution * rnd =
-      RandomNumberDistributionFactory::getInstance().
-      PrototypeTable[RandomNumberDistributionFactory::uniform_smallint]->create();
+  rndA = RandomNumberDistributionFactory::getInstance().
+      PrototypeTable[RandomNumberDistributionFactory::uniform_smallint]->clone();
   CPPUNIT_ASSERT_EQUAL(
       std::string(typeid(boost::uniform_smallint<> ).name()),
-      rnd->name()
+      rndA->name()
   );
-  delete rnd;
 }
+
Index: src/RandomNumbers/unittests/RandomNumberDistributionFactoryUnitTest.hpp
===================================================================
--- src/RandomNumbers/unittests/RandomNumberDistributionFactoryUnitTest.hpp	(revision 076a7747f6149944af692526338b96c2659d9e53)
+++ src/RandomNumbers/unittests/RandomNumberDistributionFactoryUnitTest.hpp	(revision 9b3476e89c8176ecacfb1a4825157fcc620108b1)
@@ -17,4 +17,6 @@
 #include <cppunit/extensions/HelperMacros.h>
 
+class RandomNumberDistribution;
+
 class RandomNumberDistributionFactoryTest : public CppUnit::TestFixture
 {
@@ -30,4 +32,7 @@
 
 private:
+  RandomNumberDistribution * rndA;
+  RandomNumberDistribution * rndA_1;
+  RandomNumberDistribution * rndA_2;
 };
 
Index: src/RandomNumbers/unittests/RandomNumberEngineFactoryUnitTest.cpp
===================================================================
--- src/RandomNumbers/unittests/RandomNumberEngineFactoryUnitTest.cpp	(revision 076a7747f6149944af692526338b96c2659d9e53)
+++ src/RandomNumbers/unittests/RandomNumberEngineFactoryUnitTest.cpp	(revision 9b3476e89c8176ecacfb1a4825157fcc620108b1)
@@ -26,4 +26,5 @@
 #include "RandomNumberEngineFactoryUnitTest.hpp"
 
+#include "RandomNumbers/RandomNumberEngine.hpp"
 #include "RandomNumbers/RandomNumberEngine_Encapsulation.hpp"
 #include "RandomNumbers/RandomNumberEngineFactory.hpp"
@@ -73,4 +74,7 @@
 void RandomNumberEngineFactoryTest::setUp()
 {
+  rndA = NULL;
+  rndA_1 = NULL;
+  rndA_2 = NULL;
   RandomNumberEngineFactory::getInstance();
 }
@@ -78,4 +82,7 @@
 void RandomNumberEngineFactoryTest::tearDown()
 {
+  delete rndA;
+  delete rndA_1;
+  delete rndA_2;
   RandomNumberEngineFactory::purgeInstance();
 }
@@ -99,11 +106,10 @@
 
   // check one of the engines in the table
-  RandomNumberEngine* rng =
-      RandomNumberEngineFactory::getInstance().
-      PrototypeTable[RandomNumberEngineFactory::minstd_rand0]->create();
+  rndA = RandomNumberEngineFactory::getInstance().
+      PrototypeTable[RandomNumberEngineFactory::minstd_rand0]->clone();
   CPPUNIT_ASSERT_EQUAL(
       std::string(typeid(boost::minstd_rand0).name()),
-      rng->name()
+      rndA->name()
   );
-  delete rng;
 }
+
Index: src/RandomNumbers/unittests/RandomNumberEngineFactoryUnitTest.hpp
===================================================================
--- src/RandomNumbers/unittests/RandomNumberEngineFactoryUnitTest.hpp	(revision 076a7747f6149944af692526338b96c2659d9e53)
+++ src/RandomNumbers/unittests/RandomNumberEngineFactoryUnitTest.hpp	(revision 9b3476e89c8176ecacfb1a4825157fcc620108b1)
@@ -17,4 +17,6 @@
 #include <cppunit/extensions/HelperMacros.h>
 
+class RandomNumberEngine;
+
 class RandomNumberEngineFactoryTest : public CppUnit::TestFixture
 {
@@ -30,4 +32,7 @@
 
 private:
+  RandomNumberEngine *rndA;
+  RandomNumberEngine *rndA_1;
+  RandomNumberEngine *rndA_2;
 };
 
