[Avida-cvs] [Avida2-svn] r355 - in branches/brysonda: Avida2.xcodeproj source source/bindings/Boost.Python source/cpu source/event source/main source/testsuites/unit_testsuites

brysonda@myxo.css.msu.edu brysonda at myxo.css.msu.edu
Wed Oct 19 22:00:31 PDT 2005


Author: brysonda
Date: 2005-10-20 00:37:15 -0400 (Thu, 20 Oct 2005)
New Revision: 355

Added:
   branches/brysonda/source/cpu/cHardwareManager.cc
   branches/brysonda/source/cpu/cHardwareManager.h
   branches/brysonda/source/event/cEventManager.cc
   branches/brysonda/source/event/cEventManager.h
Removed:
   branches/brysonda/source/cpu/cHardwareFactory.cc
   branches/brysonda/source/cpu/cHardwareFactory.h
   branches/brysonda/source/cpu/cHardwareUtil.cc
   branches/brysonda/source/cpu/cHardwareUtil.h
   branches/brysonda/source/cpu/cpu.pri
   branches/brysonda/source/event/cEventFactoryManager.cc
   branches/brysonda/source/event/cEventFactoryManager.h
   branches/brysonda/source/event/cPopulationEvent.h
   branches/brysonda/source/event/cPopulationEventFactory.cc
   branches/brysonda/source/event/cPopulationEventFactory.h
   branches/brysonda/source/event/event.pri
   branches/brysonda/source/main/cCallbackUtil.cc
   branches/brysonda/source/main/cCallbackUtil.h
   branches/brysonda/source/main/cConfig.cc
   branches/brysonda/source/main/cConfig.h
   branches/brysonda/source/main/main.pro
   branches/brysonda/source/main/main_sub.pri
   branches/brysonda/source/testsuites/unit_testsuites/config.t.cc
   branches/brysonda/source/testsuites/unit_testsuites/population_event.t.cc
   branches/brysonda/source/testsuites/unit_testsuites/population_event_factory.t.cc
Modified:
   branches/brysonda/Avida2.xcodeproj/project.pbxproj
   branches/brysonda/source/bindings/Boost.Python/hardware_cpu-fixups.hh
   branches/brysonda/source/bindings/Boost.Python/hardware_factory.pyste
   branches/brysonda/source/bindings/Boost.Python/population_interface-fixups.hh
   branches/brysonda/source/bindings/Boost.Python/population_interface.pyste
   branches/brysonda/source/bindings/Boost.Python/py_avida_driver-fixups.cc
   branches/brysonda/source/cpu/cHardware4Stack.cc
   branches/brysonda/source/cpu/cHardware4Stack.h
   branches/brysonda/source/cpu/cHardwareBase.cc
   branches/brysonda/source/cpu/cHardwareBase.h
   branches/brysonda/source/cpu/cHardwareCPU.cc
   branches/brysonda/source/cpu/cHardwareCPU.h
   branches/brysonda/source/cpu/cHardwareSMT.cc
   branches/brysonda/source/cpu/cHardwareSMT.h
   branches/brysonda/source/cpu/cHeadCPU.cc
   branches/brysonda/source/cpu/cHeadMultiMem.cc
   branches/brysonda/source/cpu/cInstLibCPU.h
   branches/brysonda/source/cpu/cTestCPU.cc
   branches/brysonda/source/cpu/cTestCPU.h
   branches/brysonda/source/defs.h
   branches/brysonda/source/event/CMakeLists.txt
   branches/brysonda/source/event/cEvent.h
   branches/brysonda/source/event/cEventList.cc
   branches/brysonda/source/event/cEventList.h
   branches/brysonda/source/main/CMakeLists.txt
   branches/brysonda/source/main/avida.cc
   branches/brysonda/source/main/avida.h
   branches/brysonda/source/main/cAnalyze.cc
   branches/brysonda/source/main/cAnalyzeUtil.cc
   branches/brysonda/source/main/cAnalyzeUtil.h
   branches/brysonda/source/main/cAvidaConfig.cc
   branches/brysonda/source/main/cAvidaConfig.h
   branches/brysonda/source/main/cAvidaDriver_Analyze.cc
   branches/brysonda/source/main/cAvidaDriver_Population.cc
   branches/brysonda/source/main/cAvidaDriver_Population.h
   branches/brysonda/source/main/cBirthChamber.cc
   branches/brysonda/source/main/cBirthChamber.h
   branches/brysonda/source/main/cEnvironment.cc
   branches/brysonda/source/main/cEnvironment.h
   branches/brysonda/source/main/cFitnessMatrix.cc
   branches/brysonda/source/main/cGenebank.cc
   branches/brysonda/source/main/cGenebank.h
   branches/brysonda/source/main/cGenotype.cc
   branches/brysonda/source/main/cGenotype.h
   branches/brysonda/source/main/cGenotypeControl.cc
   branches/brysonda/source/main/cGenotypeControl.h
   branches/brysonda/source/main/cInjectGenebank.cc
   branches/brysonda/source/main/cInjectGenebank.h
   branches/brysonda/source/main/cInjectGenotype.cc
   branches/brysonda/source/main/cInjectGenotype.h
   branches/brysonda/source/main/cInstSet.cc
   branches/brysonda/source/main/cInstSet.h
   branches/brysonda/source/main/cLineageControl.cc
   branches/brysonda/source/main/cLineageControl.h
   branches/brysonda/source/main/cMxCodeArray.cc
   branches/brysonda/source/main/cOrganism.cc
   branches/brysonda/source/main/cOrganism.h
   branches/brysonda/source/main/cPhenotype.cc
   branches/brysonda/source/main/cPhenotype.h
   branches/brysonda/source/main/cPopulation.cc
   branches/brysonda/source/main/cPopulation.h
   branches/brysonda/source/main/cPopulationCell.cc
   branches/brysonda/source/main/cPopulationInterface.cc
   branches/brysonda/source/main/cPopulationInterface.h
   branches/brysonda/source/main/cResource.cc
   branches/brysonda/source/main/cResourceCount.cc
   branches/brysonda/source/main/cSpatialResCount.cc
   branches/brysonda/source/main/cSpeciesControl.cc
   branches/brysonda/source/main/cSpeciesControl.h
   branches/brysonda/source/main/cStats.cc
   branches/brysonda/source/main/cStats.h
   branches/brysonda/source/main/cWorld.cc
   branches/brysonda/source/main/cWorld.h
   branches/brysonda/source/main/primitive.cc
   branches/brysonda/source/testsuites/unit_testsuites/event_factory_manager.t.cc
   branches/brysonda/source/testsuites/unit_testsuites/hardware_4stack.t.cc
   branches/brysonda/source/testsuites/unit_testsuites/hardware_cpu.t.cc
   branches/brysonda/source/testsuites/unit_testsuites/hardware_factory.t.cc
   branches/brysonda/source/testsuites/unit_testsuites/inst_set.t.cc
Log:
Major rework to pass around cWorld object.  Still global RNG, analyze mode disabled, none of the viewers will work, but primitive does

Modified: branches/brysonda/Avida2.xcodeproj/project.pbxproj
===================================================================
--- branches/brysonda/Avida2.xcodeproj/project.pbxproj	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/Avida2.xcodeproj/project.pbxproj	2005-10-20 04:37:15 UTC (rev 355)
@@ -32,7 +32,6 @@
 		7013846409028B3E0087ED2E /* cAvidaConfig.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7013846009028B3E0087ED2E /* cAvidaConfig.cc */; };
 		7013852D0902E36B0087ED2E /* avida.cfg in CopyFiles */ = {isa = PBXBuildFile; fileRef = 7013852C0902E36B0087ED2E /* avida.cfg */; };
 		7013852E0902E36B0087ED2E /* avida.cfg in CopyFiles */ = {isa = PBXBuildFile; fileRef = 7013852C0902E36B0087ED2E /* avida.cfg */; };
-		702D4EFE08DA5341007BA469 /* cAvidaDriver_Analyze.cc in Sources */ = {isa = PBXBuildFile; fileRef = 702D4EF908DA5341007BA469 /* cAvidaDriver_Analyze.cc */; };
 		702D4EFF08DA5341007BA469 /* cAvidaDriver_Base.cc in Sources */ = {isa = PBXBuildFile; fileRef = 702D4EFA08DA5341007BA469 /* cAvidaDriver_Base.cc */; };
 		702D4F0008DA5341007BA469 /* cAvidaDriver_Population.cc in Sources */ = {isa = PBXBuildFile; fileRef = 702D4EFB08DA5341007BA469 /* cAvidaDriver_Population.cc */; };
 		702D4F0108DA5341007BA469 /* cEnvironment.cc in Sources */ = {isa = PBXBuildFile; fileRef = 702D4EFC08DA5341007BA469 /* cEnvironment.cc */; };
@@ -42,18 +41,15 @@
 		702D4F0508DA5341007BA469 /* cAvidaDriver_Population.cc in Sources */ = {isa = PBXBuildFile; fileRef = 702D4EFB08DA5341007BA469 /* cAvidaDriver_Population.cc */; };
 		702D4F0608DA5341007BA469 /* cEnvironment.cc in Sources */ = {isa = PBXBuildFile; fileRef = 702D4EFC08DA5341007BA469 /* cEnvironment.cc */; };
 		702D4F0708DA5341007BA469 /* cPopulationInterface.cc in Sources */ = {isa = PBXBuildFile; fileRef = 702D4EFD08DA5341007BA469 /* cPopulationInterface.cc */; };
-		702D4F4208DA61FE007BA469 /* cAnalyze.cc in Sources */ = {isa = PBXBuildFile; fileRef = 702D4F3C08DA61FE007BA469 /* cAnalyze.cc */; };
-		702D4F4308DA61FE007BA469 /* cAnalyzeGenotype.cc in Sources */ = {isa = PBXBuildFile; fileRef = 702D4F3D08DA61FE007BA469 /* cAnalyzeGenotype.cc */; };
-		702D4F4408DA61FE007BA469 /* cAnalyzeUtil.cc in Sources */ = {isa = PBXBuildFile; fileRef = 702D4F3E08DA61FE007BA469 /* cAnalyzeUtil.cc */; };
 		702D4F4508DA61FE007BA469 /* cBirthChamber.cc in Sources */ = {isa = PBXBuildFile; fileRef = 702D4F3F08DA61FE007BA469 /* cBirthChamber.cc */; };
-		702D4F4608DA61FE007BA469 /* cCallbackUtil.cc in Sources */ = {isa = PBXBuildFile; fileRef = 702D4F4008DA61FE007BA469 /* cCallbackUtil.cc */; };
-		702D4F4708DA61FE007BA469 /* cConfig.cc in Sources */ = {isa = PBXBuildFile; fileRef = 702D4F4108DA61FE007BA469 /* cConfig.cc */; };
 		702D4F4808DA61FE007BA469 /* cAnalyze.cc in Sources */ = {isa = PBXBuildFile; fileRef = 702D4F3C08DA61FE007BA469 /* cAnalyze.cc */; };
 		702D4F4908DA61FE007BA469 /* cAnalyzeGenotype.cc in Sources */ = {isa = PBXBuildFile; fileRef = 702D4F3D08DA61FE007BA469 /* cAnalyzeGenotype.cc */; };
 		702D4F4A08DA61FE007BA469 /* cAnalyzeUtil.cc in Sources */ = {isa = PBXBuildFile; fileRef = 702D4F3E08DA61FE007BA469 /* cAnalyzeUtil.cc */; };
 		702D4F4B08DA61FE007BA469 /* cBirthChamber.cc in Sources */ = {isa = PBXBuildFile; fileRef = 702D4F3F08DA61FE007BA469 /* cBirthChamber.cc */; };
-		702D4F4C08DA61FE007BA469 /* cCallbackUtil.cc in Sources */ = {isa = PBXBuildFile; fileRef = 702D4F4008DA61FE007BA469 /* cCallbackUtil.cc */; };
-		702D4F4D08DA61FE007BA469 /* cConfig.cc in Sources */ = {isa = PBXBuildFile; fileRef = 702D4F4108DA61FE007BA469 /* cConfig.cc */; };
+		7040CF1C0906A52E00AA820F /* cEventManager.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7040CF1A0906A52E00AA820F /* cEventManager.cc */; };
+		7040CF1E0906A52E00AA820F /* cEventManager.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7040CF1A0906A52E00AA820F /* cEventManager.cc */; };
+		7040CF1F0906A52E00AA820F /* cEventManager.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 7040CF1B0906A52E00AA820F /* cEventManager.h */; };
+		7040D22509071EE000AA820F /* cAnalyzeUtil.cc in Sources */ = {isa = PBXBuildFile; fileRef = 702D4F3E08DA61FE007BA469 /* cAnalyzeUtil.cc */; };
 		70486BA00826722F009328F0 /* analyze.cfg in CopyFiles */ = {isa = PBXBuildFile; fileRef = DCC3114B0762539E008F7A48 /* analyze.cfg */; };
 		70486BA10826722F009328F0 /* environment.cfg in CopyFiles */ = {isa = PBXBuildFile; fileRef = DCC311800762539F008F7A48 /* environment.cfg */; };
 		70486BA20826722F009328F0 /* events.cfg in CopyFiles */ = {isa = PBXBuildFile; fileRef = DCC311810762539F008F7A48 /* events.cfg */; };
@@ -62,20 +58,6 @@
 		70486BA50826722F009328F0 /* inst_set.4stack in CopyFiles */ = {isa = PBXBuildFile; fileRef = DCC311840762539F008F7A48 /* inst_set.4stack */; };
 		70486BA60826722F009328F0 /* inst_set.default in CopyFiles */ = {isa = PBXBuildFile; fileRef = DCC311850762539F008F7A48 /* inst_set.default */; };
 		70486BA70826722F009328F0 /* organism.default in CopyFiles */ = {isa = PBXBuildFile; fileRef = DCC311890762539F008F7A48 /* organism.default */; };
-		70658C35085DE5D800486BED /* ansi.cc in Sources */ = {isa = PBXBuildFile; fileRef = DCC315F6076253A5008F7A48 /* ansi.cc */; };
-		70658C36085DE5D900486BED /* bar_screen.cc in Sources */ = {isa = PBXBuildFile; fileRef = DCC315F8076253A5008F7A48 /* bar_screen.cc */; };
-		70658C38085DE5DC00486BED /* environment_screen.cc in Sources */ = {isa = PBXBuildFile; fileRef = DCC315FB076253A5008F7A48 /* environment_screen.cc */; };
-		70658C39085DE5DD00486BED /* hist_screen.cc in Sources */ = {isa = PBXBuildFile; fileRef = DCC315FD076253A5008F7A48 /* hist_screen.cc */; };
-		70658C3A085DE5DF00486BED /* map_screen.cc in Sources */ = {isa = PBXBuildFile; fileRef = DCC31601076253A5008F7A48 /* map_screen.cc */; };
-		70658C3B085DE5E000486BED /* menu.cc in Sources */ = {isa = PBXBuildFile; fileRef = DCC31603076253A5008F7A48 /* menu.cc */; };
-		70658C3C085DE5E100486BED /* ncurses.cc in Sources */ = {isa = PBXBuildFile; fileRef = DCC31605076253A5008F7A48 /* ncurses.cc */; };
-		70658C3D085DE5E200486BED /* options_screen.cc in Sources */ = {isa = PBXBuildFile; fileRef = DCC31607076253A5008F7A48 /* options_screen.cc */; };
-		70658C3E085DE5E400486BED /* stats_screen.cc in Sources */ = {isa = PBXBuildFile; fileRef = DCC31609076253A5008F7A48 /* stats_screen.cc */; };
-		70658C3F085DE5E500486BED /* symbol_util.cc in Sources */ = {isa = PBXBuildFile; fileRef = DCC3160B076253A5008F7A48 /* symbol_util.cc */; };
-		70658C40085DE5E700486BED /* text_screen.cc in Sources */ = {isa = PBXBuildFile; fileRef = DCC3160D076253A5008F7A48 /* text_screen.cc */; };
-		70658C41085DE5E900486BED /* view.cc in Sources */ = {isa = PBXBuildFile; fileRef = DCC31610076253A5008F7A48 /* view.cc */; };
-		70658C42085DE5EA00486BED /* viewer.cc in Sources */ = {isa = PBXBuildFile; fileRef = DCC31612076253A5008F7A48 /* viewer.cc */; };
-		70658C43085DE5ED00486BED /* zoom_screen.cc in Sources */ = {isa = PBXBuildFile; fileRef = DCC31615076253A5008F7A48 /* zoom_screen.cc */; };
 		70658C44085DE5FF00486BED /* primitive.cc in Sources */ = {isa = PBXBuildFile; fileRef = DCC311090762539E008F7A48 /* primitive.cc */; };
 		70658C5A085DF67D00486BED /* libncurses.5.4.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 70658C59085DF67D00486BED /* libncurses.5.4.dylib */; };
 		706D32E90854A39800D7DC8F /* dummy in CopyFiles */ = {isa = PBXBuildFile; fileRef = DCC311950762539F008F7A48 /* dummy */; };
@@ -91,7 +73,6 @@
 		70B0865D08F4974300FC65FE /* cMutation.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70B0865508F4974300FC65FE /* cMutation.cc */; };
 		70B0865E08F4974300FC65FE /* cMutationLib.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70B0865608F4974300FC65FE /* cMutationLib.cc */; };
 		70B0865F08F4974300FC65FE /* cMutationRates.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70B0865708F4974300FC65FE /* cMutationRates.cc */; };
-		70B0866008F4974300FC65FE /* cMxCodeArray.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70B0865808F4974300FC65FE /* cMxCodeArray.cc */; };
 		70B0866108F4974300FC65FE /* cLandscape.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70B0865108F4974300FC65FE /* cLandscape.cc */; };
 		70B0866208F4974300FC65FE /* cLineage.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70B0865208F4974300FC65FE /* cLineage.cc */; };
 		70B0866308F4974300FC65FE /* cLineageControl.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70B0865308F4974300FC65FE /* cLineageControl.cc */; };
@@ -216,16 +197,13 @@
 		70C1EFA808C39F2100F50912 /* cHardwareBase.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1EFA308C39F2100F50912 /* cHardwareBase.cc */; };
 		70C1EFA908C39F2100F50912 /* cHardwareCPU_Thread.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1EFA408C39F2100F50912 /* cHardwareCPU_Thread.cc */; };
 		70C1EFAA08C39F2100F50912 /* cHardwareCPU.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1EFA508C39F2100F50912 /* cHardwareCPU.cc */; };
-		70C1EFAB08C39F2100F50912 /* cHardwareFactory.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1EFA608C39F2100F50912 /* cHardwareFactory.cc */; };
 		70C1EFAC08C39F2100F50912 /* cHardware4Stack_Thread.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1EFA208C39F2100F50912 /* cHardware4Stack_Thread.cc */; };
 		70C1EFAD08C39F2100F50912 /* cHardwareBase.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1EFA308C39F2100F50912 /* cHardwareBase.cc */; };
 		70C1EFAE08C39F2100F50912 /* cHardwareCPU_Thread.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1EFA408C39F2100F50912 /* cHardwareCPU_Thread.cc */; };
 		70C1EFAF08C39F2100F50912 /* cHardwareCPU.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1EFA508C39F2100F50912 /* cHardwareCPU.cc */; };
-		70C1EFB008C39F2100F50912 /* cHardwareFactory.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1EFA608C39F2100F50912 /* cHardwareFactory.cc */; };
 		70C1F02A08C3C71300F50912 /* cHardwareSMT_Thread.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1F02208C3C71300F50912 /* cHardwareSMT_Thread.cc */; };
 		70C1F02B08C3C71300F50912 /* cHardwareSMT.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1F02308C3C71300F50912 /* cHardwareSMT.cc */; };
 		70C1F02C08C3C71300F50912 /* cHardwareStatusPrinter.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1F02408C3C71300F50912 /* cHardwareStatusPrinter.cc */; };
-		70C1F02D08C3C71300F50912 /* cHardwareUtil.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1F02508C3C71300F50912 /* cHardwareUtil.cc */; };
 		70C1F02E08C3C71300F50912 /* cHeadCPU.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1F02608C3C71300F50912 /* cHeadCPU.cc */; };
 		70C1F02F08C3C71300F50912 /* cHeadMultiMem.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1F02708C3C71300F50912 /* cHeadMultiMem.cc */; };
 		70C1F03008C3C71300F50912 /* cTestCPU.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1F02808C3C71300F50912 /* cTestCPU.cc */; };
@@ -233,26 +211,23 @@
 		70C1F03208C3C71300F50912 /* cHardwareSMT_Thread.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1F02208C3C71300F50912 /* cHardwareSMT_Thread.cc */; };
 		70C1F03308C3C71300F50912 /* cHardwareSMT.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1F02308C3C71300F50912 /* cHardwareSMT.cc */; };
 		70C1F03408C3C71300F50912 /* cHardwareStatusPrinter.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1F02408C3C71300F50912 /* cHardwareStatusPrinter.cc */; };
-		70C1F03508C3C71300F50912 /* cHardwareUtil.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1F02508C3C71300F50912 /* cHardwareUtil.cc */; };
 		70C1F03608C3C71300F50912 /* cHeadCPU.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1F02608C3C71300F50912 /* cHeadCPU.cc */; };
 		70C1F03708C3C71300F50912 /* cHeadMultiMem.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1F02708C3C71300F50912 /* cHeadMultiMem.cc */; };
 		70C1F03808C3C71300F50912 /* cTestCPU.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1F02808C3C71300F50912 /* cTestCPU.cc */; };
 		70C1F03908C3C71300F50912 /* cTestUtil.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1F02908C3C71300F50912 /* cTestUtil.cc */; };
-		70C1F19308C6A11100F50912 /* cEventFactoryManager.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1F18E08C6A11100F50912 /* cEventFactoryManager.cc */; };
 		70C1F19408C6A11100F50912 /* cEventList.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1F18F08C6A11100F50912 /* cEventList.cc */; };
 		70C1F19508C6A11100F50912 /* cEventListIterator.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1F19008C6A11100F50912 /* cEventListIterator.cc */; };
 		70C1F19608C6A11100F50912 /* cEventTriggers.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1F19108C6A11100F50912 /* cEventTriggers.cc */; };
-		70C1F19708C6A11100F50912 /* cPopulationEventFactory.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1F19208C6A11100F50912 /* cPopulationEventFactory.cc */; };
-		70C1F19808C6A11100F50912 /* cEventFactoryManager.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1F18E08C6A11100F50912 /* cEventFactoryManager.cc */; };
 		70C1F19908C6A11100F50912 /* cEventList.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1F18F08C6A11100F50912 /* cEventList.cc */; };
 		70C1F19A08C6A11100F50912 /* cEventListIterator.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1F19008C6A11100F50912 /* cEventListIterator.cc */; };
 		70C1F19B08C6A11100F50912 /* cEventTriggers.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1F19108C6A11100F50912 /* cEventTriggers.cc */; };
-		70C1F19C08C6A11100F50912 /* cPopulationEventFactory.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C1F19208C6A11100F50912 /* cPopulationEventFactory.cc */; };
-		70C5BC6409059A970028A785 /* cWorld.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 70C5BC6209059A970028A785 /* cWorld.h */; };
 		70C5BC6509059A970028A785 /* cWorld.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C5BC6309059A970028A785 /* cWorld.cc */; };
 		70C5BC6609059A970028A785 /* cWorld.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 70C5BC6209059A970028A785 /* cWorld.h */; };
 		70C5BC6709059A970028A785 /* cWorld.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C5BC6309059A970028A785 /* cWorld.cc */; };
-		70CA6EC208DB7F8200068AC2 /* cFitnessMatrix.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70CA6EB208DB7F8200068AC2 /* cFitnessMatrix.cc */; };
+		70C5BD6B0905CE5F0028A785 /* cHardwareManager.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C5BD690905CE5F0028A785 /* cHardwareManager.cc */; };
+		70C5BD6C0905CE5F0028A785 /* cHardwareManager.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 70C5BD6A0905CE5F0028A785 /* cHardwareManager.h */; };
+		70C5BD6D0905CE5F0028A785 /* cHardwareManager.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70C5BD690905CE5F0028A785 /* cHardwareManager.cc */; };
+		70C5BD6E0905CE5F0028A785 /* cHardwareManager.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 70C5BD6A0905CE5F0028A785 /* cHardwareManager.h */; };
 		70CA6EC308DB7F8200068AC2 /* cGenebank.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70CA6EB308DB7F8200068AC2 /* cGenebank.cc */; };
 		70CA6EC408DB7F8200068AC2 /* cGenome.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70CA6EB408DB7F8200068AC2 /* cGenome.cc */; };
 		70CA6EC508DB7F8200068AC2 /* cGenomeUtil.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70CA6EB508DB7F8200068AC2 /* cGenomeUtil.cc */; };
@@ -343,6 +318,8 @@
 				7013846109028B3E0087ED2E /* cAvidaConfig.h in CopyFiles */,
 				7013852E0902E36B0087ED2E /* avida.cfg in CopyFiles */,
 				70C5BC6609059A970028A785 /* cWorld.h in CopyFiles */,
+				70C5BD6E0905CE5F0028A785 /* cHardwareManager.h in CopyFiles */,
+				7040CF1F0906A52E00AA820F /* cEventManager.h in CopyFiles */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -370,7 +347,7 @@
 				701384350900A45B0087ED2E /* organism.smtx in CopyFiles */,
 				7013846309028B3E0087ED2E /* cAvidaConfig.h in CopyFiles */,
 				7013852D0902E36B0087ED2E /* avida.cfg in CopyFiles */,
-				70C5BC6409059A970028A785 /* cWorld.h in CopyFiles */,
+				70C5BD6C0905CE5F0028A785 /* cHardwareManager.h in CopyFiles */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -405,22 +382,19 @@
 		702D4F3708DA61E2007BA469 /* cAnalyzeUtil.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cAnalyzeUtil.h; sourceTree = "<group>"; };
 		702D4F3808DA61E2007BA469 /* cAvidaTriggers.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cAvidaTriggers.h; sourceTree = "<group>"; };
 		702D4F3908DA61E2007BA469 /* cBirthChamber.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cBirthChamber.h; sourceTree = "<group>"; };
-		702D4F3A08DA61E2007BA469 /* cCallbackUtil.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cCallbackUtil.h; sourceTree = "<group>"; };
-		702D4F3B08DA61E2007BA469 /* cConfig.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cConfig.h; sourceTree = "<group>"; };
 		702D4F3C08DA61FE007BA469 /* cAnalyze.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cAnalyze.cc; sourceTree = "<group>"; };
 		702D4F3D08DA61FE007BA469 /* cAnalyzeGenotype.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cAnalyzeGenotype.cc; sourceTree = "<group>"; };
 		702D4F3E08DA61FE007BA469 /* cAnalyzeUtil.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cAnalyzeUtil.cc; sourceTree = "<group>"; };
 		702D4F3F08DA61FE007BA469 /* cBirthChamber.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cBirthChamber.cc; sourceTree = "<group>"; };
-		702D4F4008DA61FE007BA469 /* cCallbackUtil.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cCallbackUtil.cc; sourceTree = "<group>"; };
-		702D4F4108DA61FE007BA469 /* cConfig.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cConfig.cc; sourceTree = "<group>"; };
 		703F684207B437B800C1CA76 /* status.xml */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = status.xml; sourceTree = "<group>"; };
+		7040CF1A0906A52E00AA820F /* cEventManager.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cEventManager.cc; sourceTree = "<group>"; };
+		7040CF1B0906A52E00AA820F /* cEventManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cEventManager.h; sourceTree = "<group>"; };
 		70658C59085DF67D00486BED /* libncurses.5.4.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libncurses.5.4.dylib; path = /usr/lib/libncurses.5.4.dylib; sourceTree = "<absolute>"; };
 		706D30CC0852328F00D7DC8F /* tInstLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tInstLib.h; sourceTree = "<group>"; };
 		706D330E0854A7B900D7DC8F /* organism.smt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = organism.smt; sourceTree = "<group>"; };
 		706D33100854A7D700D7DC8F /* genesis.smt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = genesis.smt; sourceTree = "<group>"; };
 		706D33270854A90D00D7DC8F /* inst_set.smt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = inst_set.smt; sourceTree = "<group>"; };
 		707A687408E3750300576968 /* cHardwareTracer_SMT.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cHardwareTracer_SMT.h; sourceTree = "<group>"; };
-		707A68B808E37D5900576968 /* hardware_tracer_smt.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = hardware_tracer_smt.pyste; sourceTree = "<group>"; };
 		70B085D108F48C9400FC65FE /* nSpecies.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nSpecies.h; sourceTree = "<group>"; };
 		70B0861508F48E8900FC65FE /* nGenotype.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = nGenotype.h; sourceTree = "<group>"; };
 		70B0861608F48E8900FC65FE /* nInjectGenotype.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = nInjectGenotype.h; sourceTree = "<group>"; };
@@ -599,12 +573,10 @@
 		70C1EF9E08C39F0E00F50912 /* cHardwareBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cHardwareBase.h; sourceTree = "<group>"; };
 		70C1EF9F08C39F0E00F50912 /* cHardwareCPU_Thread.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cHardwareCPU_Thread.h; sourceTree = "<group>"; };
 		70C1EFA008C39F0E00F50912 /* cHardwareCPU.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cHardwareCPU.h; sourceTree = "<group>"; };
-		70C1EFA108C39F0E00F50912 /* cHardwareFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cHardwareFactory.h; sourceTree = "<group>"; };
 		70C1EFA208C39F2100F50912 /* cHardware4Stack_Thread.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cHardware4Stack_Thread.cc; sourceTree = "<group>"; };
 		70C1EFA308C39F2100F50912 /* cHardwareBase.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cHardwareBase.cc; sourceTree = "<group>"; };
 		70C1EFA408C39F2100F50912 /* cHardwareCPU_Thread.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cHardwareCPU_Thread.cc; sourceTree = "<group>"; };
 		70C1EFA508C39F2100F50912 /* cHardwareCPU.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cHardwareCPU.cc; sourceTree = "<group>"; };
-		70C1EFA608C39F2100F50912 /* cHardwareFactory.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cHardwareFactory.cc; sourceTree = "<group>"; };
 		70C1F01308C3C6FC00F50912 /* cHardwareSMT_Thread.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cHardwareSMT_Thread.h; sourceTree = "<group>"; };
 		70C1F01408C3C6FC00F50912 /* cHardwareSMT.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cHardwareSMT.h; sourceTree = "<group>"; };
 		70C1F01508C3C6FC00F50912 /* cHardwareStatusPrinter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cHardwareStatusPrinter.h; sourceTree = "<group>"; };
@@ -612,7 +584,6 @@
 		70C1F01708C3C6FC00F50912 /* cHardwareTracer_CPU.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cHardwareTracer_CPU.h; sourceTree = "<group>"; };
 		70C1F01808C3C6FC00F50912 /* cHardwareTracer_TestCPU.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cHardwareTracer_TestCPU.h; sourceTree = "<group>"; };
 		70C1F01908C3C6FC00F50912 /* cHardwareTracer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cHardwareTracer.h; sourceTree = "<group>"; };
-		70C1F01A08C3C6FC00F50912 /* cHardwareUtil.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cHardwareUtil.h; sourceTree = "<group>"; };
 		70C1F01B08C3C6FC00F50912 /* cHeadCPU.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cHeadCPU.h; sourceTree = "<group>"; };
 		70C1F01C08C3C6FC00F50912 /* cHeadMultiMem.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cHeadMultiMem.h; sourceTree = "<group>"; };
 		70C1F01D08C3C6FC00F50912 /* cInstLibCPU.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cInstLibCPU.h; sourceTree = "<group>"; };
@@ -623,35 +594,25 @@
 		70C1F02208C3C71300F50912 /* cHardwareSMT_Thread.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cHardwareSMT_Thread.cc; sourceTree = "<group>"; };
 		70C1F02308C3C71300F50912 /* cHardwareSMT.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cHardwareSMT.cc; sourceTree = "<group>"; };
 		70C1F02408C3C71300F50912 /* cHardwareStatusPrinter.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cHardwareStatusPrinter.cc; sourceTree = "<group>"; };
-		70C1F02508C3C71300F50912 /* cHardwareUtil.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cHardwareUtil.cc; sourceTree = "<group>"; };
 		70C1F02608C3C71300F50912 /* cHeadCPU.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cHeadCPU.cc; sourceTree = "<group>"; };
 		70C1F02708C3C71300F50912 /* cHeadMultiMem.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cHeadMultiMem.cc; sourceTree = "<group>"; };
 		70C1F02808C3C71300F50912 /* cTestCPU.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cTestCPU.cc; sourceTree = "<group>"; };
 		70C1F02908C3C71300F50912 /* cTestUtil.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cTestUtil.cc; sourceTree = "<group>"; };
 		70C1F06108C3CDEA00F50912 /* nHardware4Stack.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = nHardware4Stack.h; sourceTree = "<group>"; };
 		70C1F0A808C3FF1800F50912 /* nHardware.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nHardware.h; sourceTree = "<group>"; };
-		70C1F0C608C4012700F50912 /* nHardware-fixups.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "nHardware-fixups.h"; sourceTree = "<group>"; };
-		70C1F0C708C4012700F50912 /* nHardware-fixups.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "nHardware-fixups.cc"; sourceTree = "<group>"; };
 		70C1F0FC08C40B1B00F50912 /* nHardwareCPU.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = nHardwareCPU.h; sourceTree = "<group>"; };
-		70C1F10008C40BEF00F50912 /* nHardware.pyste */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = nHardware.pyste; sourceTree = "<group>"; };
-		70C1F10F08C40D2D00F50912 /* nHardwareCPU-fixups.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "nHardwareCPU-fixups.cc"; sourceTree = "<group>"; };
-		70C1F11008C40D2D00F50912 /* nHardwareCPU-fixups.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = "nHardwareCPU-fixups.h"; sourceTree = "<group>"; };
-		70C1F11108C40D6100F50912 /* nHardwareCPU.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = nHardwareCPU.pyste; sourceTree = "<group>"; };
 		70C1F18608C6A0FA00F50912 /* cEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cEvent.h; sourceTree = "<group>"; };
-		70C1F18708C6A0FA00F50912 /* cEventFactoryManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cEventFactoryManager.h; sourceTree = "<group>"; };
 		70C1F18808C6A0FA00F50912 /* cEventList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cEventList.h; sourceTree = "<group>"; };
 		70C1F18908C6A0FA00F50912 /* cEventListEntry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cEventListEntry.h; sourceTree = "<group>"; };
 		70C1F18A08C6A0FA00F50912 /* cEventListIterator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cEventListIterator.h; sourceTree = "<group>"; };
 		70C1F18B08C6A0FA00F50912 /* cEventTriggers.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cEventTriggers.h; sourceTree = "<group>"; };
-		70C1F18C08C6A0FA00F50912 /* cPopulationEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cPopulationEvent.h; sourceTree = "<group>"; };
-		70C1F18D08C6A0FA00F50912 /* cPopulationEventFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cPopulationEventFactory.h; sourceTree = "<group>"; };
-		70C1F18E08C6A11100F50912 /* cEventFactoryManager.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cEventFactoryManager.cc; sourceTree = "<group>"; };
 		70C1F18F08C6A11100F50912 /* cEventList.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cEventList.cc; sourceTree = "<group>"; };
 		70C1F19008C6A11100F50912 /* cEventListIterator.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cEventListIterator.cc; sourceTree = "<group>"; };
 		70C1F19108C6A11100F50912 /* cEventTriggers.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cEventTriggers.cc; sourceTree = "<group>"; };
-		70C1F19208C6A11100F50912 /* cPopulationEventFactory.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cPopulationEventFactory.cc; sourceTree = "<group>"; };
 		70C5BC6209059A970028A785 /* cWorld.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cWorld.h; sourceTree = "<group>"; };
 		70C5BC6309059A970028A785 /* cWorld.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cWorld.cc; sourceTree = "<group>"; };
+		70C5BD690905CE5F0028A785 /* cHardwareManager.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cHardwareManager.cc; sourceTree = "<group>"; };
+		70C5BD6A0905CE5F0028A785 /* cHardwareManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cHardwareManager.h; sourceTree = "<group>"; };
 		70CA6EB208DB7F8200068AC2 /* cFitnessMatrix.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cFitnessMatrix.cc; sourceTree = "<group>"; };
 		70CA6EB308DB7F8200068AC2 /* cGenebank.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cGenebank.cc; sourceTree = "<group>"; };
 		70CA6EB408DB7F8200068AC2 /* cGenome.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cGenome.cc; sourceTree = "<group>"; };
@@ -687,413 +648,13 @@
 		70CA6EF308DB7F9E00068AC2 /* cInstSet.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cInstSet.h; sourceTree = "<group>"; };
 		70CA6EF408DB7F9E00068AC2 /* cInstUtil.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cInstUtil.h; sourceTree = "<group>"; };
 		70CA6EF508DB806200068AC2 /* cGenotypeBatch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cGenotypeBatch.h; sourceTree = "<group>"; };
-		70CD471B089692200070D2DF /* AvidaEd-osx.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = "AvidaEd-osx.py"; sourceTree = "<group>"; };
-		70CD471D089692200070D2DF /* __init__.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = __init__.py; sourceTree = "<group>"; };
-		70CD471E089692200070D2DF /* _Custom_Widgets.cw */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = _Custom_Widgets.cw; sourceTree = "<group>"; };
-		70CD471F089692200070D2DF /* Analyze.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Analyze.png; sourceTree = "<group>"; };
-		70CD4720089692200070D2DF /* Analyze16.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Analyze16.png; sourceTree = "<group>"; };
-		70CD4721089692200070D2DF /* Analyze24.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Analyze24.png; sourceTree = "<group>"; };
-		70CD4722089692200070D2DF /* Analyze32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Analyze32.png; sourceTree = "<group>"; };
-		70CD4723089692200070D2DF /* Analyze48.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Analyze48.png; sourceTree = "<group>"; };
-		70CD4724089692200070D2DF /* Analyze64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Analyze64.png; sourceTree = "<group>"; };
-		70CD4725089692200070D2DF /* Avida_ED_startup.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = Avida_ED_startup.py; sourceTree = "<group>"; };
-		70CD4726089692200070D2DF /* Avida_ED_startup_utils.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = Avida_ED_startup_utils.py; sourceTree = "<group>"; };
-		70CD472A089692200070D2DF /* avidalogo.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = avidalogo.jpg; sourceTree = "<group>"; };
-		70CD472B089692200070D2DF /* avidalogo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = avidalogo.png; sourceTree = "<group>"; };
-		70CD472C089692200070D2DF /* checkuic.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = checkuic.py; sourceTree = "<group>"; };
-		70CD472D089692200070D2DF /* EmptyPetri128.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = EmptyPetri128.png; sourceTree = "<group>"; };
-		70CD472E089692200070D2DF /* EmptyPetri16.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = EmptyPetri16.png; sourceTree = "<group>"; };
-		70CD472F089692200070D2DF /* EmptyPetri24.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = EmptyPetri24.png; sourceTree = "<group>"; };
-		70CD4730089692200070D2DF /* EmptyPetri32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = EmptyPetri32.png; sourceTree = "<group>"; };
-		70CD4731089692200070D2DF /* EmptyPetri48.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = EmptyPetri48.png; sourceTree = "<group>"; };
-		70CD4732089692200070D2DF /* EmptyPetri64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = EmptyPetri64.png; sourceTree = "<group>"; };
-		70CD4733089692200070D2DF /* EmptyPetriDish.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = EmptyPetriDish.gif; sourceTree = "<group>"; };
-		70CD4734089692200070D2DF /* Flip15.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Flip15.png; sourceTree = "<group>"; };
-		70CD4735089692200070D2DF /* Flip28.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Flip28.png; sourceTree = "<group>"; };
-		70CD4736089692200070D2DF /* Flip30.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Flip30.png; sourceTree = "<group>"; };
-		70CD4737089692200070D2DF /* Flip40.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Flip40.png; sourceTree = "<group>"; };
-		70CD4738089692200070D2DF /* FullPetriDish.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = FullPetriDish.gif; sourceTree = "<group>"; };
-		70CD4739089692200070D2DF /* FunctionalTest_recursive_tests.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = FunctionalTest_recursive_tests.py; sourceTree = "<group>"; };
-		70CD473A089692200070D2DF /* next_active.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = next_active.png; sourceTree = "<group>"; };
-		70CD473B089692200070D2DF /* next_blue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = next_blue.png; sourceTree = "<group>"; };
-		70CD473C089692200070D2DF /* Organism.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Organism.png; sourceTree = "<group>"; };
-		70CD473D089692200070D2DF /* Organism32.1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Organism32.1.png; sourceTree = "<group>"; };
-		70CD473E089692200070D2DF /* Organism32.2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Organism32.2.png; sourceTree = "<group>"; };
-		70CD473F089692200070D2DF /* Organism32.3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Organism32.3.png; sourceTree = "<group>"; };
-		70CD4740089692200070D2DF /* Organism32.4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Organism32.4.png; sourceTree = "<group>"; };
-		70CD4741089692200070D2DF /* Organism32.5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Organism32.5.png; sourceTree = "<group>"; };
-		70CD4742089692200070D2DF /* Organism32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Organism32.png; sourceTree = "<group>"; };
-		70CD4743089692200070D2DF /* Organism65.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Organism65.png; sourceTree = "<group>"; };
-		70CD4744089692200070D2DF /* pause.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pause.png; sourceTree = "<group>"; };
-		70CD4745089692200070D2DF /* pause_blue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pause_blue.png; sourceTree = "<group>"; };
-		70CD4746089692200070D2DF /* Petri128.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Petri128.png; sourceTree = "<group>"; };
-		70CD4747089692200070D2DF /* Petri16.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Petri16.png; sourceTree = "<group>"; };
-		70CD4748089692200070D2DF /* Petri24.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Petri24.png; sourceTree = "<group>"; };
-		70CD4749089692200070D2DF /* Petri32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Petri32.png; sourceTree = "<group>"; };
-		70CD474A089692200070D2DF /* Petri48.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Petri48.png; sourceTree = "<group>"; };
-		70CD474B089692200070D2DF /* Petri64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Petri64.png; sourceTree = "<group>"; };
-		70CD474C089692200070D2DF /* play.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = play.png; sourceTree = "<group>"; };
-		70CD474D089692200070D2DF /* play_blue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = play_blue.png; sourceTree = "<group>"; };
-		70CD474E089692200070D2DF /* previous_active.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = previous_active.png; sourceTree = "<group>"; };
-		70CD474F089692200070D2DF /* previous_blue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = previous_blue.png; sourceTree = "<group>"; };
-		70CD4750089692200070D2DF /* py_recursive_tests_support.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = py_recursive_tests_support.py; sourceTree = "<group>"; };
-		70CD4751089692200070D2DF /* py_test_utils.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = py_test_utils.py; sourceTree = "<group>"; };
-		70CD4752089692200070D2DF /* pyAnalyzeControlsCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyAnalyzeControlsCtrl.py; sourceTree = "<group>"; };
-		70CD4753089692200070D2DF /* pyAnalyzeControlsView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyAnalyzeControlsView.ui; sourceTree = "<group>"; };
-		70CD4754089692200070D2DF /* pyAvida.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyAvida.py; sourceTree = "<group>"; };
-		70CD4755089692200070D2DF /* pyAvidaCoreData.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyAvidaCoreData.py; sourceTree = "<group>"; };
-		70CD4756089692200070D2DF /* pyAvidaStatsInterface.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyAvidaStatsInterface.py; sourceTree = "<group>"; };
-		70CD4757089692200070D2DF /* pyAvidaThreadedDriver.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyAvidaThreadedDriver.py; sourceTree = "<group>"; };
-		70CD4758089692200070D2DF /* pyEduMainCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyEduMainCtrl.py; sourceTree = "<group>"; };
-		70CD4759089692200070D2DF /* pyEduMainMenuBarHdlr.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyEduMainMenuBarHdlr.py; sourceTree = "<group>"; };
-		70CD475A089692200070D2DF /* pyEduSessionMenuBarHdlr.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyEduSessionMenuBarHdlr.py; sourceTree = "<group>"; };
-		70CD475B089692200070D2DF /* pyEduWorkspaceCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyEduWorkspaceCtrl.py; sourceTree = "<group>"; };
-		70CD475C089692210070D2DF /* pyEduWorkspaceView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyEduWorkspaceView.ui; sourceTree = "<group>"; };
-		70CD475D089692210070D2DF /* pyFreezeDialogCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyFreezeDialogCtrl.py; sourceTree = "<group>"; };
-		70CD475E089692210070D2DF /* pyFreezeDialogView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyFreezeDialogView.ui; sourceTree = "<group>"; };
-		70CD475F089692210070D2DF /* pyFreezeOrganismCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyFreezeOrganismCtrl.py; sourceTree = "<group>"; };
-		70CD4760089692210070D2DF /* pyFreezeOrganismView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyFreezeOrganismView.ui; sourceTree = "<group>"; };
-		70CD4761089692210070D2DF /* pyFreezerCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyFreezerCtrl.py; sourceTree = "<group>"; };
-		70CD4762089692210070D2DF /* pyFreezerView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyFreezerView.ui; sourceTree = "<group>"; };
-		70CD4763089692210070D2DF /* pyGradientScaleCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyGradientScaleCtrl.py; sourceTree = "<group>"; };
-		70CD4764089692210070D2DF /* pyGradientScaleView.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyGradientScaleView.py; sourceTree = "<group>"; };
-		70CD4765089692210070D2DF /* pyGraphCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyGraphCtrl.py; sourceTree = "<group>"; };
-		70CD4766089692210070D2DF /* pyGraphView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyGraphView.ui; sourceTree = "<group>"; };
-		70CD4767089692210070D2DF /* pyHardwareCPUTrace.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyHardwareCPUTrace.py; sourceTree = "<group>"; };
-		70CD4768089692210070D2DF /* pyHardwareTracer.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyHardwareTracer.py; sourceTree = "<group>"; };
-		70CD4769089692210070D2DF /* pyInstructionSet.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyInstructionSet.py; sourceTree = "<group>"; };
-		70CD476A089692210070D2DF /* pyLiveControlsCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyLiveControlsCtrl.py; sourceTree = "<group>"; };
-		70CD476B089692210070D2DF /* pyLiveControlsView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyLiveControlsView.ui; sourceTree = "<group>"; };
-		70CD476C089692210070D2DF /* pyMainControllerFactory.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyMainControllerFactory.py; sourceTree = "<group>"; };
-		70CD476D089692210070D2DF /* pyMapProfile.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyMapProfile.py; sourceTree = "<group>"; };
-		70CD476E089692210070D2DF /* pyMdtr.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyMdtr.py; sourceTree = "<group>"; };
-		70CD476F089692210070D2DF /* pyNavBarCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyNavBarCtrl.py; sourceTree = "<group>"; };
-		70CD4770089692210070D2DF /* pyNavBarView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyNavBarView.ui; sourceTree = "<group>"; };
-		70CD4771089692210070D2DF /* pyOneAna_GraphCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyOneAna_GraphCtrl.py; sourceTree = "<group>"; };
-		70CD4772089692210070D2DF /* pyOneAna_GraphView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyOneAna_GraphView.ui; sourceTree = "<group>"; };
-		70CD4773089692210070D2DF /* pyOneAna_PetriDishCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyOneAna_PetriDishCtrl.py; sourceTree = "<group>"; };
-		70CD4774089692210070D2DF /* pyOneAna_PetriDishView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyOneAna_PetriDishView.ui; sourceTree = "<group>"; };
-		70CD4775089692210070D2DF /* pyOneAna_StatsCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyOneAna_StatsCtrl.py; sourceTree = "<group>"; };
-		70CD4776089692210070D2DF /* pyOneAna_StatsView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyOneAna_StatsView.ui; sourceTree = "<group>"; };
-		70CD4777089692210070D2DF /* pyOneAna_TimelineCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyOneAna_TimelineCtrl.py; sourceTree = "<group>"; };
-		70CD4778089692210070D2DF /* pyOneAna_TimelineView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyOneAna_TimelineView.ui; sourceTree = "<group>"; };
-		70CD4779089692210070D2DF /* pyOneAnalyzeCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyOneAnalyzeCtrl.py; sourceTree = "<group>"; };
-		70CD477A089692210070D2DF /* pyOneAnalyzeView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyOneAnalyzeView.ui; sourceTree = "<group>"; };
-		70CD477B089692210070D2DF /* pyOneOrg_ScopeCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyOneOrg_ScopeCtrl.py; sourceTree = "<group>"; };
-		70CD477C089692210070D2DF /* pyOneOrg_ScopeView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyOneOrg_ScopeView.ui; sourceTree = "<group>"; };
-		70CD477D089692210070D2DF /* pyOneOrganismCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyOneOrganismCtrl.py; sourceTree = "<group>"; };
-		70CD477E089692210070D2DF /* pyOneOrganismView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyOneOrganismView.ui; sourceTree = "<group>"; };
-		70CD477F089692210070D2DF /* pyOnePop_GraphCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyOnePop_GraphCtrl.py; sourceTree = "<group>"; };
-		70CD4780089692210070D2DF /* pyOnePop_GraphView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyOnePop_GraphView.ui; sourceTree = "<group>"; };
-		70CD4781089692210070D2DF /* pyOnePop_PetriDishCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyOnePop_PetriDishCtrl.py; sourceTree = "<group>"; };
-		70CD4782089692210070D2DF /* pyOnePop_PetriDishView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyOnePop_PetriDishView.ui; sourceTree = "<group>"; };
-		70CD4783089692210070D2DF /* pyOnePop_StatsCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyOnePop_StatsCtrl.py; sourceTree = "<group>"; };
-		70CD4784089692210070D2DF /* pyOnePop_StatsView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyOnePop_StatsView.ui; sourceTree = "<group>"; };
-		70CD4785089692210070D2DF /* pyOnePop_TimelineCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyOnePop_TimelineCtrl.py; sourceTree = "<group>"; };
-		70CD4786089692210070D2DF /* pyOnePop_TimelineView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyOnePop_TimelineView.ui; sourceTree = "<group>"; };
-		70CD4787089692210070D2DF /* pyOnePopulationCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyOnePopulationCtrl.py; sourceTree = "<group>"; };
-		70CD4788089692210070D2DF /* pyOnePopulationView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyOnePopulationView.ui; sourceTree = "<group>"; };
-		70CD4789089692210070D2DF /* pyOrganismScopeCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyOrganismScopeCtrl.py; sourceTree = "<group>"; };
-		70CD478A089692210070D2DF /* pyOrganismScopeView.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyOrganismScopeView.py; sourceTree = "<group>"; };
-		70CD478B089692210070D2DF /* pyOrgSquareCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyOrgSquareCtrl.py; sourceTree = "<group>"; };
-		70CD478C089692210070D2DF /* pyOrgSquareView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyOrgSquareView.ui; sourceTree = "<group>"; };
-		70CD478D089692210070D2DF /* pyPetriCanvasView.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyPetriCanvasView.py; sourceTree = "<group>"; };
-		70CD478E089692210070D2DF /* pyPetriConfigureCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyPetriConfigureCtrl.py; sourceTree = "<group>"; };
-		70CD478F089692210070D2DF /* pyPetriConfigureView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyPetriConfigureView.ui; sourceTree = "<group>"; };
-		70CD4790089692210070D2DF /* pyPetriDishCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyPetriDishCtrl.py; sourceTree = "<group>"; };
-		70CD4791089692210070D2DF /* pyPetriDishView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyPetriDishView.ui; sourceTree = "<group>"; };
-		70CD4792089692210070D2DF /* pyPopulationCellItem.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyPopulationCellItem.py; sourceTree = "<group>"; };
-		70CD4793089692210070D2DF /* pyQuitDialogCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyQuitDialogCtrl.py; sourceTree = "<group>"; };
-		70CD4794089692210070D2DF /* pyQuitDialogView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyQuitDialogView.ui; sourceTree = "<group>"; };
-		70CD4795089692210070D2DF /* pyReadFreezer.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyReadFreezer.py; sourceTree = "<group>"; };
-		70CD4796089692210070D2DF /* pySessionControllerFactory.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pySessionControllerFactory.py; sourceTree = "<group>"; };
-		70CD4797089692210070D2DF /* pySessionCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pySessionCtrl.py; sourceTree = "<group>"; };
-		70CD4798089692210070D2DF /* pySessionWorkThreadHdlr.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pySessionWorkThreadHdlr.py; sourceTree = "<group>"; };
-		70CD4799089692210070D2DF /* pyTemporaryReloads.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyTemporaryReloads.py; sourceTree = "<group>"; };
-		70CD479A089692210070D2DF /* pyTest.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyTest.ui; sourceTree = "<group>"; };
-		70CD479B089692210070D2DF /* pyTestCase.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyTestCase.py; sourceTree = "<group>"; };
-		70CD479C089692210070D2DF /* pyTimelineCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyTimelineCtrl.py; sourceTree = "<group>"; };
-		70CD479D089692210070D2DF /* pyTimelineView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyTimelineView.ui; sourceTree = "<group>"; };
-		70CD479E089692210070D2DF /* pyTwoAnalyzeCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyTwoAnalyzeCtrl.py; sourceTree = "<group>"; };
-		70CD479F089692210070D2DF /* pyTwoAnalyzeView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyTwoAnalyzeView.ui; sourceTree = "<group>"; };
-		70CD47A0089692210070D2DF /* pyTwoOrg_VivisectionCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyTwoOrg_VivisectionCtrl.py; sourceTree = "<group>"; };
-		70CD47A1089692210070D2DF /* pyTwoOrg_VivisectionView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyTwoOrg_VivisectionView.ui; sourceTree = "<group>"; };
-		70CD47A2089692210070D2DF /* pyTwoOrganismCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyTwoOrganismCtrl.py; sourceTree = "<group>"; };
-		70CD47A3089692210070D2DF /* pyTwoOrganismView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyTwoOrganismView.ui; sourceTree = "<group>"; };
-		70CD47A4089692210070D2DF /* pyTwoPop_GraphCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyTwoPop_GraphCtrl.py; sourceTree = "<group>"; };
-		70CD47A5089692210070D2DF /* pyTwoPop_GraphView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyTwoPop_GraphView.ui; sourceTree = "<group>"; };
-		70CD47A6089692210070D2DF /* pyTwoPop_PetriDishesCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyTwoPop_PetriDishesCtrl.py; sourceTree = "<group>"; };
-		70CD47A7089692210070D2DF /* pyTwoPop_PetriDishesView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyTwoPop_PetriDishesView.ui; sourceTree = "<group>"; };
-		70CD47A8089692210070D2DF /* pyTwoPop_StatsCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyTwoPop_StatsCtrl.py; sourceTree = "<group>"; };
-		70CD47A9089692210070D2DF /* pyTwoPop_StatsView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyTwoPop_StatsView.ui; sourceTree = "<group>"; };
-		70CD47AA089692210070D2DF /* pyTwoPop_TimelineCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyTwoPop_TimelineCtrl.py; sourceTree = "<group>"; };
-		70CD47AB089692210070D2DF /* pyTwoPop_TimelineView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyTwoPop_TimelineView.ui; sourceTree = "<group>"; };
-		70CD47AC089692210070D2DF /* pyTwoPopulationCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyTwoPopulationCtrl.py; sourceTree = "<group>"; };
-		70CD47AD089692210070D2DF /* pyTwoPopulationView.ui */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pyTwoPopulationView.ui; sourceTree = "<group>"; };
-		70CD47AE089692210070D2DF /* pyUnitTestSuite.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyUnitTestSuite.py; sourceTree = "<group>"; };
-		70CD47AF089692210070D2DF /* pyUnitTestSuiteRecurser.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyUnitTestSuiteRecurser.py; sourceTree = "<group>"; };
-		70CD47B0089692210070D2DF /* pyWriteGenesisEvent.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyWriteGenesisEvent.py; sourceTree = "<group>"; };
-		70CD47B1089692210070D2DF /* pyWriteToFreezer.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyWriteToFreezer.py; sourceTree = "<group>"; };
-		70CD47B2089692210070D2DF /* skip_forward_active.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = skip_forward_active.png; sourceTree = "<group>"; };
-		70CD47B3089692210070D2DF /* skip_forward_blue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = skip_forward_blue.png; sourceTree = "<group>"; };
-		70CD47B4089692210070D2DF /* skip_previous_active.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = skip_previous_active.png; sourceTree = "<group>"; };
-		70CD47B5089692210070D2DF /* skip_previous_blue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = skip_previous_blue.png; sourceTree = "<group>"; };
-		70CD47B6089692210070D2DF /* smlEmptyPetriDish.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = smlEmptyPetriDish.gif; sourceTree = "<group>"; };
-		70CD47B7089692210070D2DF /* smlEmptyPetriDish.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = smlEmptyPetriDish.png; sourceTree = "<group>"; };
-		70CD47B8089692210070D2DF /* smlFullPetriDish.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = smlFullPetriDish.gif; sourceTree = "<group>"; };
-		70CD47B9089692210070D2DF /* smlFullPetriDish.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = smlFullPetriDish.png; sourceTree = "<group>"; };
-		70CD47BA089692210070D2DF /* topicbiotech.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = topicbiotech.gif; sourceTree = "<group>"; };
-		70CD47BB089692210070D2DF /* trnsEmptyPetriDish.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = trnsEmptyPetriDish.gif; sourceTree = "<group>"; };
-		70CD47BC089692210070D2DF /* UnitTest_py_test_utils.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = UnitTest_py_test_utils.py; sourceTree = "<group>"; };
-		70CD47BD089692210070D2DF /* UnitTest_pyEduMainCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = UnitTest_pyEduMainCtrl.py; sourceTree = "<group>"; };
-		70CD47BE089692210070D2DF /* UnitTest_pyTestCase.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = UnitTest_pyTestCase.py; sourceTree = "<group>"; };
-		70CD47BF089692210070D2DF /* UnitTest_pyUnitTestSuiteRecurser.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = UnitTest_pyUnitTestSuiteRecurser.py; sourceTree = "<group>"; };
-		70CD47C1089692210070D2DF /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		70CD47C5089692210070D2DF /* environment.default */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = environment.default; sourceTree = "<group>"; };
-		70CD47C6089692210070D2DF /* events.default */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = events.default; sourceTree = "<group>"; };
-		70CD47C8089692210070D2DF /* default.empty */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = default.empty; sourceTree = "<group>"; };
-		70CD47C9089692210070D2DF /* default.organism */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = default.organism; sourceTree = "<group>"; };
-		70CD47CA089692210070D2DF /* no_mutations.empty */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = no_mutations.empty; sourceTree = "<group>"; };
-		70CD47CD089692210070D2DF /* genesis.default */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = genesis.default; sourceTree = "<group>"; };
-		70CD47CE089692210070D2DF /* inst_set.default */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = inst_set.default; sourceTree = "<group>"; };
-		70CD47CF089692210070D2DF /* pmock.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pmock.py; sourceTree = "<group>"; };
-		70CD47D0089692210070D2DF /* setup_osx.py.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = setup_osx.py.in; sourceTree = "<group>"; };
-		70CD47DA089692AE0070D2DF /* AvidaPyste.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = AvidaPyste.py; sourceTree = "<group>"; };
-		70CD47DB089692AE0070D2DF /* change_list.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = change_list.pyste; sourceTree = "<group>"; };
-		70CD47DF089692AE0070D2DF /* cpu_head-fixups.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "cpu_head-fixups.cc"; sourceTree = "<group>"; };
-		70CD47E0089692AE0070D2DF /* cpu_head-fixups.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = "cpu_head-fixups.hh"; sourceTree = "<group>"; };
-		70CD47E1089692AE0070D2DF /* cpu_memory-fixups.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "cpu_memory-fixups.cc"; sourceTree = "<group>"; };
-		70CD47E2089692AE0070D2DF /* cpu_memory-fixups.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = "cpu_memory-fixups.hh"; sourceTree = "<group>"; };
-		70CD47E3089692AE0070D2DF /* hardware_status_printer.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = hardware_status_printer.pyste; sourceTree = "<group>"; };
-		70CD47E4089692AE0070D2DF /* hardware_tracer_4stack.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = hardware_tracer_4stack.pyste; sourceTree = "<group>"; };
-		70CD47E5089692AE0070D2DF /* hardware_tracer_cpu.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = hardware_tracer_cpu.pyste; sourceTree = "<group>"; };
-		70CD47E6089692AE0070D2DF /* hardware_tracer_test_cpu.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = hardware_tracer_test_cpu.pyste; sourceTree = "<group>"; };
-		70CD47E7089692AE0070D2DF /* hardware_tracer.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = hardware_tracer.pyste; sourceTree = "<group>"; };
-		70CD47E8089692AE0070D2DF /* py_hardware_tracer-fixups.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "py_hardware_tracer-fixups.cc"; sourceTree = "<group>"; };
-		70CD47E9089692AE0070D2DF /* py_hardware_tracer.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = py_hardware_tracer.hh; sourceTree = "<group>"; };
-		70CD47EA089692AE0070D2DF /* py_hardware_tracer.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = py_hardware_tracer.pyste; sourceTree = "<group>"; };
-		70CD47EB089692AE0070D2DF /* resource_count-fixups.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "resource_count-fixups.cc"; sourceTree = "<group>"; };
-		70CD47EC089692AE0070D2DF /* resource_count-fixups.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = "resource_count-fixups.hh"; sourceTree = "<group>"; };
-		70CD47ED089692AE0070D2DF /* test_cpu-fixups.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "test_cpu-fixups.cc"; sourceTree = "<group>"; };
-		70CD47EE089692AE0070D2DF /* test_cpu-fixups.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = "test_cpu-fixups.hh"; sourceTree = "<group>"; };
-		70CD47EF089692AE0070D2DF /* tVector_instantiations.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = tVector_instantiations.hh; sourceTree = "<group>"; };
-		70CD47F0089692AE0070D2DF /* tVector.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = tVector.pyste; sourceTree = "<group>"; };
 		70FB86A908BFAFEC00BDF589 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		DCC30D300762539B008F7A48 /* 4stack_head.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = 4stack_head.pyste; sourceTree = "<group>"; };
-		DCC30D310762539B008F7A48 /* A.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = A.hh; sourceTree = "<group>"; };
-		DCC30D320762539B008F7A48 /* A.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = A.pyste; sourceTree = "<group>"; };
-		DCC30D330762539B008F7A48 /* AB.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AB.cc; sourceTree = "<group>"; };
-		DCC30D340762539B008F7A48 /* analyze.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = analyze.pyste; sourceTree = "<group>"; };
-		DCC30D350762539B008F7A48 /* analyze_command.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = analyze_command.pyste; sourceTree = "<group>"; };
-		DCC30D360762539B008F7A48 /* analyze_command_def.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = analyze_command_def.pyste; sourceTree = "<group>"; };
-		DCC30D370762539B008F7A48 /* analyze_command_def_base.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = analyze_command_def_base.pyste; sourceTree = "<group>"; };
-		DCC30D380762539B008F7A48 /* analyze_flow_command.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = analyze_flow_command.pyste; sourceTree = "<group>"; };
-		DCC30D390762539B008F7A48 /* analyze_flow_command_def.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = analyze_flow_command_def.pyste; sourceTree = "<group>"; };
-		DCC30D3A0762539B008F7A48 /* analyze_function.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = analyze_function.pyste; sourceTree = "<group>"; };
-		DCC30D3B0762539B008F7A48 /* analyze_genotype.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = analyze_genotype.pyste; sourceTree = "<group>"; };
-		DCC30D3C0762539B008F7A48 /* analyze_util.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = analyze_util.pyste; sourceTree = "<group>"; };
-		DCC30D3D0762539B008F7A48 /* avida-fixups.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = "avida-fixups.hh"; sourceTree = "<group>"; };
-		DCC30D3E0762539B008F7A48 /* avida.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = avida.pyste; sourceTree = "<group>"; };
-		DCC30D3F0762539B008F7A48 /* avida_driver_analyze.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = avida_driver_analyze.pyste; sourceTree = "<group>"; };
-		DCC30D400762539B008F7A48 /* avida_driver_base.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = avida_driver_base.pyste; sourceTree = "<group>"; };
-		DCC30D410762539B008F7A48 /* avida_driver_population.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = avida_driver_population.pyste; sourceTree = "<group>"; };
-		DCC30D420762539B008F7A48 /* avida_triggers.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = avida_triggers.pyste; sourceTree = "<group>"; };
-		DCC30D670762539B008F7A48 /* __init__.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = __init__.py; sourceTree = "<group>"; };
-		DCC30D680762539B008F7A48 /* buildapp.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = buildapp.py; sourceTree = "<group>"; };
-		DCC30D690762539B008F7A48 /* FunctionalTest_recursive_tests.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = FunctionalTest_recursive_tests.py; sourceTree = "<group>"; };
-		DCC30D6A0762539B008F7A48 /* py_avida_core_data.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = py_avida_core_data.py; sourceTree = "<group>"; };
-		DCC30D6B0762539B008F7A48 /* py_avida_driver_controller.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = py_avida_driver_controller.py; sourceTree = "<group>"; };
-		DCC30D6C0762539B008F7A48 /* py_avida_state_mediator.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = py_avida_state_mediator.py; sourceTree = "<group>"; };
-		DCC30D6D0762539B008F7A48 /* py_avida_threaded_driver.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = py_avida_threaded_driver.py; sourceTree = "<group>"; };
-		DCC30D6E0762539B008F7A48 /* py_brainstorms.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = py_brainstorms.py; sourceTree = "<group>"; };
-		DCC30D6F0762539B008F7A48 /* py_main_controller_data.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = py_main_controller_data.py; sourceTree = "<group>"; };
-		DCC30D700762539B008F7A48 /* pyEduMainCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyEduMainCtrl.py; sourceTree = "<group>"; };
-		DCC30D710762539B008F7A48 /* pyMdl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyMdl.py; sourceTree = "<group>"; };
-		DCC30D720762539B008F7A48 /* pySessionCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pySessionCtrl.py; sourceTree = "<group>"; };
-		DCC30D730762539B008F7A48 /* pySessionCtrl.py.1 */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.man; path = pySessionCtrl.py.1; sourceTree = "<group>"; };
-		DCC30D740762539B008F7A48 /* pySessionDumbCtrl.py.1 */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.man; path = pySessionDumbCtrl.py.1; sourceTree = "<group>"; };
-		DCC30D750762539B008F7A48 /* pySessionWorkThreadHdlr.py.0 */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = pySessionWorkThreadHdlr.py.0; sourceTree = "<group>"; };
-		DCC30D760762539B008F7A48 /* pySessionWorkThreadHdlr.py.1 */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.man; path = pySessionWorkThreadHdlr.py.1; sourceTree = "<group>"; };
-		DCC30D770762539B008F7A48 /* pyTemporaryReloads.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = pyTemporaryReloads.py; sourceTree = "<group>"; };
-		DCC30D780762539B008F7A48 /* UnitTest_pyAvidaCoreData.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = UnitTest_pyAvidaCoreData.py; sourceTree = "<group>"; };
-		DCC30D790762539B008F7A48 /* UnitTest_pyAvidaThreadedDriver.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = UnitTest_pyAvidaThreadedDriver.py; sourceTree = "<group>"; };
-		DCC30D7A0762539B008F7A48 /* UnitTest_pyEduMainCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = UnitTest_pyEduMainCtrl.py; sourceTree = "<group>"; };
-		DCC30D7B0762539B008F7A48 /* UnitTest_pyEduMainMenuBarHdlr.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = UnitTest_pyEduMainMenuBarHdlr.py; sourceTree = "<group>"; };
-		DCC30D7C0762539B008F7A48 /* UnitTest_pyEduSessionMenuBarHdlr.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = UnitTest_pyEduSessionMenuBarHdlr.py; sourceTree = "<group>"; };
-		DCC30D7D0762539B008F7A48 /* UnitTest_pyMainControllerFactory.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = UnitTest_pyMainControllerFactory.py; sourceTree = "<group>"; };
-		DCC30D7E0762539B008F7A48 /* UnitTest_pyMdl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = UnitTest_pyMdl.py; sourceTree = "<group>"; };
-		DCC30D7F0762539B008F7A48 /* UnitTest_pyMdtr.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = UnitTest_pyMdtr.py; sourceTree = "<group>"; };
-		DCC30D800762539B008F7A48 /* UnitTest_pySessionControllerFactory.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = UnitTest_pySessionControllerFactory.py; sourceTree = "<group>"; };
-		DCC30D810762539B008F7A48 /* UnitTest_pySessionCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = UnitTest_pySessionCtrl.py; sourceTree = "<group>"; };
-		DCC30D820762539B008F7A48 /* UnitTest_pySessionDumbCtrl.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = UnitTest_pySessionDumbCtrl.py; sourceTree = "<group>"; };
-		DCC30D830762539B008F7A48 /* UnitTest_pySessionDumbView.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = UnitTest_pySessionDumbView.py; sourceTree = "<group>"; };
-		DCC30D840762539B008F7A48 /* UnitTest_pySessionWorkThreadHdlr.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = UnitTest_pySessionWorkThreadHdlr.py; sourceTree = "<group>"; };
-		DCC30ED70762539D008F7A48 /* B.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = B.hh; sourceTree = "<group>"; };
-		DCC30ED80762539D008F7A48 /* B.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = B.pyste; sourceTree = "<group>"; };
-		DCC30ED90762539D008F7A48 /* birth_chamber.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = birth_chamber.pyste; sourceTree = "<group>"; };
-		DCC30EDA0762539D008F7A48 /* block_struct.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = block_struct.pyste; sourceTree = "<group>"; };
-		DCC30EDE0762539D008F7A48 /* callback_util.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = callback_util.pyste; sourceTree = "<group>"; };
-		DCC30EDF0762539D008F7A48 /* cCycleCheck.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = cCycleCheck.pyste; sourceTree = "<group>"; };
-		DCC30EE00762539D008F7A48 /* cID.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = cID.pyste; sourceTree = "<group>"; };
-		DCC30EE10762539D008F7A48 /* cmake_entries */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = cmake_entries; sourceTree = "<group>"; };
-		DCC30EE20762539D008F7A48 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		DCC30EE30762539D008F7A48 /* code_label.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = code_label.pyste; sourceTree = "<group>"; };
-		DCC30EE40762539D008F7A48 /* config.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = config.pyste; sourceTree = "<group>"; };
-		DCC30EE50762539D008F7A48 /* const_schedule.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = const_schedule.pyste; sourceTree = "<group>"; };
-		DCC30EE60762539D008F7A48 /* count_tracker.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = count_tracker.pyste; sourceTree = "<group>"; };
-		DCC30EE70762539D008F7A48 /* cpu_head.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = cpu_head.pyste; sourceTree = "<group>"; };
-		DCC30EE80762539D008F7A48 /* cpu_memory.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = cpu_memory.pyste; sourceTree = "<group>"; };
-		DCC30EE90762539D008F7A48 /* cpu_stack.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = cpu_stack.pyste; sourceTree = "<group>"; };
-		DCC30EEA0762539D008F7A48 /* cpu_stats.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = cpu_stats.pyste; sourceTree = "<group>"; };
-		DCC30EEB0762539D008F7A48 /* cpu_test_info.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = cpu_test_info.pyste; sourceTree = "<group>"; };
-		DCC30EEC0762539D008F7A48 /* cStringable.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = cStringable.pyste; sourceTree = "<group>"; };
-		DCC30EED0762539D008F7A48 /* cTestCase.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = cTestCase.pyste; sourceTree = "<group>"; };
-		DCC30EEE0762539D008F7A48 /* cTestProblem.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = cTestProblem.pyste; sourceTree = "<group>"; };
-		DCC30EEF0762539D008F7A48 /* cTestResult.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = cTestResult.pyste; sourceTree = "<group>"; };
-		DCC30EF00762539D008F7A48 /* cTextTestInterpreter.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = cTextTestInterpreter.pyste; sourceTree = "<group>"; };
-		DCC30EF10762539D008F7A48 /* data_entry.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = data_entry.pyste; sourceTree = "<group>"; };
-		DCC30EF20762539D008F7A48 /* data_file.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = data_file.pyste; sourceTree = "<group>"; };
-		DCC30EF30762539D008F7A48 /* data_file_manager.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = data_file_manager.pyste; sourceTree = "<group>"; };
-		DCC30EF40762539D008F7A48 /* data_manager_base.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = data_manager_base.pyste; sourceTree = "<group>"; };
-		DCC30EF50762539D008F7A48 /* double_sum.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = double_sum.pyste; sourceTree = "<group>"; };
-		DCC30EF60762539D008F7A48 /* environment.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = environment.pyste; sourceTree = "<group>"; };
-		DCC30EF70762539D008F7A48 /* event.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = event.pyste; sourceTree = "<group>"; };
-		DCC30EF90762539D008F7A48 /* event_factory_manager.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = event_factory_manager.pyste; sourceTree = "<group>"; };
-		DCC30EFA0762539D008F7A48 /* event_list.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = event_list.pyste; sourceTree = "<group>"; };
-		DCC30EFB0762539D008F7A48 /* event_list_entry.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = event_list_entry.pyste; sourceTree = "<group>"; };
-		DCC30EFC0762539D008F7A48 /* event_list_iterator.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = event_list_iterator.pyste; sourceTree = "<group>"; };
-		DCC30EFD0762539D008F7A48 /* event_triggers.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = event_triggers.pyste; sourceTree = "<group>"; };
-		DCC30EFE0762539D008F7A48 /* file-fixups.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "file-fixups.cc"; sourceTree = "<group>"; };
-		DCC30EFF0762539D008F7A48 /* file-fixups.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = "file-fixups.hh"; sourceTree = "<group>"; };
-		DCC30F000762539D008F7A48 /* file.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = file.pyste; sourceTree = "<group>"; };
-		DCC30F010762539D008F7A48 /* fitness_matrix.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = fitness_matrix.pyste; sourceTree = "<group>"; };
-		DCC30F020762539D008F7A48 /* fixed_block.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = fixed_block.pyste; sourceTree = "<group>"; };
-		DCC30F030762539D008F7A48 /* fixed_coords.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = fixed_coords.pyste; sourceTree = "<group>"; };
-		DCC30F040762539D008F7A48 /* genebank.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = genebank.pyste; sourceTree = "<group>"; };
-		DCC30F050762539D008F7A48 /* generatePysteFiles.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = generatePysteFiles.py; sourceTree = "<group>"; };
-		DCC30F060762539D008F7A48 /* genesis-fixups.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "genesis-fixups.cc"; sourceTree = "<group>"; };
-		DCC30F070762539D008F7A48 /* genesis-fixups.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = "genesis-fixups.hh"; sourceTree = "<group>"; };
-		DCC30F080762539D008F7A48 /* genesis.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = genesis.pyste; sourceTree = "<group>"; };
-		DCC30F090762539D008F7A48 /* genome.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = genome.pyste; sourceTree = "<group>"; };
-		DCC30F0A0762539D008F7A48 /* genome_util.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = genome_util.pyste; sourceTree = "<group>"; };
-		DCC30F0B0762539D008F7A48 /* genotype.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = genotype.pyste; sourceTree = "<group>"; };
-		DCC30F0C0762539D008F7A48 /* genotype_batch.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = genotype_batch.pyste; sourceTree = "<group>"; };
-		DCC30F0D0762539D008F7A48 /* genotype_birth_data.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = genotype_birth_data.pyste; sourceTree = "<group>"; };
-		DCC30F0E0762539D008F7A48 /* genotype_control.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = genotype_control.pyste; sourceTree = "<group>"; };
-		DCC30F0F0762539D008F7A48 /* genotype_test_data.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = genotype_test_data.pyste; sourceTree = "<group>"; };
-		DCC30F100762539D008F7A48 /* getting_started1.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = getting_started1.cpp; sourceTree = "<group>"; };
-		DCC30F110762539D008F7A48 /* getting_started2.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = getting_started2.cpp; sourceTree = "<group>"; };
-		DCC30F120762539D008F7A48 /* hardware_4stack.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = hardware_4stack.pyste; sourceTree = "<group>"; };
-		DCC30F130762539D008F7A48 /* hardware_4stack_thread.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = hardware_4stack_thread.pyste; sourceTree = "<group>"; };
-		DCC30F140762539D008F7A48 /* hardware_base.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = hardware_base.pyste; sourceTree = "<group>"; };
-		DCC30F150762539D008F7A48 /* hardware_cpu-fixups.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "hardware_cpu-fixups.cc"; sourceTree = "<group>"; };
-		DCC30F160762539D008F7A48 /* hardware_cpu-fixups.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = "hardware_cpu-fixups.hh"; sourceTree = "<group>"; };
-		DCC30F170762539D008F7A48 /* hardware_cpu.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = hardware_cpu.pyste; sourceTree = "<group>"; };
-		DCC30F180762539D008F7A48 /* hardware_cpu_thread.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = hardware_cpu_thread.pyste; sourceTree = "<group>"; };
-		DCC30F190762539D008F7A48 /* hardware_factory.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = hardware_factory.pyste; sourceTree = "<group>"; };
-		DCC30F1A0762539D008F7A48 /* hardware_util.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = hardware_util.pyste; sourceTree = "<group>"; };
-		DCC30F1B0762539D008F7A48 /* help_alias.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = help_alias.pyste; sourceTree = "<group>"; };
-		DCC30F1C0762539D008F7A48 /* help_entry.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = help_entry.pyste; sourceTree = "<group>"; };
-		DCC30F1D0762539D008F7A48 /* help_full_entry.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = help_full_entry.pyste; sourceTree = "<group>"; };
-		DCC30F1E0762539D008F7A48 /* help_manager.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = help_manager.pyste; sourceTree = "<group>"; };
-		DCC30F1F0762539D008F7A48 /* help_type.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = help_type.pyste; sourceTree = "<group>"; };
-		DCC30F200762539D008F7A48 /* histogram.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = histogram.pyste; sourceTree = "<group>"; };
-		DCC30F210762539D008F7A48 /* indexed_block_struct.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = indexed_block_struct.pyste; sourceTree = "<group>"; };
-		DCC30F220762539D008F7A48 /* init_file.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = init_file.pyste; sourceTree = "<group>"; };
-		DCC30F230762539D008F7A48 /* inject_genebank.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = inject_genebank.pyste; sourceTree = "<group>"; };
-		DCC30F240762539D008F7A48 /* inject_genotype.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = inject_genotype.pyste; sourceTree = "<group>"; };
-		DCC30F250762539D008F7A48 /* inject_genotype_birth_data.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = inject_genotype_birth_data.pyste; sourceTree = "<group>"; };
-		DCC30F260762539D008F7A48 /* inject_genotype_control.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = inject_genotype_control.pyste; sourceTree = "<group>"; };
-		DCC30F270762539D008F7A48 /* inject_genotype_element.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = inject_genotype_element.pyste; sourceTree = "<group>"; };
-		DCC30F280762539D008F7A48 /* inject_genotype_queue.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = inject_genotype_queue.pyste; sourceTree = "<group>"; };
-		DCC30F290762539D008F7A48 /* inst_lib_base.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = inst_lib_base.pyste; sourceTree = "<group>"; };
-		DCC30F2A0762539D008F7A48 /* inst_lib_cpu.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = inst_lib_cpu.pyste; sourceTree = "<group>"; };
-		DCC30F2B0762539D008F7A48 /* inst_set.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = inst_set.pyste; sourceTree = "<group>"; };
-		DCC30F2C0762539D008F7A48 /* inst_util.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = inst_util.pyste; sourceTree = "<group>"; };
-		DCC30F2D0762539D008F7A48 /* instruction.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = instruction.pyste; sourceTree = "<group>"; };
-		DCC30F2E0762539D008F7A48 /* int_sum.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = int_sum.pyste; sourceTree = "<group>"; };
-		DCC30F2F0762539D008F7A48 /* integrated_schedule.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = integrated_schedule.pyste; sourceTree = "<group>"; };
-		DCC30F300762539D008F7A48 /* integrated_schedule_node.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = integrated_schedule_node.pyste; sourceTree = "<group>"; };
-		DCC30F340762539D008F7A48 /* landscape.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = landscape.pyste; sourceTree = "<group>"; };
-		DCC30F350762539D008F7A48 /* lineage.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = lineage.pyste; sourceTree = "<group>"; };
-		DCC30F360762539D008F7A48 /* lineage_control.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = lineage_control.pyste; sourceTree = "<group>"; };
-		DCC30F370762539D008F7A48 /* local_mutations.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = local_mutations.pyste; sourceTree = "<group>"; };
-		DCC30F380762539D008F7A48 /* memory_flags.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = memory_flags.pyste; sourceTree = "<group>"; };
-		DCC30F390762539D008F7A48 /* merit.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = merit.pyste; sourceTree = "<group>"; };
-		DCC30F3A0762539D008F7A48 /* mutation.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = mutation.pyste; sourceTree = "<group>"; };
-		DCC30F3B0762539D008F7A48 /* mutation_lib.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = mutation_lib.pyste; sourceTree = "<group>"; };
-		DCC30F3C0762539D008F7A48 /* mutation_rates.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = mutation_rates.pyste; sourceTree = "<group>"; };
-		DCC30F3D0762539D008F7A48 /* mx_code_array.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = mx_code_array.pyste; sourceTree = "<group>"; };
-		DCC30F3E0762539D008F7A48 /* my_code_array_less_than.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = my_code_array_less_than.pyste; sourceTree = "<group>"; };
-		DCC30F3F0762539D008F7A48 /* org_message.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = org_message.pyste; sourceTree = "<group>"; };
-		DCC30F400762539D008F7A48 /* organism.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = organism.pyste; sourceTree = "<group>"; };
-		DCC30F410762539D008F7A48 /* phenotype.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = phenotype.pyste; sourceTree = "<group>"; };
-		DCC30F430762539D008F7A48 /* population.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = population.pyste; sourceTree = "<group>"; };
-		DCC30F440762539D008F7A48 /* population_cell.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = population_cell.pyste; sourceTree = "<group>"; };
-		DCC30F450762539D008F7A48 /* population_event.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = population_event.pyste; sourceTree = "<group>"; };
-		DCC30F460762539D008F7A48 /* population_event_factory.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = population_event_factory.pyste; sourceTree = "<group>"; };
-		DCC30F470762539D008F7A48 /* population_interface-fixups.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = "population_interface-fixups.hh"; sourceTree = "<group>"; };
-		DCC30F480762539D008F7A48 /* population_interface.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = population_interface.pyste; sourceTree = "<group>"; };
-		DCC30F490762539D008F7A48 /* prob_schedule.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = prob_schedule.pyste; sourceTree = "<group>"; };
-		DCC30F4A0762539D008F7A48 /* py_avida_driver-fixups.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "py_avida_driver-fixups.cc"; sourceTree = "<group>"; };
-		DCC30F4B0762539D008F7A48 /* py_avida_driver.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = py_avida_driver.hh; sourceTree = "<group>"; };
-		DCC30F4C0762539D008F7A48 /* py_avida_driver.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = py_avida_driver.pyste; sourceTree = "<group>"; };
-		DCC30F4D0762539D008F7A48 /* py_doctest_driver.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = py_doctest_driver.py; sourceTree = "<group>"; };
-		DCC30F4E0762539D008F7A48 /* py_kaben_brainstorms_t.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = py_kaben_brainstorms_t.py; sourceTree = "<group>"; };
-		DCC30F4F0762539D008F7A48 /* py_unittest_driver.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = py_unittest_driver.py; sourceTree = "<group>"; };
-		DCC30F500762539D008F7A48 /* random.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = random.pyste; sourceTree = "<group>"; };
-		DCC30F510762539D008F7A48 /* reaction.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = reaction.pyste; sourceTree = "<group>"; };
-		DCC30F520762539D008F7A48 /* reaction_lib.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = reaction_lib.pyste; sourceTree = "<group>"; };
-		DCC30F530762539D008F7A48 /* reaction_process.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = reaction_process.pyste; sourceTree = "<group>"; };
-		DCC30F540762539D008F7A48 /* reaction_requisite.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = reaction_requisite.pyste; sourceTree = "<group>"; };
-		DCC30F550762539D008F7A48 /* reaction_result.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = reaction_result.pyste; sourceTree = "<group>"; };
-		DCC30F560762539D008F7A48 /* ref_block.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ref_block.pyste; sourceTree = "<group>"; };
-		DCC30F570762539D008F7A48 /* resource.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = resource.pyste; sourceTree = "<group>"; };
-		DCC30F580762539D008F7A48 /* resource_count.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = resource_count.pyste; sourceTree = "<group>"; };
-		DCC30F590762539D008F7A48 /* resource_lib.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = resource_lib.pyste; sourceTree = "<group>"; };
-		DCC30F5A0762539D008F7A48 /* running_average.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = running_average.pyste; sourceTree = "<group>"; };
-		DCC30F5B0762539D008F7A48 /* scaled_block.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = scaled_block.pyste; sourceTree = "<group>"; };
-		DCC30F5C0762539D008F7A48 /* schedule.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = schedule.pyste; sourceTree = "<group>"; };
-		DCC30F5D0762539D008F7A48 /* spatial_count_elem.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = spatial_count_elem.pyste; sourceTree = "<group>"; };
-		DCC30F5E0762539D008F7A48 /* spatial_res_count.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = spatial_res_count.pyste; sourceTree = "<group>"; };
-		DCC30F5F0762539D008F7A48 /* species.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = species.pyste; sourceTree = "<group>"; };
-		DCC30F600762539D008F7A48 /* species_control.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = species_control.pyste; sourceTree = "<group>"; };
-		DCC30F610762539D008F7A48 /* species_queue.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = species_queue.pyste; sourceTree = "<group>"; };
-		DCC30F620762539D008F7A48 /* stats.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = stats.pyste; sourceTree = "<group>"; };
-		DCC30F630762539D008F7A48 /* string.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = string.pyste; sourceTree = "<group>"; };
-		DCC30F640762539D008F7A48 /* string_iterator.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = string_iterator.pyste; sourceTree = "<group>"; };
-		DCC30F650762539D008F7A48 /* string_list.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = string_list.pyste; sourceTree = "<group>"; };
-		DCC30F660762539D008F7A48 /* string_util.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = string_util.pyste; sourceTree = "<group>"; };
-		DCC30F670762539D008F7A48 /* tArray.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = tArray.pyste; sourceTree = "<group>"; };
-		DCC30F680762539D008F7A48 /* tArray_instantiations.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = tArray_instantiations.hh; sourceTree = "<group>"; };
-		DCC30F690762539D008F7A48 /* task_entry.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = task_entry.pyste; sourceTree = "<group>"; };
-		DCC30F6A0762539D008F7A48 /* task_lib.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = task_lib.pyste; sourceTree = "<group>"; };
-		DCC30F6B0762539D008F7A48 /* tBuffer.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = tBuffer.pyste; sourceTree = "<group>"; };
-		DCC30F6C0762539D008F7A48 /* tBuffer_instantiations.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = tBuffer_instantiations.hh; sourceTree = "<group>"; };
-		DCC30F6D0762539D008F7A48 /* tDictionary.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = tDictionary.pyste; sourceTree = "<group>"; };
-		DCC30F6E0762539D008F7A48 /* tDictionary_instantiations.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = tDictionary_instantiations.hh; sourceTree = "<group>"; };
-		DCC30F6F0762539D008F7A48 /* test_cpu.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = test_cpu.pyste; sourceTree = "<group>"; };
-		DCC30F700762539D008F7A48 /* test_getting_started1.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = test_getting_started1.py; sourceTree = "<group>"; };
-		DCC30F710762539D008F7A48 /* test_getting_started2.py */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.python; path = test_getting_started2.py; sourceTree = "<group>"; };
-		DCC30F720762539D008F7A48 /* test_util.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = test_util.pyste; sourceTree = "<group>"; };
-		DCC30F730762539D008F7A48 /* tList.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = tList.pyste; sourceTree = "<group>"; };
-		DCC30F740762539D008F7A48 /* tList_instantiations.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = tList_instantiations.hh; sourceTree = "<group>"; };
-		DCC30F750762539D008F7A48 /* tMatrix.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = tMatrix.pyste; sourceTree = "<group>"; };
-		DCC30F760762539D008F7A48 /* tMatrix_instantiations.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = tMatrix_instantiations.hh; sourceTree = "<group>"; };
-		DCC30F770762539D008F7A48 /* tools.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = tools.pyste; sourceTree = "<group>"; };
-		DCC30F780762539D008F7A48 /* uint.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = uint.pyste; sourceTree = "<group>"; };
-		DCC30F790762539D008F7A48 /* weighted_index.pyste */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = weighted_index.pyste; sourceTree = "<group>"; };
-		DCC30F7A0762539D008F7A48 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
 		DCC30F7B0762539D008F7A48 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
 		DCC30FA90762539D008F7A48 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		DCC30FAC0762539D008F7A48 /* cpu.pri */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = cpu.pri; sourceTree = "<group>"; };
 		DCC30FCF0762539D008F7A48 /* Doxyfile */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Doxyfile; sourceTree = "<group>"; };
 		DCC30FEB0762539D008F7A48 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		DCC30FF00762539D008F7A48 /* event.pri */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = event.pri; sourceTree = "<group>"; };
 		DCC3109C0762539E008F7A48 /* avida.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = avida.cc; sourceTree = "<group>"; };
 		DCC310A90762539E008F7A48 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		DCC310F00762539E008F7A48 /* main.pro */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = main.pro; sourceTree = "<group>"; };
-		DCC310F10762539E008F7A48 /* main_sub.pri */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = main_sub.pri; sourceTree = "<group>"; };
 		DCC311090762539E008F7A48 /* primitive.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = primitive.cc; sourceTree = "<group>"; };
 		DCC311390762539E008F7A48 /* modules.pri */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = modules.pri; sourceTree = "<group>"; };
 		DCC3114B0762539E008F7A48 /* analyze.cfg */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = analyze.cfg; sourceTree = "<group>"; };
@@ -1191,7 +752,6 @@
 		DCC3129C076253A0008F7A48 /* block_struct.t.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = block_struct.t.cc; sourceTree = "<group>"; };
 		DCC3129D076253A0008F7A48 /* callback_util.t.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = callback_util.t.cc; sourceTree = "<group>"; };
 		DCC3129E076253A0008F7A48 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		DCC3129F076253A0008F7A48 /* config.t.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = config.t.cc; sourceTree = "<group>"; };
 		DCC312A0076253A0008F7A48 /* const_schedule.t.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = const_schedule.t.cc; sourceTree = "<group>"; };
 		DCC312A1076253A0008F7A48 /* cpu_head.t.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cpu_head.t.cc; sourceTree = "<group>"; };
 		DCC312A2076253A0008F7A48 /* cpu_memory.t.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cpu_memory.t.cc; sourceTree = "<group>"; };
@@ -1279,8 +839,6 @@
 		DCC31310076253A0008F7A48 /* phenotype.t.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = phenotype.t.cc; sourceTree = "<group>"; };
 		DCC31311076253A0008F7A48 /* population.t.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = population.t.cc; sourceTree = "<group>"; };
 		DCC31312076253A0008F7A48 /* population_cell.t.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = population_cell.t.cc; sourceTree = "<group>"; };
-		DCC31313076253A0008F7A48 /* population_event.t.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = population_event.t.cc; sourceTree = "<group>"; };
-		DCC31314076253A0008F7A48 /* population_event_factory.t.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = population_event_factory.t.cc; sourceTree = "<group>"; };
 		DCC31315076253A0008F7A48 /* population_interface.t.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = population_interface.t.cc; sourceTree = "<group>"; };
 		DCC31316076253A0008F7A48 /* prob_schedule.t.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = prob_schedule.t.cc; sourceTree = "<group>"; };
 		DCC31317076253A0008F7A48 /* random.t.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = random.t.cc; sourceTree = "<group>"; };
@@ -1404,38 +962,6 @@
 		DCC315CF076253A5008F7A48 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
 		DCC315D0076253A5008F7A48 /* task_event_gen.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = task_event_gen.cc; sourceTree = "<group>"; };
 		DCC315D1076253A5008F7A48 /* task_event_gen.old.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = task_event_gen.old.cc; sourceTree = "<group>"; };
-		DCC315F6076253A5008F7A48 /* ansi.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ansi.cc; sourceTree = "<group>"; };
-		DCC315F7076253A5008F7A48 /* ansi.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = ansi.hh; sourceTree = "<group>"; };
-		DCC315F8076253A5008F7A48 /* bar_screen.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = bar_screen.cc; sourceTree = "<group>"; };
-		DCC315F9076253A5008F7A48 /* bar_screen.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = bar_screen.hh; sourceTree = "<group>"; };
-		DCC315FA076253A5008F7A48 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		DCC315FB076253A5008F7A48 /* environment_screen.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = environment_screen.cc; sourceTree = "<group>"; };
-		DCC315FC076253A5008F7A48 /* environment_screen.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = environment_screen.hh; sourceTree = "<group>"; };
-		DCC315FD076253A5008F7A48 /* hist_screen.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = hist_screen.cc; sourceTree = "<group>"; };
-		DCC315FE076253A5008F7A48 /* hist_screen.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = hist_screen.hh; sourceTree = "<group>"; };
-		DCC315FF076253A5008F7A48 /* key_chart */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = key_chart; sourceTree = "<group>"; };
-		DCC31601076253A5008F7A48 /* map_screen.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = map_screen.cc; sourceTree = "<group>"; };
-		DCC31602076253A5008F7A48 /* map_screen.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = map_screen.hh; sourceTree = "<group>"; };
-		DCC31603076253A5008F7A48 /* menu.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = menu.cc; sourceTree = "<group>"; };
-		DCC31604076253A5008F7A48 /* menu.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = menu.hh; sourceTree = "<group>"; };
-		DCC31605076253A5008F7A48 /* ncurses.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ncurses.cc; sourceTree = "<group>"; };
-		DCC31606076253A5008F7A48 /* ncurses.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = ncurses.hh; sourceTree = "<group>"; };
-		DCC31607076253A5008F7A48 /* options_screen.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = options_screen.cc; sourceTree = "<group>"; };
-		DCC31608076253A5008F7A48 /* options_screen.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = options_screen.hh; sourceTree = "<group>"; };
-		DCC31609076253A5008F7A48 /* stats_screen.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = stats_screen.cc; sourceTree = "<group>"; };
-		DCC3160A076253A5008F7A48 /* stats_screen.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = stats_screen.hh; sourceTree = "<group>"; };
-		DCC3160B076253A5008F7A48 /* symbol_util.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = symbol_util.cc; sourceTree = "<group>"; };
-		DCC3160C076253A5008F7A48 /* symbol_util.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = symbol_util.hh; sourceTree = "<group>"; };
-		DCC3160D076253A5008F7A48 /* text_screen.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = text_screen.cc; sourceTree = "<group>"; };
-		DCC3160E076253A5008F7A48 /* text_screen.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = text_screen.hh; sourceTree = "<group>"; };
-		DCC3160F076253A5008F7A48 /* text_window.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = text_window.hh; sourceTree = "<group>"; };
-		DCC31610076253A5008F7A48 /* view.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = view.cc; sourceTree = "<group>"; };
-		DCC31611076253A5008F7A48 /* view.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = view.hh; sourceTree = "<group>"; };
-		DCC31612076253A5008F7A48 /* viewer.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = viewer.cc; sourceTree = "<group>"; };
-		DCC31613076253A5008F7A48 /* viewer.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = viewer.hh; sourceTree = "<group>"; };
-		DCC31614076253A5008F7A48 /* viewers.pro */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = viewers.pro; sourceTree = "<group>"; };
-		DCC31615076253A5008F7A48 /* zoom_screen.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = zoom_screen.cc; sourceTree = "<group>"; };
-		DCC31616076253A5008F7A48 /* zoom_screen.hh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = zoom_screen.hh; sourceTree = "<group>"; };
 		DCC3164D07626CF3008F7A48 /* primitive */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = primitive; sourceTree = BUILT_PRODUCTS_DIR; };
 /* End PBXFileReference section */
 
@@ -1458,216 +984,6 @@
 /* End PBXFrameworksBuildPhase section */
 
 /* Begin PBXGroup section */
-		70CD471A089692200070D2DF /* python */ = {
-			isa = PBXGroup;
-			children = (
-				70CD471B089692200070D2DF /* AvidaEd-osx.py */,
-				70CD471C089692200070D2DF /* AvidaGui2 */,
-				70CD47C1089692210070D2DF /* CMakeLists.txt */,
-				70CD47C2089692210070D2DF /* default.workspace */,
-				70CD47CF089692210070D2DF /* pmock.py */,
-				70CD47D0089692210070D2DF /* setup_osx.py.in */,
-			);
-			path = python;
-			sourceTree = "<group>";
-		};
-		70CD471C089692200070D2DF /* AvidaGui2 */ = {
-			isa = PBXGroup;
-			children = (
-				70CD471D089692200070D2DF /* __init__.py */,
-				70CD471E089692200070D2DF /* _Custom_Widgets.cw */,
-				70CD471F089692200070D2DF /* Analyze.png */,
-				70CD4720089692200070D2DF /* Analyze16.png */,
-				70CD4721089692200070D2DF /* Analyze24.png */,
-				70CD4722089692200070D2DF /* Analyze32.png */,
-				70CD4723089692200070D2DF /* Analyze48.png */,
-				70CD4724089692200070D2DF /* Analyze64.png */,
-				70CD4725089692200070D2DF /* Avida_ED_startup.py */,
-				70CD4726089692200070D2DF /* Avida_ED_startup_utils.py */,
-				70CD472A089692200070D2DF /* avidalogo.jpg */,
-				70CD472B089692200070D2DF /* avidalogo.png */,
-				70CD472C089692200070D2DF /* checkuic.py */,
-				70CD472D089692200070D2DF /* EmptyPetri128.png */,
-				70CD472E089692200070D2DF /* EmptyPetri16.png */,
-				70CD472F089692200070D2DF /* EmptyPetri24.png */,
-				70CD4730089692200070D2DF /* EmptyPetri32.png */,
-				70CD4731089692200070D2DF /* EmptyPetri48.png */,
-				70CD4732089692200070D2DF /* EmptyPetri64.png */,
-				70CD4733089692200070D2DF /* EmptyPetriDish.gif */,
-				70CD4734089692200070D2DF /* Flip15.png */,
-				70CD4735089692200070D2DF /* Flip28.png */,
-				70CD4736089692200070D2DF /* Flip30.png */,
-				70CD4737089692200070D2DF /* Flip40.png */,
-				70CD4738089692200070D2DF /* FullPetriDish.gif */,
-				70CD4739089692200070D2DF /* FunctionalTest_recursive_tests.py */,
-				70CD473A089692200070D2DF /* next_active.png */,
-				70CD473B089692200070D2DF /* next_blue.png */,
-				70CD473C089692200070D2DF /* Organism.png */,
-				70CD473D089692200070D2DF /* Organism32.1.png */,
-				70CD473E089692200070D2DF /* Organism32.2.png */,
-				70CD473F089692200070D2DF /* Organism32.3.png */,
-				70CD4740089692200070D2DF /* Organism32.4.png */,
-				70CD4741089692200070D2DF /* Organism32.5.png */,
-				70CD4742089692200070D2DF /* Organism32.png */,
-				70CD4743089692200070D2DF /* Organism65.png */,
-				70CD4744089692200070D2DF /* pause.png */,
-				70CD4745089692200070D2DF /* pause_blue.png */,
-				70CD4746089692200070D2DF /* Petri128.png */,
-				70CD4747089692200070D2DF /* Petri16.png */,
-				70CD4748089692200070D2DF /* Petri24.png */,
-				70CD4749089692200070D2DF /* Petri32.png */,
-				70CD474A089692200070D2DF /* Petri48.png */,
-				70CD474B089692200070D2DF /* Petri64.png */,
-				70CD474C089692200070D2DF /* play.png */,
-				70CD474D089692200070D2DF /* play_blue.png */,
-				70CD474E089692200070D2DF /* previous_active.png */,
-				70CD474F089692200070D2DF /* previous_blue.png */,
-				70CD4750089692200070D2DF /* py_recursive_tests_support.py */,
-				70CD4751089692200070D2DF /* py_test_utils.py */,
-				70CD4752089692200070D2DF /* pyAnalyzeControlsCtrl.py */,
-				70CD4753089692200070D2DF /* pyAnalyzeControlsView.ui */,
-				70CD4754089692200070D2DF /* pyAvida.py */,
-				70CD4755089692200070D2DF /* pyAvidaCoreData.py */,
-				70CD4756089692200070D2DF /* pyAvidaStatsInterface.py */,
-				70CD4757089692200070D2DF /* pyAvidaThreadedDriver.py */,
-				70CD4758089692200070D2DF /* pyEduMainCtrl.py */,
-				70CD4759089692200070D2DF /* pyEduMainMenuBarHdlr.py */,
-				70CD475A089692200070D2DF /* pyEduSessionMenuBarHdlr.py */,
-				70CD475B089692200070D2DF /* pyEduWorkspaceCtrl.py */,
-				70CD475C089692210070D2DF /* pyEduWorkspaceView.ui */,
-				70CD475D089692210070D2DF /* pyFreezeDialogCtrl.py */,
-				70CD475E089692210070D2DF /* pyFreezeDialogView.ui */,
-				70CD475F089692210070D2DF /* pyFreezeOrganismCtrl.py */,
-				70CD4760089692210070D2DF /* pyFreezeOrganismView.ui */,
-				70CD4761089692210070D2DF /* pyFreezerCtrl.py */,
-				70CD4762089692210070D2DF /* pyFreezerView.ui */,
-				70CD4763089692210070D2DF /* pyGradientScaleCtrl.py */,
-				70CD4764089692210070D2DF /* pyGradientScaleView.py */,
-				70CD4765089692210070D2DF /* pyGraphCtrl.py */,
-				70CD4766089692210070D2DF /* pyGraphView.ui */,
-				70CD4767089692210070D2DF /* pyHardwareCPUTrace.py */,
-				70CD4768089692210070D2DF /* pyHardwareTracer.py */,
-				70CD4769089692210070D2DF /* pyInstructionSet.py */,
-				70CD476A089692210070D2DF /* pyLiveControlsCtrl.py */,
-				70CD476B089692210070D2DF /* pyLiveControlsView.ui */,
-				70CD476C089692210070D2DF /* pyMainControllerFactory.py */,
-				70CD476D089692210070D2DF /* pyMapProfile.py */,
-				70CD476E089692210070D2DF /* pyMdtr.py */,
-				70CD476F089692210070D2DF /* pyNavBarCtrl.py */,
-				70CD4770089692210070D2DF /* pyNavBarView.ui */,
-				70CD4771089692210070D2DF /* pyOneAna_GraphCtrl.py */,
-				70CD4772089692210070D2DF /* pyOneAna_GraphView.ui */,
-				70CD4773089692210070D2DF /* pyOneAna_PetriDishCtrl.py */,
-				70CD4774089692210070D2DF /* pyOneAna_PetriDishView.ui */,
-				70CD4775089692210070D2DF /* pyOneAna_StatsCtrl.py */,
-				70CD4776089692210070D2DF /* pyOneAna_StatsView.ui */,
-				70CD4777089692210070D2DF /* pyOneAna_TimelineCtrl.py */,
-				70CD4778089692210070D2DF /* pyOneAna_TimelineView.ui */,
-				70CD4779089692210070D2DF /* pyOneAnalyzeCtrl.py */,
-				70CD477A089692210070D2DF /* pyOneAnalyzeView.ui */,
-				70CD477B089692210070D2DF /* pyOneOrg_ScopeCtrl.py */,
-				70CD477C089692210070D2DF /* pyOneOrg_ScopeView.ui */,
-				70CD477D089692210070D2DF /* pyOneOrganismCtrl.py */,
-				70CD477E089692210070D2DF /* pyOneOrganismView.ui */,
-				70CD477F089692210070D2DF /* pyOnePop_GraphCtrl.py */,
-				70CD4780089692210070D2DF /* pyOnePop_GraphView.ui */,
-				70CD4781089692210070D2DF /* pyOnePop_PetriDishCtrl.py */,
-				70CD4782089692210070D2DF /* pyOnePop_PetriDishView.ui */,
-				70CD4783089692210070D2DF /* pyOnePop_StatsCtrl.py */,
-				70CD4784089692210070D2DF /* pyOnePop_StatsView.ui */,
-				70CD4785089692210070D2DF /* pyOnePop_TimelineCtrl.py */,
-				70CD4786089692210070D2DF /* pyOnePop_TimelineView.ui */,
-				70CD4787089692210070D2DF /* pyOnePopulationCtrl.py */,
-				70CD4788089692210070D2DF /* pyOnePopulationView.ui */,
-				70CD4789089692210070D2DF /* pyOrganismScopeCtrl.py */,
-				70CD478A089692210070D2DF /* pyOrganismScopeView.py */,
-				70CD478B089692210070D2DF /* pyOrgSquareCtrl.py */,
-				70CD478C089692210070D2DF /* pyOrgSquareView.ui */,
-				70CD478D089692210070D2DF /* pyPetriCanvasView.py */,
-				70CD478E089692210070D2DF /* pyPetriConfigureCtrl.py */,
-				70CD478F089692210070D2DF /* pyPetriConfigureView.ui */,
-				70CD4790089692210070D2DF /* pyPetriDishCtrl.py */,
-				70CD4791089692210070D2DF /* pyPetriDishView.ui */,
-				70CD4792089692210070D2DF /* pyPopulationCellItem.py */,
-				70CD4793089692210070D2DF /* pyQuitDialogCtrl.py */,
-				70CD4794089692210070D2DF /* pyQuitDialogView.ui */,
-				70CD4795089692210070D2DF /* pyReadFreezer.py */,
-				70CD4796089692210070D2DF /* pySessionControllerFactory.py */,
-				70CD4797089692210070D2DF /* pySessionCtrl.py */,
-				70CD4798089692210070D2DF /* pySessionWorkThreadHdlr.py */,
-				70CD4799089692210070D2DF /* pyTemporaryReloads.py */,
-				70CD479A089692210070D2DF /* pyTest.ui */,
-				70CD479B089692210070D2DF /* pyTestCase.py */,
-				70CD479C089692210070D2DF /* pyTimelineCtrl.py */,
-				70CD479D089692210070D2DF /* pyTimelineView.ui */,
-				70CD479E089692210070D2DF /* pyTwoAnalyzeCtrl.py */,
-				70CD479F089692210070D2DF /* pyTwoAnalyzeView.ui */,
-				70CD47A0089692210070D2DF /* pyTwoOrg_VivisectionCtrl.py */,
-				70CD47A1089692210070D2DF /* pyTwoOrg_VivisectionView.ui */,
-				70CD47A2089692210070D2DF /* pyTwoOrganismCtrl.py */,
-				70CD47A3089692210070D2DF /* pyTwoOrganismView.ui */,
-				70CD47A4089692210070D2DF /* pyTwoPop_GraphCtrl.py */,
-				70CD47A5089692210070D2DF /* pyTwoPop_GraphView.ui */,
-				70CD47A6089692210070D2DF /* pyTwoPop_PetriDishesCtrl.py */,
-				70CD47A7089692210070D2DF /* pyTwoPop_PetriDishesView.ui */,
-				70CD47A8089692210070D2DF /* pyTwoPop_StatsCtrl.py */,
-				70CD47A9089692210070D2DF /* pyTwoPop_StatsView.ui */,
-				70CD47AA089692210070D2DF /* pyTwoPop_TimelineCtrl.py */,
-				70CD47AB089692210070D2DF /* pyTwoPop_TimelineView.ui */,
-				70CD47AC089692210070D2DF /* pyTwoPopulationCtrl.py */,
-				70CD47AD089692210070D2DF /* pyTwoPopulationView.ui */,
-				70CD47AE089692210070D2DF /* pyUnitTestSuite.py */,
-				70CD47AF089692210070D2DF /* pyUnitTestSuiteRecurser.py */,
-				70CD47B0089692210070D2DF /* pyWriteGenesisEvent.py */,
-				70CD47B1089692210070D2DF /* pyWriteToFreezer.py */,
-				70CD47B2089692210070D2DF /* skip_forward_active.png */,
-				70CD47B3089692210070D2DF /* skip_forward_blue.png */,
-				70CD47B4089692210070D2DF /* skip_previous_active.png */,
-				70CD47B5089692210070D2DF /* skip_previous_blue.png */,
-				70CD47B6089692210070D2DF /* smlEmptyPetriDish.gif */,
-				70CD47B7089692210070D2DF /* smlEmptyPetriDish.png */,
-				70CD47B8089692210070D2DF /* smlFullPetriDish.gif */,
-				70CD47B9089692210070D2DF /* smlFullPetriDish.png */,
-				70CD47BA089692210070D2DF /* topicbiotech.gif */,
-				70CD47BB089692210070D2DF /* trnsEmptyPetriDish.gif */,
-				70CD47BC089692210070D2DF /* UnitTest_py_test_utils.py */,
-				70CD47BD089692210070D2DF /* UnitTest_pyEduMainCtrl.py */,
-				70CD47BE089692210070D2DF /* UnitTest_pyTestCase.py */,
-				70CD47BF089692210070D2DF /* UnitTest_pyUnitTestSuiteRecurser.py */,
-			);
-			path = AvidaGui2;
-			sourceTree = "<group>";
-		};
-		70CD47C2089692210070D2DF /* default.workspace */ = {
-			isa = PBXGroup;
-			children = (
-				70CD47C5089692210070D2DF /* environment.default */,
-				70CD47C6089692210070D2DF /* events.default */,
-				70CD47C7089692210070D2DF /* freezer */,
-				70CD47CD089692210070D2DF /* genesis.default */,
-				70CD47CE089692210070D2DF /* inst_set.default */,
-			);
-			path = default.workspace;
-			sourceTree = "<group>";
-		};
-		70CD47C7089692210070D2DF /* freezer */ = {
-			isa = PBXGroup;
-			children = (
-				70CD47C8089692210070D2DF /* default.empty */,
-				70CD47C9089692210070D2DF /* default.organism */,
-				70CD47CA089692210070D2DF /* no_mutations.empty */,
-				70CD47CB089692210070D2DF /* Update200.full */,
-			);
-			path = freezer;
-			sourceTree = "<group>";
-		};
-		70CD47CB089692210070D2DF /* Update200.full */ = {
-			isa = PBXGroup;
-			children = (
-			);
-			path = Update200.full;
-			sourceTree = "<group>";
-		};
 		DCC30C490762532C008F7A48 = {
 			isa = PBXGroup;
 			children = (
@@ -1682,17 +998,14 @@
 		DCC30C670762539A008F7A48 /* Source */ = {
 			isa = PBXGroup;
 			children = (
-				DCC30C710762539A008F7A48 /* bindings */,
 				DCC30F7C0762539D008F7A48 /* cpu */,
 				DCC30FD00762539D008F7A48 /* event */,
 				DCC310040762539D008F7A48 /* main */,
-				70CD471A089692200070D2DF /* python */,
 				DCC3113A0762539E008F7A48 /* support */,
 				DCC311990762539F008F7A48 /* testsuites */,
 				DCC31340076253A0008F7A48 /* third-party */,
 				DCC314D8076253A2008F7A48 /* tools */,
 				DCC315B6076253A5008F7A48 /* utils */,
-				DCC315D2076253A5008F7A48 /* viewers */,
 				DCC30F7B0762539D008F7A48 /* CMakeLists.txt */,
 				701384A10902A16F0087ED2E /* defs.h */,
 				DCC30FCF0762539D008F7A48 /* Doxyfile */,
@@ -1702,272 +1015,11 @@
 			path = source;
 			sourceTree = "<group>";
 		};
-		DCC30C710762539A008F7A48 /* bindings */ = {
-			isa = PBXGroup;
-			children = (
-				DCC30C750762539A008F7A48 /* Boost.Python */,
-				DCC30F7A0762539D008F7A48 /* CMakeLists.txt */,
-			);
-			path = bindings;
-			sourceTree = "<group>";
-		};
-		DCC30C750762539A008F7A48 /* Boost.Python */ = {
-			isa = PBXGroup;
-			children = (
-				707A68B808E37D5900576968 /* hardware_tracer_smt.pyste */,
-				70C1F11108C40D6100F50912 /* nHardwareCPU.pyste */,
-				70C1F10F08C40D2D00F50912 /* nHardwareCPU-fixups.cc */,
-				70C1F11008C40D2D00F50912 /* nHardwareCPU-fixups.h */,
-				70CD47DA089692AE0070D2DF /* AvidaPyste.py */,
-				70CD47DB089692AE0070D2DF /* change_list.pyste */,
-				70CD47DF089692AE0070D2DF /* cpu_head-fixups.cc */,
-				70CD47E0089692AE0070D2DF /* cpu_head-fixups.hh */,
-				70CD47E1089692AE0070D2DF /* cpu_memory-fixups.cc */,
-				70CD47E2089692AE0070D2DF /* cpu_memory-fixups.hh */,
-				70CD47E3089692AE0070D2DF /* hardware_status_printer.pyste */,
-				70CD47E4089692AE0070D2DF /* hardware_tracer_4stack.pyste */,
-				70CD47E5089692AE0070D2DF /* hardware_tracer_cpu.pyste */,
-				70CD47E6089692AE0070D2DF /* hardware_tracer_test_cpu.pyste */,
-				70CD47E7089692AE0070D2DF /* hardware_tracer.pyste */,
-				70CD47E8089692AE0070D2DF /* py_hardware_tracer-fixups.cc */,
-				70CD47E9089692AE0070D2DF /* py_hardware_tracer.hh */,
-				70CD47EA089692AE0070D2DF /* py_hardware_tracer.pyste */,
-				70CD47EB089692AE0070D2DF /* resource_count-fixups.cc */,
-				70CD47EC089692AE0070D2DF /* resource_count-fixups.hh */,
-				70CD47ED089692AE0070D2DF /* test_cpu-fixups.cc */,
-				70CD47EE089692AE0070D2DF /* test_cpu-fixups.hh */,
-				70CD47EF089692AE0070D2DF /* tVector_instantiations.hh */,
-				70CD47F0089692AE0070D2DF /* tVector.pyste */,
-				DCC30D300762539B008F7A48 /* 4stack_head.pyste */,
-				DCC30D310762539B008F7A48 /* A.hh */,
-				DCC30D320762539B008F7A48 /* A.pyste */,
-				DCC30D330762539B008F7A48 /* AB.cc */,
-				DCC30D340762539B008F7A48 /* analyze.pyste */,
-				DCC30D350762539B008F7A48 /* analyze_command.pyste */,
-				DCC30D360762539B008F7A48 /* analyze_command_def.pyste */,
-				DCC30D370762539B008F7A48 /* analyze_command_def_base.pyste */,
-				DCC30D380762539B008F7A48 /* analyze_flow_command.pyste */,
-				DCC30D390762539B008F7A48 /* analyze_flow_command_def.pyste */,
-				DCC30D3A0762539B008F7A48 /* analyze_function.pyste */,
-				DCC30D3B0762539B008F7A48 /* analyze_genotype.pyste */,
-				DCC30D3C0762539B008F7A48 /* analyze_util.pyste */,
-				DCC30D3D0762539B008F7A48 /* avida-fixups.hh */,
-				DCC30D3E0762539B008F7A48 /* avida.pyste */,
-				DCC30D3F0762539B008F7A48 /* avida_driver_analyze.pyste */,
-				DCC30D400762539B008F7A48 /* avida_driver_base.pyste */,
-				DCC30D410762539B008F7A48 /* avida_driver_population.pyste */,
-				DCC30D420762539B008F7A48 /* avida_triggers.pyste */,
-				DCC30D430762539B008F7A48 /* AvidaGui */,
-				DCC30ED70762539D008F7A48 /* B.hh */,
-				DCC30ED80762539D008F7A48 /* B.pyste */,
-				DCC30ED90762539D008F7A48 /* birth_chamber.pyste */,
-				DCC30EDA0762539D008F7A48 /* block_struct.pyste */,
-				DCC30EDE0762539D008F7A48 /* callback_util.pyste */,
-				DCC30EDF0762539D008F7A48 /* cCycleCheck.pyste */,
-				DCC30EE00762539D008F7A48 /* cID.pyste */,
-				DCC30EE10762539D008F7A48 /* cmake_entries */,
-				DCC30EE20762539D008F7A48 /* CMakeLists.txt */,
-				DCC30EE30762539D008F7A48 /* code_label.pyste */,
-				DCC30EE40762539D008F7A48 /* config.pyste */,
-				DCC30EE50762539D008F7A48 /* const_schedule.pyste */,
-				DCC30EE60762539D008F7A48 /* count_tracker.pyste */,
-				DCC30EE70762539D008F7A48 /* cpu_head.pyste */,
-				DCC30EE80762539D008F7A48 /* cpu_memory.pyste */,
-				DCC30EE90762539D008F7A48 /* cpu_stack.pyste */,
-				DCC30EEA0762539D008F7A48 /* cpu_stats.pyste */,
-				DCC30EEB0762539D008F7A48 /* cpu_test_info.pyste */,
-				DCC30EEC0762539D008F7A48 /* cStringable.pyste */,
-				DCC30EED0762539D008F7A48 /* cTestCase.pyste */,
-				DCC30EEE0762539D008F7A48 /* cTestProblem.pyste */,
-				DCC30EEF0762539D008F7A48 /* cTestResult.pyste */,
-				DCC30EF00762539D008F7A48 /* cTextTestInterpreter.pyste */,
-				DCC30EF10762539D008F7A48 /* data_entry.pyste */,
-				DCC30EF20762539D008F7A48 /* data_file.pyste */,
-				DCC30EF30762539D008F7A48 /* data_file_manager.pyste */,
-				DCC30EF40762539D008F7A48 /* data_manager_base.pyste */,
-				DCC30EF50762539D008F7A48 /* double_sum.pyste */,
-				DCC30EF60762539D008F7A48 /* environment.pyste */,
-				DCC30EF70762539D008F7A48 /* event.pyste */,
-				DCC30EF90762539D008F7A48 /* event_factory_manager.pyste */,
-				DCC30EFA0762539D008F7A48 /* event_list.pyste */,
-				DCC30EFB0762539D008F7A48 /* event_list_entry.pyste */,
-				DCC30EFC0762539D008F7A48 /* event_list_iterator.pyste */,
-				DCC30EFD0762539D008F7A48 /* event_triggers.pyste */,
-				DCC30EFE0762539D008F7A48 /* file-fixups.cc */,
-				DCC30EFF0762539D008F7A48 /* file-fixups.hh */,
-				DCC30F000762539D008F7A48 /* file.pyste */,
-				DCC30F010762539D008F7A48 /* fitness_matrix.pyste */,
-				DCC30F020762539D008F7A48 /* fixed_block.pyste */,
-				DCC30F030762539D008F7A48 /* fixed_coords.pyste */,
-				DCC30F040762539D008F7A48 /* genebank.pyste */,
-				DCC30F050762539D008F7A48 /* generatePysteFiles.py */,
-				DCC30F060762539D008F7A48 /* genesis-fixups.cc */,
-				DCC30F070762539D008F7A48 /* genesis-fixups.hh */,
-				DCC30F080762539D008F7A48 /* genesis.pyste */,
-				DCC30F090762539D008F7A48 /* genome.pyste */,
-				DCC30F0A0762539D008F7A48 /* genome_util.pyste */,
-				DCC30F0B0762539D008F7A48 /* genotype.pyste */,
-				DCC30F0C0762539D008F7A48 /* genotype_batch.pyste */,
-				DCC30F0D0762539D008F7A48 /* genotype_birth_data.pyste */,
-				DCC30F0E0762539D008F7A48 /* genotype_control.pyste */,
-				DCC30F0F0762539D008F7A48 /* genotype_test_data.pyste */,
-				DCC30F100762539D008F7A48 /* getting_started1.cpp */,
-				DCC30F110762539D008F7A48 /* getting_started2.cpp */,
-				DCC30F120762539D008F7A48 /* hardware_4stack.pyste */,
-				DCC30F130762539D008F7A48 /* hardware_4stack_thread.pyste */,
-				DCC30F140762539D008F7A48 /* hardware_base.pyste */,
-				DCC30F150762539D008F7A48 /* hardware_cpu-fixups.cc */,
-				DCC30F160762539D008F7A48 /* hardware_cpu-fixups.hh */,
-				DCC30F170762539D008F7A48 /* hardware_cpu.pyste */,
-				DCC30F180762539D008F7A48 /* hardware_cpu_thread.pyste */,
-				DCC30F190762539D008F7A48 /* hardware_factory.pyste */,
-				DCC30F1A0762539D008F7A48 /* hardware_util.pyste */,
-				DCC30F1B0762539D008F7A48 /* help_alias.pyste */,
-				DCC30F1C0762539D008F7A48 /* help_entry.pyste */,
-				DCC30F1D0762539D008F7A48 /* help_full_entry.pyste */,
-				DCC30F1E0762539D008F7A48 /* help_manager.pyste */,
-				DCC30F1F0762539D008F7A48 /* help_type.pyste */,
-				DCC30F200762539D008F7A48 /* histogram.pyste */,
-				DCC30F210762539D008F7A48 /* indexed_block_struct.pyste */,
-				DCC30F220762539D008F7A48 /* init_file.pyste */,
-				DCC30F230762539D008F7A48 /* inject_genebank.pyste */,
-				DCC30F240762539D008F7A48 /* inject_genotype.pyste */,
-				DCC30F250762539D008F7A48 /* inject_genotype_birth_data.pyste */,
-				DCC30F260762539D008F7A48 /* inject_genotype_control.pyste */,
-				DCC30F270762539D008F7A48 /* inject_genotype_element.pyste */,
-				DCC30F280762539D008F7A48 /* inject_genotype_queue.pyste */,
-				DCC30F290762539D008F7A48 /* inst_lib_base.pyste */,
-				DCC30F2A0762539D008F7A48 /* inst_lib_cpu.pyste */,
-				DCC30F2B0762539D008F7A48 /* inst_set.pyste */,
-				DCC30F2C0762539D008F7A48 /* inst_util.pyste */,
-				DCC30F2D0762539D008F7A48 /* instruction.pyste */,
-				DCC30F2E0762539D008F7A48 /* int_sum.pyste */,
-				DCC30F2F0762539D008F7A48 /* integrated_schedule.pyste */,
-				DCC30F300762539D008F7A48 /* integrated_schedule_node.pyste */,
-				DCC30F340762539D008F7A48 /* landscape.pyste */,
-				DCC30F350762539D008F7A48 /* lineage.pyste */,
-				DCC30F360762539D008F7A48 /* lineage_control.pyste */,
-				DCC30F370762539D008F7A48 /* local_mutations.pyste */,
-				DCC30F380762539D008F7A48 /* memory_flags.pyste */,
-				DCC30F390762539D008F7A48 /* merit.pyste */,
-				DCC30F3A0762539D008F7A48 /* mutation.pyste */,
-				DCC30F3B0762539D008F7A48 /* mutation_lib.pyste */,
-				DCC30F3C0762539D008F7A48 /* mutation_rates.pyste */,
-				DCC30F3D0762539D008F7A48 /* mx_code_array.pyste */,
-				DCC30F3E0762539D008F7A48 /* my_code_array_less_than.pyste */,
-				DCC30F3F0762539D008F7A48 /* org_message.pyste */,
-				DCC30F400762539D008F7A48 /* organism.pyste */,
-				DCC30F410762539D008F7A48 /* phenotype.pyste */,
-				DCC30F430762539D008F7A48 /* population.pyste */,
-				DCC30F440762539D008F7A48 /* population_cell.pyste */,
-				DCC30F450762539D008F7A48 /* population_event.pyste */,
-				DCC30F460762539D008F7A48 /* population_event_factory.pyste */,
-				DCC30F470762539D008F7A48 /* population_interface-fixups.hh */,
-				DCC30F480762539D008F7A48 /* population_interface.pyste */,
-				DCC30F490762539D008F7A48 /* prob_schedule.pyste */,
-				DCC30F4A0762539D008F7A48 /* py_avida_driver-fixups.cc */,
-				DCC30F4B0762539D008F7A48 /* py_avida_driver.hh */,
-				DCC30F4C0762539D008F7A48 /* py_avida_driver.pyste */,
-				DCC30F4D0762539D008F7A48 /* py_doctest_driver.py */,
-				DCC30F4E0762539D008F7A48 /* py_kaben_brainstorms_t.py */,
-				DCC30F4F0762539D008F7A48 /* py_unittest_driver.py */,
-				DCC30F500762539D008F7A48 /* random.pyste */,
-				DCC30F510762539D008F7A48 /* reaction.pyste */,
-				DCC30F520762539D008F7A48 /* reaction_lib.pyste */,
-				DCC30F530762539D008F7A48 /* reaction_process.pyste */,
-				DCC30F540762539D008F7A48 /* reaction_requisite.pyste */,
-				DCC30F550762539D008F7A48 /* reaction_result.pyste */,
-				DCC30F560762539D008F7A48 /* ref_block.pyste */,
-				DCC30F570762539D008F7A48 /* resource.pyste */,
-				DCC30F580762539D008F7A48 /* resource_count.pyste */,
-				DCC30F590762539D008F7A48 /* resource_lib.pyste */,
-				DCC30F5A0762539D008F7A48 /* running_average.pyste */,
-				DCC30F5B0762539D008F7A48 /* scaled_block.pyste */,
-				DCC30F5C0762539D008F7A48 /* schedule.pyste */,
-				DCC30F5D0762539D008F7A48 /* spatial_count_elem.pyste */,
-				DCC30F5E0762539D008F7A48 /* spatial_res_count.pyste */,
-				DCC30F5F0762539D008F7A48 /* species.pyste */,
-				DCC30F600762539D008F7A48 /* species_control.pyste */,
-				DCC30F610762539D008F7A48 /* species_queue.pyste */,
-				DCC30F620762539D008F7A48 /* stats.pyste */,
-				DCC30F630762539D008F7A48 /* string.pyste */,
-				DCC30F640762539D008F7A48 /* string_iterator.pyste */,
-				DCC30F650762539D008F7A48 /* string_list.pyste */,
-				DCC30F660762539D008F7A48 /* string_util.pyste */,
-				DCC30F670762539D008F7A48 /* tArray.pyste */,
-				DCC30F680762539D008F7A48 /* tArray_instantiations.hh */,
-				DCC30F690762539D008F7A48 /* task_entry.pyste */,
-				DCC30F6A0762539D008F7A48 /* task_lib.pyste */,
-				DCC30F6B0762539D008F7A48 /* tBuffer.pyste */,
-				DCC30F6C0762539D008F7A48 /* tBuffer_instantiations.hh */,
-				DCC30F6D0762539D008F7A48 /* tDictionary.pyste */,
-				DCC30F6E0762539D008F7A48 /* tDictionary_instantiations.hh */,
-				DCC30F6F0762539D008F7A48 /* test_cpu.pyste */,
-				DCC30F700762539D008F7A48 /* test_getting_started1.py */,
-				DCC30F710762539D008F7A48 /* test_getting_started2.py */,
-				DCC30F720762539D008F7A48 /* test_util.pyste */,
-				DCC30F730762539D008F7A48 /* tList.pyste */,
-				DCC30F740762539D008F7A48 /* tList_instantiations.hh */,
-				DCC30F750762539D008F7A48 /* tMatrix.pyste */,
-				DCC30F760762539D008F7A48 /* tMatrix_instantiations.hh */,
-				DCC30F770762539D008F7A48 /* tools.pyste */,
-				DCC30F780762539D008F7A48 /* uint.pyste */,
-				DCC30F790762539D008F7A48 /* weighted_index.pyste */,
-				70C1F0C608C4012700F50912 /* nHardware-fixups.h */,
-				70C1F0C708C4012700F50912 /* nHardware-fixups.cc */,
-				70C1F10008C40BEF00F50912 /* nHardware.pyste */,
-			);
-			path = Boost.Python;
-			sourceTree = "<group>";
-		};
-		DCC30D430762539B008F7A48 /* AvidaGui */ = {
-			isa = PBXGroup;
-			children = (
-				DCC30D640762539B008F7A48 /* 0 */,
-				DCC30D670762539B008F7A48 /* __init__.py */,
-				DCC30D680762539B008F7A48 /* buildapp.py */,
-				DCC30D690762539B008F7A48 /* FunctionalTest_recursive_tests.py */,
-				DCC30D6A0762539B008F7A48 /* py_avida_core_data.py */,
-				DCC30D6B0762539B008F7A48 /* py_avida_driver_controller.py */,
-				DCC30D6C0762539B008F7A48 /* py_avida_state_mediator.py */,
-				DCC30D6D0762539B008F7A48 /* py_avida_threaded_driver.py */,
-				DCC30D6E0762539B008F7A48 /* py_brainstorms.py */,
-				DCC30D6F0762539B008F7A48 /* py_main_controller_data.py */,
-				DCC30D700762539B008F7A48 /* pyEduMainCtrl.py */,
-				DCC30D710762539B008F7A48 /* pyMdl.py */,
-				DCC30D720762539B008F7A48 /* pySessionCtrl.py */,
-				DCC30D730762539B008F7A48 /* pySessionCtrl.py.1 */,
-				DCC30D740762539B008F7A48 /* pySessionDumbCtrl.py.1 */,
-				DCC30D750762539B008F7A48 /* pySessionWorkThreadHdlr.py.0 */,
-				DCC30D760762539B008F7A48 /* pySessionWorkThreadHdlr.py.1 */,
-				DCC30D770762539B008F7A48 /* pyTemporaryReloads.py */,
-				DCC30D780762539B008F7A48 /* UnitTest_pyAvidaCoreData.py */,
-				DCC30D790762539B008F7A48 /* UnitTest_pyAvidaThreadedDriver.py */,
-				DCC30D7A0762539B008F7A48 /* UnitTest_pyEduMainCtrl.py */,
-				DCC30D7B0762539B008F7A48 /* UnitTest_pyEduMainMenuBarHdlr.py */,
-				DCC30D7C0762539B008F7A48 /* UnitTest_pyEduSessionMenuBarHdlr.py */,
-				DCC30D7D0762539B008F7A48 /* UnitTest_pyMainControllerFactory.py */,
-				DCC30D7E0762539B008F7A48 /* UnitTest_pyMdl.py */,
-				DCC30D7F0762539B008F7A48 /* UnitTest_pyMdtr.py */,
-				DCC30D800762539B008F7A48 /* UnitTest_pySessionControllerFactory.py */,
-				DCC30D810762539B008F7A48 /* UnitTest_pySessionCtrl.py */,
-				DCC30D820762539B008F7A48 /* UnitTest_pySessionDumbCtrl.py */,
-				DCC30D830762539B008F7A48 /* UnitTest_pySessionDumbView.py */,
-				DCC30D840762539B008F7A48 /* UnitTest_pySessionWorkThreadHdlr.py */,
-			);
-			path = AvidaGui;
-			sourceTree = "<group>";
-		};
-		DCC30D640762539B008F7A48 /* 0 */ = {
-			isa = PBXGroup;
-			children = (
-			);
-			path = 0;
-			sourceTree = "<group>";
-		};
 		DCC30F7C0762539D008F7A48 /* cpu */ = {
 			isa = PBXGroup;
 			children = (
+				70C5BD690905CE5F0028A785 /* cHardwareManager.cc */,
+				70C5BD6A0905CE5F0028A785 /* cHardwareManager.h */,
 				707A687408E3750300576968 /* cHardwareTracer_SMT.h */,
 				70C1F0FC08C40B1B00F50912 /* nHardwareCPU.h */,
 				70C1F0A808C3FF1800F50912 /* nHardware.h */,
@@ -1975,7 +1027,6 @@
 				70C1F02208C3C71300F50912 /* cHardwareSMT_Thread.cc */,
 				70C1F02308C3C71300F50912 /* cHardwareSMT.cc */,
 				70C1F02408C3C71300F50912 /* cHardwareStatusPrinter.cc */,
-				70C1F02508C3C71300F50912 /* cHardwareUtil.cc */,
 				70C1F02608C3C71300F50912 /* cHeadCPU.cc */,
 				70C1F02708C3C71300F50912 /* cHeadMultiMem.cc */,
 				70C1F02808C3C71300F50912 /* cTestCPU.cc */,
@@ -1987,7 +1038,6 @@
 				70C1F01708C3C6FC00F50912 /* cHardwareTracer_CPU.h */,
 				70C1F01808C3C6FC00F50912 /* cHardwareTracer_TestCPU.h */,
 				70C1F01908C3C6FC00F50912 /* cHardwareTracer.h */,
-				70C1F01A08C3C6FC00F50912 /* cHardwareUtil.h */,
 				70C1F01B08C3C6FC00F50912 /* cHeadCPU.h */,
 				70C1F01C08C3C6FC00F50912 /* cHeadMultiMem.h */,
 				70C1F01D08C3C6FC00F50912 /* cInstLibCPU.h */,
@@ -1999,12 +1049,10 @@
 				70C1EFA308C39F2100F50912 /* cHardwareBase.cc */,
 				70C1EFA408C39F2100F50912 /* cHardwareCPU_Thread.cc */,
 				70C1EFA508C39F2100F50912 /* cHardwareCPU.cc */,
-				70C1EFA608C39F2100F50912 /* cHardwareFactory.cc */,
 				70C1EF9D08C39F0E00F50912 /* cHardware4Stack_Thread.h */,
 				70C1EF9E08C39F0E00F50912 /* cHardwareBase.h */,
 				70C1EF9F08C39F0E00F50912 /* cHardwareCPU_Thread.h */,
 				70C1EFA008C39F0E00F50912 /* cHardwareCPU.h */,
-				70C1EFA108C39F0E00F50912 /* cHardwareFactory.h */,
 				70C1EF8B08C39BC500F50912 /* cHardware4Stack.cc */,
 				70C1EF8A08C39BB700F50912 /* cHardware4Stack.h */,
 				70C1EF7108C3968700F50912 /* cCPUTestInfo.cc */,
@@ -2017,7 +1065,6 @@
 				70C1EF4608C393BA00F50912 /* cCodeLabel.cc */,
 				70C1EF4708C393BA00F50912 /* cCodeLabel.h */,
 				DCC30FA90762539D008F7A48 /* CMakeLists.txt */,
-				DCC30FAC0762539D008F7A48 /* cpu.pri */,
 				706D30CC0852328F00D7DC8F /* tInstLib.h */,
 			);
 			path = cpu;
@@ -2026,21 +1073,17 @@
 		DCC30FD00762539D008F7A48 /* event */ = {
 			isa = PBXGroup;
 			children = (
-				70C1F18E08C6A11100F50912 /* cEventFactoryManager.cc */,
+				7040CF1A0906A52E00AA820F /* cEventManager.cc */,
+				7040CF1B0906A52E00AA820F /* cEventManager.h */,
 				70C1F18F08C6A11100F50912 /* cEventList.cc */,
 				70C1F19008C6A11100F50912 /* cEventListIterator.cc */,
 				70C1F19108C6A11100F50912 /* cEventTriggers.cc */,
-				70C1F19208C6A11100F50912 /* cPopulationEventFactory.cc */,
 				70C1F18608C6A0FA00F50912 /* cEvent.h */,
-				70C1F18708C6A0FA00F50912 /* cEventFactoryManager.h */,
 				70C1F18808C6A0FA00F50912 /* cEventList.h */,
 				70C1F18908C6A0FA00F50912 /* cEventListEntry.h */,
 				70C1F18A08C6A0FA00F50912 /* cEventListIterator.h */,
 				70C1F18B08C6A0FA00F50912 /* cEventTriggers.h */,
-				70C1F18C08C6A0FA00F50912 /* cPopulationEvent.h */,
-				70C1F18D08C6A0FA00F50912 /* cPopulationEventFactory.h */,
 				DCC30FEB0762539D008F7A48 /* CMakeLists.txt */,
-				DCC30FF00762539D008F7A48 /* event.pri */,
 			);
 			path = event;
 			sourceTree = "<group>";
@@ -2152,8 +1195,6 @@
 				702D4F3D08DA61FE007BA469 /* cAnalyzeGenotype.cc */,
 				702D4F3E08DA61FE007BA469 /* cAnalyzeUtil.cc */,
 				702D4F3F08DA61FE007BA469 /* cBirthChamber.cc */,
-				702D4F4008DA61FE007BA469 /* cCallbackUtil.cc */,
-				702D4F4108DA61FE007BA469 /* cConfig.cc */,
 				702D4F2F08DA61E2007BA469 /* cAnalyze.h */,
 				702D4F3008DA61E2007BA469 /* cAnalyzeCommand.h */,
 				702D4F3108DA61E2007BA469 /* cAnalyzeCommandDef.h */,
@@ -2165,8 +1206,6 @@
 				702D4F3708DA61E2007BA469 /* cAnalyzeUtil.h */,
 				702D4F3808DA61E2007BA469 /* cAvidaTriggers.h */,
 				702D4F3908DA61E2007BA469 /* cBirthChamber.h */,
-				702D4F3A08DA61E2007BA469 /* cCallbackUtil.h */,
-				702D4F3B08DA61E2007BA469 /* cConfig.h */,
 				702D4EF908DA5341007BA469 /* cAvidaDriver_Analyze.cc */,
 				702D4EFA08DA5341007BA469 /* cAvidaDriver_Base.cc */,
 				702D4EFB08DA5341007BA469 /* cAvidaDriver_Population.cc */,
@@ -2180,8 +1219,6 @@
 				DCC3109C0762539E008F7A48 /* avida.cc */,
 				DCC310A90762539E008F7A48 /* CMakeLists.txt */,
 				DCC310B00762539E008F7A48 /* functional_testsuites */,
-				DCC310F00762539E008F7A48 /* main.pro */,
-				DCC310F10762539E008F7A48 /* main_sub.pri */,
 				DCC311090762539E008F7A48 /* primitive.cc */,
 				DCC3112E0762539E008F7A48 /* unit_testsuites */,
 				70B085D108F48C9400FC65FE /* nSpecies.h */,
@@ -2469,7 +1506,6 @@
 				DCC3129C076253A0008F7A48 /* block_struct.t.cc */,
 				DCC3129D076253A0008F7A48 /* callback_util.t.cc */,
 				DCC3129E076253A0008F7A48 /* CMakeLists.txt */,
-				DCC3129F076253A0008F7A48 /* config.t.cc */,
 				DCC312A0076253A0008F7A48 /* const_schedule.t.cc */,
 				DCC312A1076253A0008F7A48 /* cpu_head.t.cc */,
 				DCC312A2076253A0008F7A48 /* cpu_memory.t.cc */,
@@ -2546,8 +1582,6 @@
 				DCC31310076253A0008F7A48 /* phenotype.t.cc */,
 				DCC31311076253A0008F7A48 /* population.t.cc */,
 				DCC31312076253A0008F7A48 /* population_cell.t.cc */,
-				DCC31313076253A0008F7A48 /* population_event.t.cc */,
-				DCC31314076253A0008F7A48 /* population_event_factory.t.cc */,
 				DCC31315076253A0008F7A48 /* population_interface.t.cc */,
 				DCC31316076253A0008F7A48 /* prob_schedule.t.cc */,
 				DCC31317076253A0008F7A48 /* random.t.cc */,
@@ -2893,45 +1927,6 @@
 			path = task_events;
 			sourceTree = "<group>";
 		};
-		DCC315D2076253A5008F7A48 /* viewers */ = {
-			isa = PBXGroup;
-			children = (
-				DCC315F6076253A5008F7A48 /* ansi.cc */,
-				DCC315F7076253A5008F7A48 /* ansi.hh */,
-				DCC315F8076253A5008F7A48 /* bar_screen.cc */,
-				DCC315F9076253A5008F7A48 /* bar_screen.hh */,
-				DCC315FA076253A5008F7A48 /* CMakeLists.txt */,
-				DCC315FB076253A5008F7A48 /* environment_screen.cc */,
-				DCC315FC076253A5008F7A48 /* environment_screen.hh */,
-				DCC315FD076253A5008F7A48 /* hist_screen.cc */,
-				DCC315FE076253A5008F7A48 /* hist_screen.hh */,
-				DCC315FF076253A5008F7A48 /* key_chart */,
-				DCC31601076253A5008F7A48 /* map_screen.cc */,
-				DCC31602076253A5008F7A48 /* map_screen.hh */,
-				DCC31603076253A5008F7A48 /* menu.cc */,
-				DCC31604076253A5008F7A48 /* menu.hh */,
-				DCC31605076253A5008F7A48 /* ncurses.cc */,
-				DCC31606076253A5008F7A48 /* ncurses.hh */,
-				DCC31607076253A5008F7A48 /* options_screen.cc */,
-				DCC31608076253A5008F7A48 /* options_screen.hh */,
-				DCC31609076253A5008F7A48 /* stats_screen.cc */,
-				DCC3160A076253A5008F7A48 /* stats_screen.hh */,
-				DCC3160B076253A5008F7A48 /* symbol_util.cc */,
-				DCC3160C076253A5008F7A48 /* symbol_util.hh */,
-				DCC3160D076253A5008F7A48 /* text_screen.cc */,
-				DCC3160E076253A5008F7A48 /* text_screen.hh */,
-				DCC3160F076253A5008F7A48 /* text_window.hh */,
-				DCC31610076253A5008F7A48 /* view.cc */,
-				DCC31611076253A5008F7A48 /* view.hh */,
-				DCC31612076253A5008F7A48 /* viewer.cc */,
-				DCC31613076253A5008F7A48 /* viewer.hh */,
-				DCC31614076253A5008F7A48 /* viewers.pro */,
-				DCC31615076253A5008F7A48 /* zoom_screen.cc */,
-				DCC31616076253A5008F7A48 /* zoom_screen.hh */,
-			);
-			path = viewers;
-			sourceTree = "<group>";
-		};
 		DCC3164E07626CF3008F7A48 /* Products */ = {
 			isa = PBXGroup;
 			children = (
@@ -3081,20 +2076,6 @@
 			buildActionMask = 2147483647;
 			files = (
 				700E2AF8085DE50C00CF158A /* avida.cc in Sources */,
-				70658C35085DE5D800486BED /* ansi.cc in Sources */,
-				70658C36085DE5D900486BED /* bar_screen.cc in Sources */,
-				70658C38085DE5DC00486BED /* environment_screen.cc in Sources */,
-				70658C39085DE5DD00486BED /* hist_screen.cc in Sources */,
-				70658C3A085DE5DF00486BED /* map_screen.cc in Sources */,
-				70658C3B085DE5E000486BED /* menu.cc in Sources */,
-				70658C3C085DE5E100486BED /* ncurses.cc in Sources */,
-				70658C3D085DE5E200486BED /* options_screen.cc in Sources */,
-				70658C3E085DE5E400486BED /* stats_screen.cc in Sources */,
-				70658C3F085DE5E500486BED /* symbol_util.cc in Sources */,
-				70658C40085DE5E700486BED /* text_screen.cc in Sources */,
-				70658C41085DE5E900486BED /* view.cc in Sources */,
-				70658C42085DE5EA00486BED /* viewer.cc in Sources */,
-				70658C43085DE5ED00486BED /* zoom_screen.cc in Sources */,
 				70C1EF4A08C393BA00F50912 /* cCodeLabel.cc in Sources */,
 				70C1EF5A08C3948C00F50912 /* cCPUMemory.cc in Sources */,
 				70C1EF6308C3954700F50912 /* cCPUStack.cc in Sources */,
@@ -3104,20 +2085,16 @@
 				70C1EFAD08C39F2100F50912 /* cHardwareBase.cc in Sources */,
 				70C1EFAE08C39F2100F50912 /* cHardwareCPU_Thread.cc in Sources */,
 				70C1EFAF08C39F2100F50912 /* cHardwareCPU.cc in Sources */,
-				70C1EFB008C39F2100F50912 /* cHardwareFactory.cc in Sources */,
 				70C1F03208C3C71300F50912 /* cHardwareSMT_Thread.cc in Sources */,
 				70C1F03308C3C71300F50912 /* cHardwareSMT.cc in Sources */,
 				70C1F03408C3C71300F50912 /* cHardwareStatusPrinter.cc in Sources */,
-				70C1F03508C3C71300F50912 /* cHardwareUtil.cc in Sources */,
 				70C1F03608C3C71300F50912 /* cHeadCPU.cc in Sources */,
 				70C1F03708C3C71300F50912 /* cHeadMultiMem.cc in Sources */,
 				70C1F03808C3C71300F50912 /* cTestCPU.cc in Sources */,
 				70C1F03908C3C71300F50912 /* cTestUtil.cc in Sources */,
-				70C1F19808C6A11100F50912 /* cEventFactoryManager.cc in Sources */,
 				70C1F19908C6A11100F50912 /* cEventList.cc in Sources */,
 				70C1F19A08C6A11100F50912 /* cEventListIterator.cc in Sources */,
 				70C1F19B08C6A11100F50912 /* cEventTriggers.cc in Sources */,
-				70C1F19C08C6A11100F50912 /* cPopulationEventFactory.cc in Sources */,
 				702D4F0308DA5341007BA469 /* cAvidaDriver_Analyze.cc in Sources */,
 				702D4F0408DA5341007BA469 /* cAvidaDriver_Base.cc in Sources */,
 				702D4F0508DA5341007BA469 /* cAvidaDriver_Population.cc in Sources */,
@@ -3127,8 +2104,6 @@
 				702D4F4908DA61FE007BA469 /* cAnalyzeGenotype.cc in Sources */,
 				702D4F4A08DA61FE007BA469 /* cAnalyzeUtil.cc in Sources */,
 				702D4F4B08DA61FE007BA469 /* cBirthChamber.cc in Sources */,
-				702D4F4C08DA61FE007BA469 /* cCallbackUtil.cc in Sources */,
-				702D4F4D08DA61FE007BA469 /* cConfig.cc in Sources */,
 				70CA6ED208DB7F8200068AC2 /* cFitnessMatrix.cc in Sources */,
 				70CA6ED308DB7F8200068AC2 /* cGenebank.cc in Sources */,
 				70CA6ED408DB7F8200068AC2 /* cGenome.cc in Sources */,
@@ -3206,6 +2181,8 @@
 				70B08B9308FB2E6B00FC65FE /* cWeightedIndex.cc in Sources */,
 				7013846209028B3E0087ED2E /* cAvidaConfig.cc in Sources */,
 				70C5BC6709059A970028A785 /* cWorld.cc in Sources */,
+				70C5BD6D0905CE5F0028A785 /* cHardwareManager.cc in Sources */,
+				7040CF1E0906A52E00AA820F /* cEventManager.cc in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -3227,32 +2204,21 @@
 				70C1EFA808C39F2100F50912 /* cHardwareBase.cc in Sources */,
 				70C1EFA908C39F2100F50912 /* cHardwareCPU_Thread.cc in Sources */,
 				70C1EFAA08C39F2100F50912 /* cHardwareCPU.cc in Sources */,
-				70C1EFAB08C39F2100F50912 /* cHardwareFactory.cc in Sources */,
 				70C1F02A08C3C71300F50912 /* cHardwareSMT_Thread.cc in Sources */,
 				70C1F02B08C3C71300F50912 /* cHardwareSMT.cc in Sources */,
 				70C1F02C08C3C71300F50912 /* cHardwareStatusPrinter.cc in Sources */,
-				70C1F02D08C3C71300F50912 /* cHardwareUtil.cc in Sources */,
 				70C1F02E08C3C71300F50912 /* cHeadCPU.cc in Sources */,
 				70C1F02F08C3C71300F50912 /* cHeadMultiMem.cc in Sources */,
 				70C1F03008C3C71300F50912 /* cTestCPU.cc in Sources */,
 				70C1F03108C3C71300F50912 /* cTestUtil.cc in Sources */,
-				70C1F19308C6A11100F50912 /* cEventFactoryManager.cc in Sources */,
 				70C1F19408C6A11100F50912 /* cEventList.cc in Sources */,
 				70C1F19508C6A11100F50912 /* cEventListIterator.cc in Sources */,
 				70C1F19608C6A11100F50912 /* cEventTriggers.cc in Sources */,
-				70C1F19708C6A11100F50912 /* cPopulationEventFactory.cc in Sources */,
-				702D4EFE08DA5341007BA469 /* cAvidaDriver_Analyze.cc in Sources */,
 				702D4EFF08DA5341007BA469 /* cAvidaDriver_Base.cc in Sources */,
 				702D4F0008DA5341007BA469 /* cAvidaDriver_Population.cc in Sources */,
 				702D4F0108DA5341007BA469 /* cEnvironment.cc in Sources */,
 				702D4F0208DA5341007BA469 /* cPopulationInterface.cc in Sources */,
-				702D4F4208DA61FE007BA469 /* cAnalyze.cc in Sources */,
-				702D4F4308DA61FE007BA469 /* cAnalyzeGenotype.cc in Sources */,
-				702D4F4408DA61FE007BA469 /* cAnalyzeUtil.cc in Sources */,
 				702D4F4508DA61FE007BA469 /* cBirthChamber.cc in Sources */,
-				702D4F4608DA61FE007BA469 /* cCallbackUtil.cc in Sources */,
-				702D4F4708DA61FE007BA469 /* cConfig.cc in Sources */,
-				70CA6EC208DB7F8200068AC2 /* cFitnessMatrix.cc in Sources */,
 				70CA6EC308DB7F8200068AC2 /* cGenebank.cc in Sources */,
 				70CA6EC408DB7F8200068AC2 /* cGenome.cc in Sources */,
 				70CA6EC508DB7F8200068AC2 /* cGenomeUtil.cc in Sources */,
@@ -3275,7 +2241,6 @@
 				70B0865D08F4974300FC65FE /* cMutation.cc in Sources */,
 				70B0865E08F4974300FC65FE /* cMutationLib.cc in Sources */,
 				70B0865F08F4974300FC65FE /* cMutationRates.cc in Sources */,
-				70B0866008F4974300FC65FE /* cMxCodeArray.cc in Sources */,
 				70B0868B08F49EA800FC65FE /* cOrganism.cc in Sources */,
 				70B0868C08F49EA800FC65FE /* cOrgMessage.cc in Sources */,
 				70B0868D08F49EA800FC65FE /* cPopulation.cc in Sources */,
@@ -3329,6 +2294,9 @@
 				70B08B9508FB2E6B00FC65FE /* cWeightedIndex.cc in Sources */,
 				7013846409028B3E0087ED2E /* cAvidaConfig.cc in Sources */,
 				70C5BC6509059A970028A785 /* cWorld.cc in Sources */,
+				70C5BD6B0905CE5F0028A785 /* cHardwareManager.cc in Sources */,
+				7040CF1C0906A52E00AA820F /* cEventManager.cc in Sources */,
+				7040D22509071EE000AA820F /* cAnalyzeUtil.cc in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -3419,32 +2387,6 @@
 			};
 			name = Profile;
 		};
-		700E2B82085DE50C00CF158A /* Default */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				GCC_ALTIVEC_EXTENSIONS = YES;
-				GCC_AUTO_VECTORIZATION = YES;
-				GCC_DEBUGGING_SYMBOLS = full;
-				GCC_ENABLE_FIX_AND_CONTINUE = YES;
-				GCC_FAST_MATH = YES;
-				GCC_MODEL_CPU = G4;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = REVISION_SUPPORT;
-				GCC_UNROLL_LOOPS = YES;
-				HEADER_SEARCH_PATHS = source/event/;
-				INSTALL_PATH = "$(BUILT_PRODUCTS_DIR)/work";
-				LIBRARY_SEARCH_PATHS = "";
-				PRODUCT_NAME = viewer;
-				SKIP_INSTALL = YES;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-				ZERO_LINK = YES;
-			};
-			name = Default;
-		};
 		702442D30859E0B00059BD9B /* Development */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
@@ -3486,7 +2428,10 @@
 				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
 				GCC_MODEL_CPU = G4;
 				GCC_OPTIMIZATION_LEVEL = 3;
-				GCC_PREPROCESSOR_DEFINITIONS = REVISION_SUPPORT;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					NDEBUG,
+					REVISION_SUPPORT,
+				);
 				GCC_UNROLL_LOOPS = YES;
 				HEADER_SEARCH_PATHS = source/event/;
 				INSTALL_PATH = "$(BUILT_PRODUCTS_DIR)/work";
@@ -3511,7 +2456,10 @@
 				GCC_FAST_MATH = YES;
 				GCC_MODEL_CPU = G4;
 				GCC_OPTIMIZATION_LEVEL = 3;
-				GCC_PREPROCESSOR_DEFINITIONS = REVISION_SUPPORT;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					NDEBUG,
+					REVISION_SUPPORT,
+				);
 				GCC_UNROLL_LOOPS = YES;
 				HEADER_SEARCH_PATHS = source/event/;
 				INSTALL_PATH = "$(BUILT_PRODUCTS_DIR)/work";
@@ -3522,35 +2470,10 @@
 					"-Wno-four-char-constants",
 					"-Wno-unknown-pragmas",
 				);
-				ZERO_LINK = YES;
+				ZERO_LINK = NO;
 			};
 			name = Profile;
 		};
-		702442D60859E0B00059BD9B /* Default */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				GCC_ALTIVEC_EXTENSIONS = YES;
-				GCC_AUTO_VECTORIZATION = YES;
-				GCC_DEBUGGING_SYMBOLS = full;
-				GCC_ENABLE_FIX_AND_CONTINUE = YES;
-				GCC_FAST_MATH = YES;
-				GCC_MODEL_CPU = G4;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = REVISION_SUPPORT;
-				GCC_UNROLL_LOOPS = YES;
-				HEADER_SEARCH_PATHS = source/event/;
-				INSTALL_PATH = "$(BUILT_PRODUCTS_DIR)/work";
-				PRODUCT_NAME = primitive;
-				SKIP_INSTALL = YES;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-				ZERO_LINK = YES;
-			};
-			name = Default;
-		};
 		702442D80859E0B00059BD9B /* Development */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
@@ -3561,10 +2484,12 @@
 		702442D90859E0B00059BD9B /* Deployment */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				DEAD_CODE_STRIPPING = NO;
 				GCC_ALTIVEC_EXTENSIONS = YES;
 				GCC_AUTO_VECTORIZATION = YES;
 				GCC_DYNAMIC_NO_PIC = YES;
 				GCC_FAST_MATH = YES;
+				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
 				GCC_OPTIMIZATION_LEVEL = 3;
 				GCC_UNROLL_LOOPS = YES;
 			};
@@ -3573,15 +2498,16 @@
 		702442DA0859E0B00059BD9B /* Profile */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				GCC_ALTIVEC_EXTENSIONS = YES;
+				GCC_AUTO_VECTORIZATION = YES;
+				GCC_FAST_MATH = YES;
+				GCC_OPTIMIZATION_LEVEL = 3;
+				GCC_UNROLL_LOOPS = YES;
+				GENERATE_PROFILING_CODE = YES;
+				ZERO_LINK = NO;
 			};
 			name = Profile;
 		};
-		702442DB0859E0B00059BD9B /* Default */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-			};
-			name = Default;
-		};
 /* End XCBuildConfiguration section */
 
 /* Begin XCConfigurationList section */
@@ -3591,10 +2517,9 @@
 				700E2B7F085DE50C00CF158A /* Development */,
 				700E2B80085DE50C00CF158A /* Deployment */,
 				700E2B81085DE50C00CF158A /* Profile */,
-				700E2B82085DE50C00CF158A /* Default */,
 			);
 			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Default;
+			defaultConfigurationName = Deployment;
 		};
 		702442D20859E0B00059BD9B /* Build configuration list for PBXNativeTarget "primitive" */ = {
 			isa = XCConfigurationList;
@@ -3602,10 +2527,9 @@
 				702442D30859E0B00059BD9B /* Development */,
 				702442D40859E0B00059BD9B /* Deployment */,
 				702442D50859E0B00059BD9B /* Profile */,
-				702442D60859E0B00059BD9B /* Default */,
 			);
 			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Default;
+			defaultConfigurationName = Deployment;
 		};
 		702442D70859E0B00059BD9B /* Build configuration list for PBXProject "Avida2" */ = {
 			isa = XCConfigurationList;
@@ -3613,10 +2537,9 @@
 				702442D80859E0B00059BD9B /* Development */,
 				702442D90859E0B00059BD9B /* Deployment */,
 				702442DA0859E0B00059BD9B /* Profile */,
-				702442DB0859E0B00059BD9B /* Default */,
 			);
 			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Default;
+			defaultConfigurationName = Deployment;
 		};
 /* End XCConfigurationList section */
 	};

Modified: branches/brysonda/source/bindings/Boost.Python/hardware_cpu-fixups.hh
===================================================================
--- branches/brysonda/source/bindings/Boost.Python/hardware_cpu-fixups.hh	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/bindings/Boost.Python/hardware_cpu-fixups.hh	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,7 +1,7 @@
 #ifndef HARDWARE_CPU_FIXUPS_HH
 #define HARDWARE_CPU_FIXUPS_HH
 
-#ifndef HARDWARE_CPU_HH
+#ifndef cHardwareCPU_h
 #include "cHardwareCPU.h"
 #endif
 

Modified: branches/brysonda/source/bindings/Boost.Python/hardware_factory.pyste
===================================================================
--- branches/brysonda/source/bindings/Boost.Python/hardware_factory.pyste	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/bindings/Boost.Python/hardware_factory.pyste	2005-10-20 04:37:15 UTC (rev 355)
@@ -3,7 +3,7 @@
 Include("cOrganism.h")
 Include("cInstSet.h")
 
-cHardwareFactory = Class("cHardwareFactory", "cHardwareFactory.h")
+cHardwareFactory = Class("cHardwareFactory", "cHardwareManager.h")
 set_policy(cHardwareFactory.Create, return_internal_reference())
 
 # vim: set ft=python:

Modified: branches/brysonda/source/bindings/Boost.Python/population_interface-fixups.hh
===================================================================
--- branches/brysonda/source/bindings/Boost.Python/population_interface-fixups.hh	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/bindings/Boost.Python/population_interface-fixups.hh	2005-10-20 04:37:15 UTC (rev 355)
@@ -10,7 +10,6 @@
 
 inline void BuildTestPopInterface(cPopulationInterface &test_interface){
   test_interface.SetFun_NewHardware(&cCallbackUtil::CB_NewHardware);
-  test_interface.SetFun_Recycle(&cCallbackUtil::CB_RecycleHardware);
   test_interface.SetFun_Divide(&cCallbackUtil::CB_TestDivide);
   test_interface.SetFun_GetInput(&cCallbackUtil::CB_GetInput);
   test_interface.SetFun_GetInputAt(&cCallbackUtil::CB_GetInputAt);

Modified: branches/brysonda/source/bindings/Boost.Python/population_interface.pyste
===================================================================
--- branches/brysonda/source/bindings/Boost.Python/population_interface.pyste	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/bindings/Boost.Python/population_interface.pyste	2005-10-20 04:37:15 UTC (rev 355)
@@ -43,7 +43,6 @@
 
 # function pointers don't play well with python...
 exclude(cPopulationInterface.SetFun_NewHardware)
-exclude(cPopulationInterface.SetFun_Recycle)
 exclude(cPopulationInterface.SetFun_Divide)
 exclude(cPopulationInterface.SetFun_TestOnDivide)
 exclude(cPopulationInterface.SetFun_GetNeighbor)

Modified: branches/brysonda/source/bindings/Boost.Python/py_avida_driver-fixups.cc
===================================================================
--- branches/brysonda/source/bindings/Boost.Python/py_avida_driver-fixups.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/bindings/Boost.Python/py_avida_driver-fixups.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -2,7 +2,7 @@
 #include "py_avida_driver.hh"
 
 #include "cpu/cHardwareBase.h"
-#include "cpu/cHardwareFactory.h"
+#include "cpu/cHardwareManager.h"
 #include "main/cConfig.h"
 #include "main/cGenebank.h"
 #include "main/cGenotype.h"
@@ -118,9 +118,6 @@
 }
 
 bool pyAvidaDriver::postPtMutations(const unsigned int) {
-  // Do any cleanup in the hardware factory...
-  cHardwareFactory::Update();
-
   // Exit conditions...
   if(0 == population->GetNumOrganisms()) {
     done_flag = true;

Modified: branches/brysonda/source/cpu/cHardware4Stack.cc
===================================================================
--- branches/brysonda/source/cpu/cHardware4Stack.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/cpu/cHardware4Stack.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -9,7 +9,6 @@
 
 #include "cHardware4Stack.h"
 
-#include "cConfig.h"
 #include "cCPUTestInfo.h"
 #include "functions.h"
 #include "cGenomeUtil.h"
@@ -230,8 +229,8 @@
   return inst_lib;
 }
 
-cHardware4Stack::cHardware4Stack(cOrganism * in_organism, cInstSet * in_inst_set)
-  : cHardwareBase(in_organism, in_inst_set)
+cHardware4Stack::cHardware4Stack(cWorld* world, cOrganism* in_organism, cInstSet* in_inst_set)
+  : cHardwareBase(world, in_organism, in_inst_set)
   , memory_array(nHardware4Stack::NUM_MEMORY_SPACES)
 {
   /* FIXME:  reorganize storage of m_functions.  -- kgn */
@@ -239,9 +238,9 @@
   /**/
   inst_remainder = 0;
  
-  for(int x=1; x<=cConfig::GetMaxCPUThreads(); x++)
+  for(int x=1; x <= m_world->GetConfig().MAX_CPU_THREADS.Get(); x++)
     {
-      slice_array[x] = (x-1)*cConfig::GetThreadSlicingMethod()+1;
+      slice_array[x] = (x-1) * m_world->GetConfig().THREAD_SLICING_METHOD.Get() + 1;
     }
 
   memory_array[0] = in_organism->GetGenome();  // Initialize memory...
@@ -252,7 +251,7 @@
 
 
 cHardware4Stack::cHardware4Stack(const cHardware4Stack &hardware_4stack)
-: cHardwareBase(hardware_4stack.organism, hardware_4stack.inst_set)
+: cHardwareBase(hardware_4stack.m_world, hardware_4stack.organism, hardware_4stack.inst_set)
 , m_functions(hardware_4stack.m_functions)
 , memory_array(hardware_4stack.memory_array)
 , threads(hardware_4stack.threads)
@@ -274,16 +273,6 @@
 }
 
 
-void cHardware4Stack::Recycle(cOrganism * new_organism, cInstSet * in_inst_set)
-{
-  cHardwareBase::Recycle(new_organism, in_inst_set);
-  memory_array[0] = new_organism->GetGenome();
-  memory_array[0].Resize(GetMemory(0).GetSize()+1);
-  memory_array[0][memory_array[0].GetSize()-1] = cInstruction();
-  Reset();
-}
-
-
 void cHardware4Stack::Reset()
 {
   //global_stack.Clear();
@@ -336,20 +325,7 @@
 
   cPhenotype & phenotype = organism->GetPhenotype();
   phenotype.IncTimeUsed();
-  //if(organism->GetCellID()==46 && IP().GetMemSpace()==2)
-  // int x=0;
 
-  //if (GetNumThreads() > 1) thread_time_used++;
-  //assert((GetHead(nHardware::HEAD_WRITE).GetPosition() == Stack(nHardware4Stack::STACK_BX).Top() ||
-  // Stack(nHardware4Stack::STACK_BX).Top()==GetMemory(IP().GetMemSpace()).GetSize()-1 || 
-  // GetHead(nHardware::HEAD_WRITE).GetPosition() == Stack(nHardware4Stack::STACK_BX).Top()+1) &&
-  // (GetHead(nHardware::HEAD_WRITE).GetMemSpace() == IP().GetMemSpace() ||
-  //  GetHead(nHardware::HEAD_WRITE).GetMemSpace() == IP().GetMemSpace()+1));
-  // If we have threads turned on and we executed each thread in a single
-  // timestep, adjust the number of instructions executed accordingly.
-  //const int num_inst_exec = (cConfig::GetThreadSlicingMethod() == 1) ?
-  //  GetNumThreads() : 1;
-
   const int num_inst_exec = int(slice_array[GetNumThreads()]+ inst_remainder);
   inst_remainder = slice_array[GetNumThreads()] + inst_remainder - num_inst_exec;
   
@@ -1211,7 +1187,7 @@
     GetLabel().AddNop(inst_set->GetNopMod(inst_ptr->GetInst()));
 
     // If this is the first line of the template, mark it executed.
-    if (GetLabel().GetSize() <=	cConfig::GetMaxLabelExeSize()) {
+    if (GetLabel().GetSize() <=	m_world->GetConfig().MAX_LABEL_EXE_SIZE.Get()) {
       inst_ptr->FlagExecuted() = true;
     }
   }
@@ -1221,7 +1197,7 @@
 bool cHardware4Stack::ForkThread()
 {
   const int num_threads = GetNumThreads();
-  if (num_threads == cConfig::GetMaxCPUThreads()) return false;
+  if (num_threads == m_world->GetConfig().MAX_CPU_THREADS.Get()) return false;
 
   // Make room for the new thread.
   threads.Resize(num_threads + 1);
@@ -1371,7 +1347,7 @@
   // Make sure that neither parent nor child will be below the minimum size.
 
   const int genome_size = organism->GetGenome().GetSize();
-  const double size_range = cConfig::GetChildSizeRange();
+  const double size_range = m_world->GetConfig().CHILD_SIZE_RANGE.Get();
   const int min_size = Max(MIN_CREATURE_SIZE, (int) (genome_size/size_range));
   const int max_size = Min(MAX_CREATURE_SIZE, (int) (genome_size*size_range));
   
@@ -1389,7 +1365,7 @@
     if (GetMemory(0).FlagExecuted(i)) executed_size++;
   }
 
-  const int min_exe_lines = (int) (parent_size * cConfig::GetMinExeLines());
+  const int min_exe_lines = (int) (parent_size * m_world->GetConfig().MIN_EXE_LINES.Get());
   if (executed_size < min_exe_lines) {
     Fault(FAULT_LOC_DIVIDE, FAULT_TYPE_ERROR,
 	  cStringUtil::Stringf("Too few executed lines (%d < %d)",
@@ -1405,7 +1381,7 @@
     if (GetMemory(mem_space).FlagCopied(i)) copied_size++;
    }
 
-  const int min_copied =  (int) (child_size * cConfig::GetMinCopiedLines());
+  const int min_copied =  (int) (child_size * m_world->GetConfig().MIN_COPIED_LINES.Get());
   if (copied_size < min_copied) {
     Fault(FAULT_LOC_DIVIDE, FAULT_TYPE_ERROR,
 	  cStringUtil::Stringf("Too few copied commands (%d < %d)",
@@ -1749,16 +1725,16 @@
   // 1) DIVIDE_METHOD_OFFSPRING - Create a child, leave parent state untouched.
   // 2) DIVIDE_METHOD_SPLIT - Create a child, completely reset state of parent.
   // 3) DIVIDE_METHOD_BIRTH - Create a child, reset state of parent's current thread.
-  if(parent_alive && !(cConfig::GetDivideMethod() == DIVIDE_METHOD_OFFSPRING))
+  if(parent_alive && !(m_world->GetConfig().DIVIDE_METHOD.Get() == DIVIDE_METHOD_OFFSPRING))
     {
       
-      if(cConfig::GetDivideMethod() == DIVIDE_METHOD_SPLIT)
+      if(m_world->GetConfig().DIVIDE_METHOD.Get() == DIVIDE_METHOD_SPLIT)
 	{
 	  //this will wipe out all parasites on a divide.
 	  Reset();
 	  
 	}
-      else if(cConfig::GetDivideMethod() == DIVIDE_METHOD_BIRTH)
+      else if(m_world->GetConfig().DIVIDE_METHOD.Get() == DIVIDE_METHOD_BIRTH)
 	{
 	  //if this isn't the only thread, get rid of it!
 	  // ***this can cause a concurrency problem if we have 
@@ -1898,14 +1874,6 @@
   
   GetHead(nHardware::HEAD_FLOW).Set(0, mem_space_used);
   return true;
-  
-  //const int cur_size = GetMemory(0).GetSize();
-  //const int alloc_size = Min((int) (cConfig::GetChildSizeRange() * cur_size),
-  //			     MAX_CREATURE_SIZE - cur_size);
-  //if( Allocate_Main(alloc_size) ) {
-  //  Stack(nHardware4Stack::STACK_AX).Push(cur_size);
-  //  return true;
-  //} else return false;
 }
 
 //14

Modified: branches/brysonda/source/cpu/cHardware4Stack.h
===================================================================
--- branches/brysonda/source/cpu/cHardware4Stack.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/cpu/cHardware4Stack.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -5,8 +5,8 @@
 // before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
 //////////////////////////////////////////////////////////////////////////////
 
-#ifndef HARDWARE_4STACK_HH
-#define HARDWARE_4STACK_HH
+#ifndef cHardware4Stack_h
+#define cHardware4Stack_h
 
 #include <iomanip>
 
@@ -102,16 +102,14 @@
 
     // Keeps track of the base thread slicing number for each possible number of threads
   float slice_array[10]; //***HACK!  How do I do this right? -law
-                         //this wouldn't compile -> [cConfig::GetMaxCPUThreads()+1]***; 
 
   // Keeps track of fractional instructions that carry over into next update
   float inst_remainder; 
 
 public:
-  cHardware4Stack(cOrganism * in_organism, cInstSet * in_inst_set);
+  cHardware4Stack(cWorld* world, cOrganism* in_organism, cInstSet* in_inst_set);
   explicit cHardware4Stack(const cHardware4Stack &);
   ~cHardware4Stack() { ; }
-  void Recycle(cOrganism * new_organism, cInstSet * in_inst_set);
   static cInstLibBase *GetInstLib();
   static cString GetDefaultInstFilename() { return "inst_lib.4stack"; }
   static void WriteDefaultInstSet() { ; }

Modified: branches/brysonda/source/cpu/cHardwareBase.cc
===================================================================
--- branches/brysonda/source/cpu/cHardwareBase.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/cpu/cHardwareBase.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -13,8 +13,9 @@
 
 int cHardwareBase::instance_count(0);
 
-cHardwareBase::cHardwareBase(cOrganism * in_organism, cInstSet * in_inst_set)
-  : organism(in_organism)
+cHardwareBase::cHardwareBase(cWorld* world, cOrganism* in_organism, cInstSet* in_inst_set)
+  : m_world(world)
+  , organism(in_organism)
   , inst_set(in_inst_set)
   , viewer_lock(-1)
   , m_tracer(NULL)
@@ -30,16 +31,6 @@
   instance_count--;
 }
 
-void cHardwareBase::Recycle(cOrganism * new_organism, cInstSet * in_inst_set)
-{
-  assert(inst_set->OK());
-  assert(new_organism != NULL);
-
-  organism    = new_organism;
-  inst_set    = in_inst_set;
-  viewer_lock = -1;
-}
-
 bool cHardwareBase::Inst_Nop()          // Do Nothing.
 {
   return true;

Modified: branches/brysonda/source/cpu/cHardwareBase.h
===================================================================
--- branches/brysonda/source/cpu/cHardwareBase.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/cpu/cHardwareBase.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -23,11 +23,13 @@
 class cInstruction; // aggregate
 class cInstSet;
 class cOrganism;
+class cWorld;
 
 class cHardwareBase {
 protected:
-  cOrganism * organism;       // Organism using this hardware.
-  cInstSet * inst_set;        // Instruction set being used.
+  cWorld* m_world;
+  cOrganism* organism;       // Organism using this hardware.
+  cInstSet* inst_set;        // Instruction set being used.
   int viewer_lock;            // Used if the viewer should only lock onto
                               //  one aspect of the hardware.
 
@@ -35,9 +37,8 @@
 
   static int instance_count;
 public:
-  cHardwareBase(cOrganism * in_organism, cInstSet * in_inst_set);
+  cHardwareBase(cWorld* world, cOrganism * in_organism, cInstSet * in_inst_set);
   virtual ~cHardwareBase();
-  virtual void Recycle(cOrganism * new_organism, cInstSet * in_inst_set);
 
   // --------  Organism ---------
   cOrganism * GetOrganism() { return organism; }

Modified: branches/brysonda/source/cpu/cHardwareCPU.cc
===================================================================
--- branches/brysonda/source/cpu/cHardwareCPU.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/cpu/cHardwareCPU.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -7,7 +7,6 @@
 
 #include "cHardwareCPU.h"
 
-#include "cConfig.h"
 #include "cCPUTestInfo.h"
 #include "functions.h"
 #include "cGenomeUtil.h"
@@ -363,8 +362,8 @@
   return inst_lib;
 }
 
-cHardwareCPU::cHardwareCPU(cOrganism * in_organism, cInstSet * in_inst_set)
-  : cHardwareBase(in_organism, in_inst_set)
+cHardwareCPU::cHardwareCPU(cWorld* world, cOrganism* in_organism, cInstSet* in_inst_set)
+  : cHardwareBase(world, in_organism, in_inst_set)
 {
   /* FIXME:  reorganize storage of m_functions.  -- kgn */
   m_functions = s_inst_slib->GetFunctions();
@@ -375,7 +374,7 @@
 
 
 cHardwareCPU::cHardwareCPU(const cHardwareCPU &hardware_cpu)
-: cHardwareBase(hardware_cpu.organism, hardware_cpu.inst_set)
+: cHardwareBase(hardware_cpu.m_world, hardware_cpu.organism, hardware_cpu.inst_set)
 , m_functions(hardware_cpu.m_functions)
 , memory(hardware_cpu.memory)
 , global_stack(hardware_cpu.global_stack)
@@ -397,15 +396,6 @@
 {
 }
 
-
-void cHardwareCPU::Recycle(cOrganism * new_organism, cInstSet * in_inst_set)
-{
-  cHardwareBase::Recycle(new_organism, in_inst_set);
-  memory = new_organism->GetGenome();
-  Reset();
-}
-
-
 void cHardwareCPU::Reset()
 {
   global_stack.Clear();
@@ -451,7 +441,7 @@
 
   // If we have threads turned on and we executed each thread in a single
   // timestep, adjust the number of instructions executed accordingly.
-  const int num_inst_exec = (cConfig::GetThreadSlicingMethod() == 1) ?
+  const int num_inst_exec = (m_world->GetConfig().THREAD_SLICING_METHOD.Get() == 1) ?
     num_threads : 1;
   
   for (int i = 0; i < num_inst_exec; i++) {
@@ -1269,7 +1259,7 @@
     GetLabel().AddNop(inst_set->GetNopMod(inst_ptr->GetInst()));
 
     // If this is the first line of the template, mark it executed.
-    if (GetLabel().GetSize() <=	cConfig::GetMaxLabelExeSize()) {
+    if (GetLabel().GetSize() <=	m_world->GetConfig().MAX_LABEL_EXE_SIZE.Get()) {
       inst_ptr->FlagExecuted() = true;
     }
   }
@@ -1279,7 +1269,7 @@
 bool cHardwareCPU::ForkThread()
 {
   const int num_threads = GetNumThreads();
-  if (num_threads == cConfig::GetMaxCPUThreads()) return false;
+  if (num_threads == m_world->GetConfig().MAX_CPU_THREADS.Get()) return false;
 
   // Make room for the new thread.
   threads.Resize(num_threads + 1);
@@ -1447,7 +1437,7 @@
 bool cHardwareCPU::Allocate_Main(const int allocated_size)
 {
   // must do divide before second allocate & must allocate positive amount...
-  if (cConfig::GetRequireAllocate() && mal_active == true) {
+  if (m_world->GetConfig().REQUIRE_ALLOCATE.Get() && mal_active == true) {
     Fault(FAULT_LOC_ALLOC, FAULT_TYPE_ERROR, "Allocate already active");
     return false;
   }
@@ -1468,7 +1458,7 @@
     return false;
   }
 
-  const int max_alloc_size = (int) (old_size * cConfig::GetChildSizeRange());
+  const int max_alloc_size = (int) (old_size * m_world->GetConfig().CHILD_SIZE_RANGE.Get());
   if (allocated_size > max_alloc_size) {
     Fault(FAULT_LOC_ALLOC, FAULT_TYPE_ERROR,
 	  cStringUtil::Stringf("Allocate too large (%d > %d)",
@@ -1477,7 +1467,7 @@
   }
 
   const int max_old_size =
-    (int) (allocated_size * cConfig::GetChildSizeRange());
+    (int) (allocated_size * m_world->GetConfig().CHILD_SIZE_RANGE.Get());
   if (old_size > max_old_size) {
     Fault(FAULT_LOC_ALLOC, FAULT_TYPE_ERROR,
 	  cStringUtil::Stringf("Allocate too small (%d > %d)",
@@ -1485,7 +1475,7 @@
     return false;
   }
 
-  switch (cConfig::GetAllocMethod()) {
+  switch (m_world->GetConfig().ALLOC_METHOD.Get()) {
   case ALLOC_METHOD_NECRO:
     // Only break if this succeeds -- otherwise just do random.
     if (Allocate_Necro(new_size) == true) break;
@@ -1510,7 +1500,7 @@
   if (organism->Divide_CheckViable() == false) return false; // (divide fails)
 
   // If required, make sure an allocate has occured.
-  if (cConfig::GetRequireAllocate() && mal_active == false) {
+  if (m_world->GetConfig().REQUIRE_ALLOCATE.Get() && mal_active == false) {
     Fault(FAULT_LOC_DIVIDE, FAULT_TYPE_ERROR, "Must allocate before divide");
     return false; //  (divide fails)
   }
@@ -1518,7 +1508,7 @@
   // Make sure that neither parent nor child will be below the minimum size.
 
   const int genome_size = organism->GetGenome().GetSize();
-  const double size_range = cConfig::GetChildSizeRange();
+  const double size_range = m_world->GetConfig().CHILD_SIZE_RANGE.Get();
   const int min_size = Max(MIN_CREATURE_SIZE, (int) (genome_size/size_range));
   const int max_size = Min(MAX_CREATURE_SIZE, (int) (genome_size*size_range));
   
@@ -1541,7 +1531,7 @@
     if (GetMemory().FlagExecuted(i)) executed_size++;
   }
 
-  const int min_exe_lines = (int) (parent_size * cConfig::GetMinExeLines());
+  const int min_exe_lines = (int) (parent_size * m_world->GetConfig().MIN_EXE_LINES.Get());
   if (executed_size < min_exe_lines) {
     Fault(FAULT_LOC_DIVIDE, FAULT_TYPE_ERROR,
 	  cStringUtil::Stringf("Too few executed lines (%d < %d)",
@@ -1557,7 +1547,7 @@
     if (GetMemory().FlagCopied(i)) copied_size++;
   }
 
-  const int min_copied =  (int) (child_size * cConfig::GetMinCopiedLines());
+  const int min_copied =  (int) (child_size * m_world->GetConfig().MIN_COPIED_LINES.Get());
   if (copied_size < min_copied) {
     Fault(FAULT_LOC_DIVIDE, FAULT_TYPE_ERROR,
 	  cStringUtil::Stringf("Too few copied commands (%d < %d)",
@@ -1571,10 +1561,9 @@
   phenotype.SetLinesCopied(copied_size);
 
   // Determine the fitness of this organism as compared to its parent...
-  if (cConfig::GetTestSterilize() == true &&
+  if (m_world->GetTestSterilize() == true &&
       phenotype.IsInjected() == false) {
-    const int merit_base =
-      cPhenotype::CalcSizeMerit(genome_size, copied_size, executed_size);
+    const int merit_base = phenotype.CalcSizeMerit();
     const double cur_fitness =
       merit_base * phenotype.GetCurBonus() / phenotype.GetTimeUsed();
     const double fitness_ratio = cur_fitness / phenotype.GetLastFitness();
@@ -1817,7 +1806,7 @@
 #endif
 
   mal_active = false;
-  if (cConfig::GetDivideMethod() == DIVIDE_METHOD_SPLIT) {
+  if (m_world->GetConfig().DIVIDE_METHOD.Get() == DIVIDE_METHOD_SPLIT) {
     advance_ip = false;
   }
 
@@ -1825,7 +1814,7 @@
   // birth.
   bool parent_alive = organism->ActivateDivide();
   if (parent_alive) {
-    if (cConfig::GetDivideMethod() == DIVIDE_METHOD_SPLIT) Reset();
+    if (m_world->GetConfig().DIVIDE_METHOD.Get() == DIVIDE_METHOD_SPLIT) Reset();
   }
 
   return true;
@@ -2574,7 +2563,7 @@
 bool cHardwareCPU::Inst_MaxAlloc()   // Allocate maximal more
 {
   const int cur_size = GetMemory().GetSize();
-  const int alloc_size = Min((int) (cConfig::GetChildSizeRange() * cur_size),
+  const int alloc_size = Min((int) (m_world->GetConfig().CHILD_SIZE_RANGE.Get() * cur_size),
 			     MAX_CREATURE_SIZE - cur_size);
   if( Allocate_Main(alloc_size) ) {
     Register(nHardwareCPU::REG_AX) = cur_size;
@@ -2619,7 +2608,7 @@
   }
 #endif
 
-  if (cConfig::GetDivideMethod() == DIVIDE_METHOD_SPLIT) advance_ip = false;
+  if (m_world->GetConfig().DIVIDE_METHOD.Get() == DIVIDE_METHOD_SPLIT) advance_ip = false;
 
   organism->ActivateDivide();
 
@@ -2645,7 +2634,7 @@
 
 bool cHardwareCPU::Inst_Die()
 {
-   const double die_prob = cConfig::GetDieProb();
+   const double die_prob = m_world->GetConfig().DIE_PROB.Get();
    if(g_random.GetDouble() < die_prob) { organism->Die(); }
    return true; 
 }
@@ -2864,8 +2853,8 @@
 {
   assert(to_org != NULL);
 
-  const double merit_given = cConfig::GetMeritGiven();
-  const double merit_received = cConfig::GetMeritReceived();
+  const double merit_given = m_world->GetConfig().MERIT_GIVEN.Get();
+  const double merit_received = m_world->GetConfig().MERIT_RECEIVED.Get();
 
   double cur_merit = organism->GetPhenotype().GetMerit().GetDouble();
   cur_merit -= merit_given; 
@@ -2882,7 +2871,7 @@
 bool cHardwareCPU::Inst_DonateRandom()
 {
   organism->GetPhenotype().IncDonates();
-  if (organism->GetPhenotype().GetCurNumDonates() > cConfig::GetMaxDonates()) {
+  if (organism->GetPhenotype().GetCurNumDonates() > m_world->GetConfig().MAX_DONATES.Get()) {
     return false;
   }
 
@@ -2902,7 +2891,7 @@
 bool cHardwareCPU::Inst_DonateKin()
 {
   organism->GetPhenotype().IncDonates();
-  if (organism->GetPhenotype().GetCurNumDonates() > cConfig::GetMaxDonates()) {
+  if (organism->GetPhenotype().GetCurNumDonates() > m_world->GetConfig().MAX_DONATES.Get()) {
     return false;
   }
 
@@ -2915,7 +2904,7 @@
   cOrganism * neighbor = organism->GetNeighbor();
 
   // If there is no max distance, just take the random neighbor we're facing.
-  const int max_dist = cConfig::GetMaxDonateKinDistance();
+  const int max_dist = m_world->GetConfig().MAX_DONATE_KIN_DIST.Get();
   if (max_dist != -1) {
     int max_id = neighbor_id + num_neighbors;
     bool found = false;
@@ -2945,7 +2934,7 @@
 bool cHardwareCPU::Inst_DonateEditDist()
 {
   organism->GetPhenotype().IncDonates();
-  if (organism->GetPhenotype().GetCurNumDonates() > cConfig::GetMaxDonates()) {
+  if (organism->GetPhenotype().GetCurNumDonates() > m_world->GetConfig().MAX_DONATES.Get()) {
     return false;
   }
 
@@ -2958,7 +2947,7 @@
   cOrganism * neighbor = organism->GetNeighbor();
 
   // If there is no max edit distance, take the random neighbor we're facing.
-  const int max_dist = cConfig::GetMaxDonateEditDistance();
+  const int max_dist = m_world->GetConfig().MAX_DONATE_EDIT_DIST.Get();
   if (max_dist != -1) {
     int max_id = neighbor_id + num_neighbors;
     bool found = false;
@@ -2992,14 +2981,14 @@
 bool cHardwareCPU::Inst_DonateNULL()
 {
   organism->GetPhenotype().IncDonates();
-  if (organism->GetPhenotype().GetCurNumDonates() > cConfig::GetMaxDonates()) {
+  if (organism->GetPhenotype().GetCurNumDonates() > m_world->GetConfig().MAX_DONATES.Get()) {
     return false;
   }
 
   // This is a fake donate command that causes the organism to lose merit,
   // but no one else to gain any.
 
-  const double merit_given = cConfig::GetMeritGiven();
+  const double merit_given = m_world->GetConfig().MERIT_GIVEN.Get();
   double cur_merit = organism->GetPhenotype().GetMerit().GetDouble();
   cur_merit -= merit_given;
 

Modified: branches/brysonda/source/cpu/cHardwareCPU.h
===================================================================
--- branches/brysonda/source/cpu/cHardwareCPU.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/cpu/cHardwareCPU.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -5,8 +5,8 @@
 // before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
 //////////////////////////////////////////////////////////////////////////////
 
-#ifndef HARDWARE_CPU_HH
-#define HARDWARE_CPU_HH
+#ifndef cHardwareCPU_h
+#define cHardwareCPU_h
 
 #include <iomanip>
 #include <vector>
@@ -107,10 +107,9 @@
 #endif
 
 public:
-  cHardwareCPU(cOrganism * in_organism, cInstSet * in_inst_set);
+  cHardwareCPU(cWorld* world, cOrganism* in_organism, cInstSet* in_inst_set);
   explicit cHardwareCPU(const cHardwareCPU &);
   ~cHardwareCPU();
-  void Recycle(cOrganism * new_organism, cInstSet * in_inst_set);
   static cInstLibCPU *GetInstLib();
   static cString GetDefaultInstFilename() { return "inst_lib.default"; }
   static void WriteDefaultInstSet() { ; }

Deleted: branches/brysonda/source/cpu/cHardwareFactory.cc
===================================================================
--- branches/brysonda/source/cpu/cHardwareFactory.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/cpu/cHardwareFactory.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,82 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (C) 1993 - 2003 California Institute of Technology             //
-//                                                                          //
-// Read the COPYING and README files, or contact 'avida at alife.org',         //
-// before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
-//////////////////////////////////////////////////////////////////////////////
-
-#include "cHardwareFactory.h"
-
-#include "cHardwareBase.h"
-#include "cHardwareCPU.h"
-#include "cHardware4Stack.h"
-#include "cHardwareSMT.h"
-#include "cInstSet.h"
-#include "cOrganism.h"
-
-using namespace std;
-
-// Static private variables...
-tList<cHardwareBase> cHardwareFactory::hardware_cpu_list;
-int cHardwareFactory::new_count(0);
-int cHardwareFactory::recycle_count(0);
-
-cHardwareBase * cHardwareFactory::Create(cOrganism * in_org,
-					 cInstSet * inst_set, int type)
-{
-  assert(in_org != NULL);
-  assert(inst_set != NULL && inst_set->OK());
-
-  cHardwareBase * new_hardware = NULL;
-
-  // If there is nothing to recycle, just create a new one.
-  if (hardware_cpu_list.GetSize() == 0)
-  {
-    new_count++;
-    switch (type)
-    {
-      case HARDWARE_TYPE_CPU_ORIGINAL:
-        new_hardware = new cHardwareCPU(in_org, inst_set);
-        break;
-      case HARDWARE_TYPE_CPU_4STACK:
-        new_hardware = new cHardware4Stack(in_org, inst_set);
-        break;
-      case HARDWARE_TYPE_CPU_SMT:
-        new_hardware = new cHardwareSMT(in_org, inst_set);
-    }
-  }
-
-  // If we do have hardware to recycle, do so!
-  else {
-    new_hardware = hardware_cpu_list.PopRear();
-    new_hardware->Recycle(in_org, inst_set);
-    recycle_count++;
-  }
-
-  return new_hardware;
-}
-
-// Recycled hardware may be *briefly* in use, so don't delete immediately.
-void cHardwareFactory::Recycle(cHardwareBase * out_hardware)
-{
-  hardware_cpu_list.Push(out_hardware);
-}
-
-// Delete any hardware that needs it, save the rest for re-use.
-void cHardwareFactory::Update()
-{
-  int delete_count = 0;
-  while (hardware_cpu_list.GetSize() > 100) {
-    delete hardware_cpu_list.Pop();
-    delete_count++;
-  }
-
-//    cerr << "   NewHardware: " << new_count
-//         << "   Recycled: " << recycle_count
-//         << "   Deleted: " << delete_count
-//         << "   Stored: " << hardware_cpu_list.GetSize()
-//         << "   Existing: " << cHardwareBase::GetInstanceCount()
-//         << endl;
-
-  new_count = recycle_count = 0;
-}

Deleted: branches/brysonda/source/cpu/cHardwareFactory.h
===================================================================
--- branches/brysonda/source/cpu/cHardwareFactory.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/cpu/cHardwareFactory.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,32 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (C) 1993 - 2001 California Institute of Technology             //
-//                                                                          //
-// Read the COPYING and README files, or contact 'avida at alife.org',         //
-// before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef HARDWARE_FACTORY_HH
-#define HARDWARE_FACTORY_HH
-
-#ifndef TLIST_HH
-#include "tList.h"
-#endif
-
-class cHardwareBase;
-class cOrganism;
-class cInstSet;
-
-class cHardwareFactory {
-private:
-  // A static list for each hardware type.
-  static tList<cHardwareBase> hardware_cpu_list;
-  static int new_count;
-  static int recycle_count;
-public:
-  static cHardwareBase * Create(cOrganism * in_org, cInstSet * inst_set,
-				int type=0);
-  static void Recycle(cHardwareBase * out_hardware);
-  static void Update();
-};
-
-#endif

Copied: branches/brysonda/source/cpu/cHardwareManager.cc (from rev 354, branches/brysonda/source/cpu/cHardwareFactory.cc)
===================================================================
--- branches/brysonda/source/cpu/cHardwareFactory.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/cpu/cHardwareManager.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -0,0 +1,151 @@
+/*
+ *  cHardwareManager.cc
+ *  Avida2
+ *
+ *  Created by David on 10/18/05.
+ *  Copyright 2005 Michigan State University. All rights reserved.
+ *
+ */
+
+#include "cHardwareManager.h"
+
+#include "cHardwareCPU.h"
+#include "cHardware4Stack.h"
+#include "cHardwareSMT.h"
+#include "cInitFile.h"
+#include "cInstLibCPU.h"
+#include "cInstSet.h"
+#include "cWorld.h"
+#include "tDictionary.h"
+
+cHardwareManager::cHardwareManager(cWorld* world) : m_world(world), m_type(world->GetConfig().HARDWARE_TYPE.Get())
+{
+  LoadInstSet(world->GetConfig().INST_SET.Get());
+}
+
+void cHardwareManager::LoadInstSet(cString filename)
+{
+  // Setup the instruction library and collect the default filename
+  cString default_filename;
+	switch (m_type)
+	{
+		case HARDWARE_TYPE_CPU_ORIGINAL:
+      m_inst_set.SetInstLib(cHardwareCPU::GetInstLib());
+			default_filename = cHardwareCPU::GetDefaultInstFilename();
+			break;
+		case HARDWARE_TYPE_CPU_4STACK:
+      m_inst_set.SetInstLib(cHardware4Stack::GetInstLib());
+			default_filename = cHardware4Stack::GetDefaultInstFilename();
+			break;
+		case HARDWARE_TYPE_CPU_SMT:
+      m_inst_set.SetInstLib(cHardwareSMT::GetInstLib());
+			default_filename = cHardwareSMT::GetDefaultInstFilename();
+			break;		
+		default:
+			default_filename = "unknown";
+  }
+  
+  if (filename == "")
+	{
+    filename = default_filename;
+    cerr << "Warning: No instruction set specified; using default '"
+    << filename << "'." << endl;
+  }
+  
+  cInitFile file(filename);
+  
+  // If we could not open the instruction set what to do?
+  if (file.IsOpen() == false)
+	{
+    
+    // If this is the default filename, write the file and try again.
+    if (filename == default_filename)
+		{
+			switch (m_type)
+			{
+				case HARDWARE_TYPE_CPU_ORIGINAL:
+					cHardwareCPU::WriteDefaultInstSet();
+					break;
+				case HARDWARE_TYPE_CPU_4STACK:
+					cHardware4Stack::WriteDefaultInstSet();
+					break;
+				case HARDWARE_TYPE_CPU_SMT:
+					cHardwareSMT::WriteDefaultInstSet();
+			}
+    }
+    // If this is not the default filename, give and error and stop.
+    else
+		{
+      cerr << "Error: Could not open instruction set '" << filename
+      << "'.  Exiting..." << endl;
+      exit(1);
+    }
+  }
+  
+  file.Load();
+  file.Compress();
+  
+  tDictionary<int> nop_dict;
+  for(int i = 0; i < m_inst_set.GetInstLib()->GetNumNops(); i++)
+    nop_dict.Add(m_inst_set.GetInstLib()->GetNopName(i), i);
+  
+  tDictionary<int> inst_dict;
+  for(int i = 0; i < m_inst_set.GetInstLib()->GetSize(); i++)
+    inst_dict.Add(m_inst_set.GetInstLib()->GetName(i), i);
+  
+  for (int line_id = 0; line_id < file.GetNumLines(); line_id++) {
+    cString cur_line = file.GetLine(line_id);
+    cString inst_name = cur_line.PopWord();
+    int redundancy = cur_line.PopWord().AsInt();
+    int cost = cur_line.PopWord().AsInt();
+    int ft_cost = cur_line.PopWord().AsInt();
+    double prob_fail = cur_line.PopWord().AsDouble();
+    
+    // If this instruction has 0 redundancy, we don't want it!
+    if (redundancy < 0) continue;
+    if (redundancy > 256) {
+      cerr << "Warning: Max redundancy is 256.  Resetting redundancy of \""
+      << inst_name << "\" from " << redundancy << " to 256." << endl;
+      redundancy = 256;
+    }
+    
+    // Otherwise, this instruction will be in the set.
+    // First, determine if it is a nop...
+    int nop_mod = -1;
+    if(nop_dict.Find(inst_name, nop_mod) == true) {
+      m_inst_set.AddNop2(nop_mod, redundancy, ft_cost, cost, prob_fail);
+      continue;
+    }
+    
+    // Otherwise, it had better be in the main dictionary...
+    int fun_id = -1;
+    if(inst_dict.Find(inst_name, fun_id) == true){
+      m_inst_set.Add2(fun_id, redundancy, ft_cost, cost, prob_fail);
+      continue;
+    }
+    
+    // Oh oh!  Didn't find an instruction!
+    cerr << endl
+      << "Error: Could not find instruction '" << inst_name << "'" << endl
+      << "       (Best match = '"
+      << inst_dict.NearMatch(inst_name) << "').  Exiting..." << endl;
+    exit(1);
+  }
+}
+
+cHardwareBase* cHardwareManager::Create(cOrganism* in_org)
+{
+  assert(in_org != NULL);
+  
+  switch (m_type)
+  {
+    case HARDWARE_TYPE_CPU_ORIGINAL:
+      return new cHardwareCPU(m_world, in_org, &m_inst_set);
+    case HARDWARE_TYPE_CPU_4STACK:
+      return new cHardware4Stack(m_world, in_org, &m_inst_set);
+    case HARDWARE_TYPE_CPU_SMT:
+      return new cHardwareSMT(m_world, in_org, &m_inst_set);
+    default:
+      return NULL;
+  }
+}

Copied: branches/brysonda/source/cpu/cHardwareManager.h (from rev 354, branches/brysonda/source/cpu/cHardwareFactory.h)
===================================================================
--- branches/brysonda/source/cpu/cHardwareFactory.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/cpu/cHardwareManager.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -0,0 +1,43 @@
+/*
+ *  cHardwareManager.h
+ *  Avida2
+ *
+ *  Created by David on 10/18/05.
+ *  Copyright 2005 Michigan State University. All rights reserved.
+ *
+ */
+
+#ifndef cHardwareManager_h
+#define cHardwareManager_h
+
+#ifndef cInstSet_h
+#include "cInstSet.h";
+#endif
+
+class cOrganism;
+class cHardwareBase;
+class cWorld;
+
+class cHardwareManager
+{
+private:
+  cHardwareManager() { ; }
+  
+protected:
+  cWorld* m_world;
+  cInstSet m_inst_set;
+  int m_type;
+  
+public:
+  cHardwareManager(cWorld* world);
+  ~cHardwareManager() { ; }
+  
+  cHardwareBase* Create(cOrganism* in_org);
+
+  void LoadInstSet(cString filename);
+  
+  const cInstSet& GetInstSet() const { return m_inst_set; }
+  cInstSet& GetInstSet() { return m_inst_set; }
+};
+
+#endif

Modified: branches/brysonda/source/cpu/cHardwareSMT.cc
===================================================================
--- branches/brysonda/source/cpu/cHardwareSMT.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/cpu/cHardwareSMT.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -9,7 +9,6 @@
 
 #include "cHardwareSMT.h"
 
-#include "cConfig.h"
 #include "cCPUTestInfo.h"
 #include "functions.h"
 #include "cGenomeUtil.h"
@@ -120,8 +119,8 @@
   return inst_lib;
 }
 
-cHardwareSMT::cHardwareSMT(cOrganism* in_organism, cInstSet* in_inst_set)
-: cHardwareBase(in_organism, in_inst_set), m_mem_array(1),
+cHardwareSMT::cHardwareSMT(cWorld* world, cOrganism* in_organism, cInstSet* in_inst_set)
+: cHardwareBase(world, in_organism, in_inst_set), m_mem_array(1),
 m_mem_lbls(Pow(nHardwareSMT::NUM_NOPS, nHardwareSMT::MAX_MEMSPACE_LABEL) / nHardwareSMT::MEM_LBLS_HASH_FACTOR)
 {
   m_functions = s_inst_slib->GetFunctions();
@@ -132,16 +131,6 @@
   Reset();                            // Setup the rest of the hardware...
 }
 
-void cHardwareSMT::Recycle(cOrganism * new_organism, cInstSet * in_inst_set)
-{
-  cHardwareBase::Recycle(new_organism, in_inst_set);
-  m_mem_array[0] = new_organism->GetGenome();
-  m_mem_array[0].Resize(m_mem_array[0].GetSize() + 1);
-  m_mem_array[0][m_mem_array[0].GetSize() - 1] = cInstruction();
-  Reset();
-}
-
-
 void cHardwareSMT::Reset()
 {
   // Setup the memory...
@@ -185,7 +174,7 @@
   cPhenotype & phenotype = organism->GetPhenotype();
   phenotype.IncTimeUsed();
 	
-  const int num_inst_exec = (cConfig::GetThreadSlicingMethod() == 1) ? GetNumThreads() : 1;
+  const int num_inst_exec = (m_world->GetConfig().THREAD_SLICING_METHOD.Get() == 1) ? GetNumThreads() : 1;
   
   for (int i = 0; i < num_inst_exec; i++) {
     // Setup the hardware for the next instruction to be executed.
@@ -1019,7 +1008,7 @@
     GetLabel().AddNop(inst_set->GetNopMod(inst_ptr->GetInst()));
 		
     // If this is the first line of the template, mark it executed.
-    if (GetLabel().GetSize() <=	cConfig::GetMaxLabelExeSize()) {
+    if (GetLabel().GetSize() <=	m_world->GetConfig().MAX_LABEL_EXE_SIZE.Get()) {
       inst_ptr->FlagExecuted() = true;
     }
   }
@@ -1029,7 +1018,7 @@
 bool cHardwareSMT::ForkThread()
 {
   const int num_threads = GetNumThreads();
-  if (num_threads == cConfig::GetMaxCPUThreads()) return false;
+  if (num_threads == m_world->GetConfig().MAX_CPU_THREADS.Get()) return false;
 	
   // Make room for the new thread.
   m_threads.Resize(num_threads + 1);
@@ -1230,7 +1219,7 @@
   // Make sure that neither parent nor child will be below the minimum size.
 	
   const int genome_size = organism->GetGenome().GetSize();
-  const double size_range = cConfig::GetChildSizeRange();
+  const double size_range = m_world->GetConfig().CHILD_SIZE_RANGE.Get();
   const int min_size = Max(MIN_CREATURE_SIZE, (int) (genome_size/size_range));
   const int max_size = Min(MAX_CREATURE_SIZE, (int) (genome_size*size_range));
   
@@ -1248,7 +1237,7 @@
     if (m_mem_array[0].FlagExecuted(i)) executed_size++;
   }
 	
-  const int min_exe_lines = (int) (parent_size * cConfig::GetMinExeLines());
+  const int min_exe_lines = (int) (parent_size * m_world->GetConfig().MIN_EXE_LINES.Get());
   if (executed_size < min_exe_lines) {
     Fault(FAULT_LOC_DIVIDE, FAULT_TYPE_ERROR,
 					cStringUtil::Stringf("Too few executed lines (%d < %d)",
@@ -1264,7 +1253,7 @@
     if (m_mem_array[mem_space].FlagCopied(i)) copied_size++;
 	}
 	
-  const int min_copied = static_cast<int>(child_size * cConfig::GetMinCopiedLines());
+  const int min_copied = static_cast<int>(child_size * m_world->GetConfig().MIN_COPIED_LINES.Get());
   if (copied_size < min_copied) {
     Fault(FAULT_LOC_DIVIDE, FAULT_TYPE_ERROR,
 					cStringUtil::Stringf("Too few copied commands (%d < %d)",
@@ -1583,16 +1572,17 @@
   // 1) DIVIDE_METHOD_OFFSPRING - Create a child, leave parent state untouched.
   // 2) DIVIDE_METHOD_SPLIT - Create a child, completely reset state of parent.
   // 3) DIVIDE_METHOD_BIRTH - Create a child, reset state of parent's current thread.
-  if(parent_alive && !(cConfig::GetDivideMethod() == DIVIDE_METHOD_OFFSPRING))
+  const int div_method = m_world->GetConfig().DIVIDE_METHOD.Get();
+  if (parent_alive && !(div_method == DIVIDE_METHOD_OFFSPRING))
 	{
 		
-		if(cConfig::GetDivideMethod() == DIVIDE_METHOD_SPLIT)
+		if (div_method == DIVIDE_METHOD_SPLIT)
 		{
 			//this will wipe out all parasites on a divide.
 			Reset();
 			
 		}
-		else if(cConfig::GetDivideMethod() == DIVIDE_METHOD_BIRTH)
+		else if (div_method == DIVIDE_METHOD_BIRTH)
 		{
 			if(!organism->GetPhenotype().IsModified() && GetNumThreads() > 1 || GetNumThreads() > 2) {
         //if this isn't the only thread, get rid of it!

Modified: branches/brysonda/source/cpu/cHardwareSMT.h
===================================================================
--- branches/brysonda/source/cpu/cHardwareSMT.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/cpu/cHardwareSMT.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -95,9 +95,8 @@
   cHardwareSMT(const cHardwareSMT &); // disabled...  can't (easily) copy m_mem_lbls @dmb
 
 public:
-  cHardwareSMT(cOrganism * in_organism, cInstSet * in_inst_set);
+  cHardwareSMT(cWorld* world, cOrganism* in_organism, cInstSet* in_inst_set);
   ~cHardwareSMT() { ; }
-  void Recycle(cOrganism* new_organism, cInstSet * in_inst_set);
   static cInstLibBase* GetInstLib();
   static cString GetDefaultInstFilename() { return "inst_lib.4stack"; }
   static void WriteDefaultInstSet() { ; }

Deleted: branches/brysonda/source/cpu/cHardwareUtil.cc
===================================================================
--- branches/brysonda/source/cpu/cHardwareUtil.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/cpu/cHardwareUtil.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,162 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (C) 1993 - 2003 California Institute of Technology             //
-//                                                                          //
-// Read the COPYING and README files, or contact 'avida at alife.org',         //
-// before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef HARDWARE_UTIL_HH
-#include "cHardwareUtil.h"
-#endif
-
-#ifndef CONFIG_HH
-#include "cConfig.h"
-#endif
-#ifndef HARDWARE_UTIL_HH
-#include "cHardwareBase.h"
-#endif
-#ifndef HARDWARE_CPU_HH
-#include "cHardwareCPU.h"
-#endif
-#ifndef HARDWARE_4STACK_HH
-#include "cHardware4Stack.h"
-#endif
-#ifndef HARDWARE_SMT_H
-#include "cHardwareSMT.h"
-#endif
-#ifndef INIT_FILE_HH
-#include "cInitFile.h"
-#endif
-#ifndef INST_LIB_CPU_HH
-#include "cInstLibCPU.h"
-#endif
-#ifndef INST_SET_HH
-#include "cInstSet.h"
-#endif
-#ifndef TDICTIONARY_HH
-#include "tDictionary.h"
-#endif
-
-using namespace std;
-
-
-void cHardwareUtil::LoadInstSet(cString filename, cInstSet & inst_set)
-{
-  // Setup the instruction library and collect the default filename
-  cString default_filename;
-	switch (cConfig::GetHardwareType())
-	{
-		case HARDWARE_TYPE_CPU_ORIGINAL:
-      inst_set.SetInstLib(cHardwareCPU::GetInstLib());
-			default_filename = cHardwareCPU::GetDefaultInstFilename();
-			break;
-		case HARDWARE_TYPE_CPU_4STACK:
-      inst_set.SetInstLib(cHardware4Stack::GetInstLib());
-			default_filename = cHardware4Stack::GetDefaultInstFilename();
-			break;
-		case HARDWARE_TYPE_CPU_SMT:
-      inst_set.SetInstLib(cHardwareSMT::GetInstLib());
-			default_filename = cHardwareSMT::GetDefaultInstFilename();
-			break;		
-		default:
-			default_filename = "unknown";
-  }
-  
-  if (filename == "")
-	{
-    filename = default_filename;
-    cerr << "Warning: No instruction set specified; using default '"
-         << filename << "'." << endl;
-  }
-  
-  cInitFile file(filename);
-  
-  // If we could not open the instruction set what to do?
-  if (file.IsOpen() == false)
-	{
-    
-    // If this is the default filename, write the file and try again.
-    if (filename == default_filename)
-		{
-			switch (cConfig::GetHardwareType())
-			{
-				case HARDWARE_TYPE_CPU_ORIGINAL:
-					cHardwareCPU::WriteDefaultInstSet();
-					break;
-				case HARDWARE_TYPE_CPU_4STACK:
-					cHardware4Stack::WriteDefaultInstSet();
-					break;
-				case HARDWARE_TYPE_CPU_SMT:
-					cHardwareSMT::WriteDefaultInstSet();
-			}
-    }
-    // If this is not the default filename, give and error and stop.
-    else
-		{
-      cerr << "Error: Could not open instruction set '" << filename
-           << "'.  Exiting..." << endl;
-      exit(1);
-    }
-  }
-  
-  file.Load();
-  file.Compress();
-  
-  tDictionary<int> nop_dict;
-  for(int i = 0; i < inst_set.GetInstLib()->GetNumNops(); i++)
-    nop_dict.Add(inst_set.GetInstLib()->GetNopName(i), i);
-  
-  tDictionary<int> inst_dict;
-  for(int i = 0; i < inst_set.GetInstLib()->GetSize(); i++)
-    inst_dict.Add(inst_set.GetInstLib()->GetName(i), i);
-  
-  for (int line_id = 0; line_id < file.GetNumLines(); line_id++) {
-    cString cur_line = file.GetLine(line_id);
-    cString inst_name = cur_line.PopWord();
-    int redundancy = cur_line.PopWord().AsInt();
-    int cost = cur_line.PopWord().AsInt();
-    int ft_cost = cur_line.PopWord().AsInt();
-    double prob_fail = cur_line.PopWord().AsDouble();
-    
-    // If this instruction has 0 redundancy, we don't want it!
-    if (redundancy < 0) continue;
-    if (redundancy > 256) {
-      cerr << "Warning: Max redundancy is 256.  Resetting redundancy of \""
-      << inst_name << "\" from " << redundancy << " to 256." << endl;
-      redundancy = 256;
-    }
-    
-    // Otherwise, this instruction will be in the set.
-    // First, determine if it is a nop...
-    int nop_mod = -1;
-    if(nop_dict.Find(inst_name, nop_mod) == true) {
-      inst_set.AddNop2(nop_mod, redundancy, ft_cost, cost, prob_fail);
-      continue;
-    }
-    
-    // Otherwise, it had better be in the main dictionary...
-    int fun_id = -1;
-    if(inst_dict.Find(inst_name, fun_id) == true){
-      inst_set.Add2(fun_id, redundancy, ft_cost, cost, prob_fail);
-      continue;
-    }
-    
-    // Oh oh!  Didn't find an instruction!
-    cerr << endl
-      << "Error: Could not find instruction '" << inst_name << "'" << endl
-      << "       (Best match = '"
-      << inst_dict.NearMatch(inst_name) << "').  Exiting..." << endl;
-    exit(1);
-  }
-}
-
-cInstSet & cHardwareUtil::DefaultInstSet(const cString & inst_filename)
-{
-  static cInstSet inst_set;
-  
-  // If we don't have an instruction set yet, set it up.
-  if (inst_set.GetSize() == 0) LoadInstSet(inst_filename, inst_set);
-
-  return inst_set;
-}
-

Deleted: branches/brysonda/source/cpu/cHardwareUtil.h
===================================================================
--- branches/brysonda/source/cpu/cHardwareUtil.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/cpu/cHardwareUtil.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,24 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (C) 1993 - 2003 California Institute of Technology             //
-//                                                                          //
-// Read the COPYING and README files, or contact 'avida at alife.org',         //
-// before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef HARDWARE_UTIL_HH
-#define HARDWARE_UTIL_HH
-
-#ifndef STRING_HH
-#include "cString.h"
-#endif
-
-class cString; // aggregate
-class cInstSet;
-
-class cHardwareUtil {
-public:
-  static void LoadInstSet( cString filename, cInstSet& inst_set);
-  static cInstSet& DefaultInstSet(const cString & inst_filename);
-};
-
-#endif

Modified: branches/brysonda/source/cpu/cHeadCPU.cc
===================================================================
--- branches/brysonda/source/cpu/cHeadCPU.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/cpu/cHeadCPU.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -21,7 +21,7 @@
 #ifndef HARDWARE_BASE_HH
 #include "cHardwareBase.h"
 #endif
-#ifndef INST_SET_HH
+#ifndef cInstSet_h
 #include "cInstSet.h"
 #endif
 #ifndef INSTRUCTION_HH

Modified: branches/brysonda/source/cpu/cHeadMultiMem.cc
===================================================================
--- branches/brysonda/source/cpu/cHeadMultiMem.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/cpu/cHeadMultiMem.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -15,7 +15,7 @@
 #ifndef HARDWARE_BASE_HH
 #include "cHardwareBase.h"
 #endif
-#ifndef INST_SET_HH
+#ifndef cInstSet_h
 #include "cInstSet.h"
 #endif
 #ifndef INSTRUCTION_HH

Modified: branches/brysonda/source/cpu/cInstLibCPU.h
===================================================================
--- branches/brysonda/source/cpu/cInstLibCPU.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/cpu/cInstLibCPU.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -6,7 +6,7 @@
 #include "cInstLibBase.h"
 #endif
 
-#ifndef HARDWARE_CPU_HH
+#ifndef cHardwareCPU_h
 #include "cHardwareCPU.h"
 #endif
 #ifndef INSTRUCTION_HH

Modified: branches/brysonda/source/cpu/cTestCPU.cc
===================================================================
--- branches/brysonda/source/cpu/cTestCPU.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/cpu/cTestCPU.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -8,10 +8,10 @@
 #include "cTestCPU.h"
 
 #include "cCPUTestInfo.h"
-#include "cConfig.h"
 #include "cEnvironment.h"
 #include "functions.h"
 #include "cHardwareBase.h"
+#include "cHardwareManager.h"
 #include "cHardwareStatusPrinter.h"
 #include "cInstSet.h"
 #include "cInstUtil.h"
@@ -22,6 +22,7 @@
 #include "cResourceLib.h"
 #include "cResource.h"
 #include "cStringUtil.h"
+#include "cWorld.h"
 #include "tMatrix.h"
 
 #include <iomanip>
@@ -30,9 +31,10 @@
 
 
 // Static Variables
+cWorld* cTestCPU::m_world(NULL);
 cInstSet * cTestCPU::inst_set(NULL);
 cEnvironment * cTestCPU::environment(NULL);
-cPopulationInterface cTestCPU::test_interface;
+cPopulationInterface* cTestCPU::test_interface;
 tArray<int> cTestCPU::input_array;
 tArray<int> cTestCPU::receive_array;
 int cTestCPU::cur_input;
@@ -40,6 +42,7 @@
 cResourceCount cTestCPU::resource_count;
 
 bool cTestCPU::initialized(false);
+int cTestCPU::time_mod(20);
 bool cTestCPU::d_useResources(false);
 tArray<double> cTestCPU::d_emptyDoubleArray;
 tArray<double> cTestCPU::d_resources;
@@ -49,20 +52,16 @@
 //  cTestCPU  (Static Class)
 //////////////////////////////
 
-void cTestCPU::Setup(cInstSet * in_inst_set,
-		     cEnvironment * in_env,
-		     int resourceSize,
-		     const cPopulationInterface & in_interface)
+void cTestCPU::Setup(cWorld* world, int resourceSize)
 {
-  inst_set = in_inst_set;
-  environment = in_env;
-  resource_count.SetSize(in_env->GetResourceLib().GetSize());
-  //d_emptyDoubleArray.ResizeClear(in_env->GetResourceLib().GetSize());
-  //d_resources.ResizeClear(in_env->GetResourceLib().GetSize());
+  m_world = world;
+  environment = &world->GetEnvironment();
+  inst_set = &world->GetHardwareManager().GetInstSet();
+  resource_count.SetSize(environment->GetResourceLib().GetSize());
+  test_interface = new cPopulationInterface(world);
   SetupResources();
-  test_interface = in_interface;
+  time_mod = world->GetConfig().TEST_CPU_TIME_MOD.Get();
   initialized = true;
-
 }
 
 void cTestCPU::SetupResources(void) {
@@ -80,8 +79,7 @@
     d_emptyDoubleArray[i] = 0.0;
     d_resources[i] = 0.0;
   }
-  //resource_count.ResizeSpatialGrids(cConfig::GetWorldX(),
-  //				    cConfig::GetWorldY());
+
   resource_count.ResizeSpatialGrids(1, 1);
 
   for (int i = 0; i < resource_lib.GetSize(); i++) {
@@ -134,8 +132,7 @@
   cOrganism & organism = *( test_info.org_array[cur_depth] );
 
   // Determine how long this organism should be tested for...
-  int time_allocated = cConfig::GetTestCPUTimeMod() *
-    organism.GetGenome().GetSize();
+  int time_allocated = time_mod * organism.GetGenome().GetSize();
 
   // Make sure this genome stands a chance...
   if (TestIntegrity(organism.GetGenome()) == false)  time_allocated = 0;
@@ -156,7 +153,6 @@
     organism.GetHardware().SetTrace(tracer);
     organism.GetHardware().SingleProcess();
     organism.GetHardware().SetTrace(NULL);
-    //resource_count.Update(1/cConfig::GetAveTimeslice());
     // @CAO Need to watch out for parasites.
   }
 
@@ -257,8 +253,7 @@
   if (test_info.org_array[cur_depth] != NULL) {
     delete test_info.org_array[cur_depth];
   }
-  test_info.org_array[cur_depth] =
-    new cOrganism(genome, test_interface, *environment);
+  test_info.org_array[cur_depth] = new cOrganism(m_world, genome, environment);
   cOrganism & organism = *( test_info.org_array[cur_depth] );
   organism.GetPhenotype().SetupInject(genome.GetSize());
 

Modified: branches/brysonda/source/cpu/cTestCPU.h
===================================================================
--- branches/brysonda/source/cpu/cTestCPU.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/cpu/cTestCPU.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -29,12 +29,14 @@
 class cCPUTestInfo;
 class cGenome;
 class cString; // aggregate
+class cWorld;
 
 class cTestCPU {
 private:
+  static cWorld* m_world;
   static cInstSet * inst_set;
   static cEnvironment * environment;
-  static cPopulationInterface test_interface;
+  static cPopulationInterface* test_interface;
   static tArray<int> input_array;
   static tArray<int> receive_array;
   static int cur_input;
@@ -45,6 +47,7 @@
   static tArray<double> d_resources;
   
   static bool initialized;
+  static int time_mod;
 
   static bool ProcessGestation(cCPUTestInfo & test_info, int cur_depth);
 
@@ -52,11 +55,7 @@
 			      int cur_depth);
 
 public:
-  static void Setup(cInstSet * in_inst_set,
-  		    cEnvironment * in_env,
-		    int resourceSize,
-		    const cPopulationInterface & in_interface
-		    );
+  static void Setup(cWorld* world, int resourceSize);
   static void SetInstSet(cInstSet * in_inst_set);
 
   static bool TestGenome(cCPUTestInfo & test_info, const cGenome & genome);

Deleted: branches/brysonda/source/cpu/cpu.pri
===================================================================
--- branches/brysonda/source/cpu/cpu.pri	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/cpu/cpu.pri	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,33 +0,0 @@
-
-cpu {
-  HEADERS += \
-             $$CPU_HH/cCodeLabel.h \
-             $$CPU_HH/nHardware.h \
-             $$CPU_HH/cCPUMemory.h \
-             $$CPU_HH/cCPUStack.h \
-             $$CPU_HH/sCPUStats.h \
-             $$CPU_HH/cHardware4Stack.h \
-             $$CPU_HH/cHardwareBase.h \
-             $$CPU_HH/cHardwareCPU.h \
-             $$CPU_HH/cHardwareFactory.h \
-             $$CPU_HH/cHardwareUtil.h \
-             $$CPU_HH/cTestCPU.h \
-             $$CPU_HH/cTestUtil.h
-
-  SOURCES += \
-             $$CPU_CC/4stack_head.cc \
-             $$CPU_CC/cCodeLabel.cc \
-             $$CPU_CC/cpu_head.cc \
-             $$CPU_CC/cCPUMemory.cc \
-             $$CPU_CC/cCPUStack.cc \
-             $$CPU_CC/cCPUTestInfo.cc \
-             $$CPU_CC/cHardware4Stack.cc \
-             $$CPU_CC/cHardware4Stack_Thread.cc \
-             $$CPU_CC/cHardwareBase.cc \
-             $$CPU_CC/cHardwareCPU.cc \
-             $$CPU_CC/cHardwareCPU_Thread.cc \
-             $$CPU_CC/cHardwareFactory.cc \
-             $$CPU_CC/cHardwareUtil.cc \
-             $$CPU_CC/cTestCPU.cc \
-             $$CPU_CC/cTestUtil.cc
-}

Modified: branches/brysonda/source/defs.h
===================================================================
--- branches/brysonda/source/defs.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/defs.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -11,9 +11,6 @@
 #define VERSION "2.3.1"
 #define VERSION_TAG "Padawan"
 
-
-#define DEFAULT_DIR "../work/"
-
 /*
 FIXME:  remove asap, switching to file-configureable option
 */
@@ -180,4 +177,45 @@
 	HARDWARE_TYPE_CPU_SMT
 };
 
+#define SLICE_CONSTANT         0
+#define SLICE_PROB_MERIT       1
+#define SLICE_INTEGRATED_MERIT 2
+
+#define POSITION_CHILD_RANDOM           0
+#define POSITION_CHILD_AGE              1
+#define POSITION_CHILD_MERIT            2
+#define POSITION_CHILD_EMPTY            3
+#define NUM_LOCAL_POSITION_CHILD        4
+
+#define POSITION_CHILD_FULL_SOUP_RANDOM 4
+#define POSITION_CHILD_FULL_SOUP_ELDEST 5
+#define POSITION_CHILD_DEME_RANDOM      6
+
+#define DEATH_METHOD_OFF       0
+#define DEATH_METHOD_CONST     1
+#define DEATH_METHOD_MULTIPLE  2
+
+#define ALLOC_METHOD_DEFAULT   0
+#define ALLOC_METHOD_NECRO     1
+#define ALLOC_METHOD_RANDOM    2
+
+#define DIVIDE_METHOD_OFFSPRING 0
+#define DIVIDE_METHOD_SPLIT     1
+#define DIVIDE_METHOD_BIRTH     2
+
+#define GENERATION_INC_OFFSPRING 0
+#define GENERATION_INC_BOTH      1
+
+#define TASK_MERIT_OFF         0
+#define TASK_MERIT_EXPONENTIAL 1
+#define TASK_MERIT_LINEAR      2
+
+#define SIZE_MERIT_OFF         0
+#define SIZE_MERIT_COPIED      1
+#define SIZE_MERIT_EXECUTED    2
+#define SIZE_MERIT_FULL        3
+#define SIZE_MERIT_LEAST       4
+#define SIZE_MERIT_SQRT_LEAST  5
+
+
 #endif

Modified: branches/brysonda/source/event/CMakeLists.txt
===================================================================
--- branches/brysonda/source/event/CMakeLists.txt	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/event/CMakeLists.txt	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,9 +1,8 @@
 SET(libevent_a_SOURCES
-  cEventFactoryManager.cc
+  cEventManager.cc
   cEventList.cc
   cEventListIterator.cc
   cEventTriggers.cc
-  cPopulationEventFactory.cc
 )
 
 INCLUDE_DIRECTORIES(${ALL_INC_DIRS})

Modified: branches/brysonda/source/event/cEvent.h
===================================================================
--- branches/brysonda/source/event/cEvent.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/event/cEvent.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -14,34 +14,29 @@
 
 /**
  * This is a virtual base class for an event in Avida.
- * It holds the name of the event, a string of arguments, and the id of
- * the factory (@ref cEventFactory) it is created from.
+ * It holds the name of the event, a string of arguments
  **/
 
-class cString; // aggregate
+class cWorld;
 
 class cEvent {
 public:
   enum eTriggerVariable { UPDATE, GENERATION, IMMEDIATE, UNDEFINED };
 
 private:
-  int m_factory_id;
 
   // not implemented, prevents inadvertent wrong instantiation
   cEvent(const cEvent&);
   cEvent& operator=(const cEvent&);
 
 protected:
+  cWorld* m_world;
   cString m_args;
 
 public:
-  // constructors
-  cEvent(int factory_id = -1 ) : m_factory_id(factory_id), m_args("") { ; }
+  cEvent() : m_world(NULL), m_args("") { ; }
   virtual ~cEvent() { ; }
 
-  int GetFactoryId() const { return m_factory_id; }
-  void SetFactoryId(int factory_id) { m_factory_id = factory_id; }
-  
   const cString& GetArgs() const { return m_args; }
 
   /**
@@ -49,7 +44,7 @@
    **/
   
   // Configures the event for use.
-  virtual void Configure(const cString& args = "") = 0;
+  virtual void Configure(cWorld* world, const cString& args = "") = 0;
 
   // Does the actual 'thing' the event is supposed to do.
   virtual void Process() = 0;

Deleted: branches/brysonda/source/event/cEventFactoryManager.cc
===================================================================
--- branches/brysonda/source/event/cEventFactoryManager.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/event/cEventFactoryManager.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,82 +0,0 @@
-
-#include "cEventFactoryManager.h"
-
-#ifndef STRING_HH
-#include "cString.h"
-#endif
-
-#ifndef EVENT_HH
-#include "cEvent.h"
-#endif
-
-#include <iostream>
-
-using namespace std;
-
-
-/////////////////
-//  cEventFactoryManager
-/////////////////
-
-cEventFactoryManager::cEventFactoryManager()
-{
-}
-
-cEventFactoryManager::~cEventFactoryManager(){
-  tListIterator<tObjectFactory<cEvent* ()> > it(m_factory_list);  
-  while (it.Next() != NULL) delete it.Get();
-}
-
-
-cEvent*
-cEventFactoryManager::ConstructEvent(const cString name,
-                                     const cString & args,
-                                     int factory_id){
-  cEvent* event = NULL;
-  
-  // factory_id < 0 => send to all factories
-  if( factory_id < 0 ) {
-    tListIterator<tObjectFactory<cEvent* ()> > it(m_factory_list);
-    while (it.Next() != NULL) {
-      event = (it.Get())->Create(name);
-      
-      // if we have found one factory that can create the event we want we stop.
-      if (event != NULL) break;
-    }
-  }
-  else{
-    // send to particular factory
-    if (factory_id >= m_factory_list.GetSize()) return NULL;
-    if( m_factory_list.GetPos(factory_id) != NULL )
-      event = m_factory_list.GetPos(factory_id)->Create(name);
-  }
-  
-  event->Configure(args);
-  return event;
-}
-
-
-int cEventFactoryManager::AddFactory(tObjectFactory<cEvent* ()>* factory)
-{
-  assert( factory != NULL );
-  m_factory_list.Push(factory);
-  
-  int id = m_factory_list.GetSize();
-  factory->SetFactoryId(id);
-  
-  return id;
-}
-
-void cEventFactoryManager::PrintAllEventDescriptions()
-{
-  tListIterator<tObjectFactory<cEvent* ()> > it(m_factory_list);
-  while (it.Next() != NULL) {
-    tArray<cEvent*> events;
-    it.Get()->CreateAll(events);
-    
-    for (int i = 0; i < events.GetSize(); i++) {
-      cout << events[i]->GetDescription() << endl;
-      delete events[i];
-    }
-  }
-}
\ No newline at end of file

Deleted: branches/brysonda/source/event/cEventFactoryManager.h
===================================================================
--- branches/brysonda/source/event/cEventFactoryManager.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/event/cEventFactoryManager.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,57 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (C) 1993 - 2003 California Institute of Technology             //
-//                                                                          //
-// Read the COPYING and README files, or contact 'avida at alife.org',         //
-// before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef EVENT_FACTORY_MANAGER_HH
-#define EVENT_FACTORY_MANAGER_HH
-
-#ifndef TLIST_HH
-#include "tList.h"
-#endif
-
-#ifndef TOBJECTFACTORY_H
-#include "tObjectFactory.h"
-#endif
-
-#ifndef STRING_HH
-#include "cString.h"
-#endif
-
-/**
- * This class serves as a collection of different event factories
- * (@ref cEventFactory). It is useful to have different event factories if
- * we want to have events with different base types, say one type that operates
- * on class A, while the other operates on class B.
- **/
-
-class cEventFactory;
-class cEvent;
-class cString; // aggregate
-
-class cEventFactoryManager {
-private:
-  tList< tObjectFactory<cEvent* ()> > m_factory_list;
-
-  // not implemented, prevents inadvertent wrong instantiation
-  cEventFactoryManager( const cEventFactoryManager & );
-  cEventFactoryManager& operator=( const cEventFactoryManager& );
-public:
-  cEventFactoryManager();
-  ~cEventFactoryManager();
-
-  int AddFactory(tObjectFactory<cEvent* ()>* factory);
-
-  /**
-   * This function is used to construct an event. It sends the event's name
-   * to all registered factories if no factory id is given, otherwise it
-   * sends it to the particular factory requested.
-   **/
-  cEvent* ConstructEvent(const cString name, const cString & args, int factory_id = -1);
-  
-  void PrintAllEventDescriptions();
-};
-
-#endif

Modified: branches/brysonda/source/event/cEventList.cc
===================================================================
--- branches/brysonda/source/event/cEventList.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/event/cEventList.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -5,41 +5,25 @@
 // before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
 //////////////////////////////////////////////////////////////////////////////
 
-#ifndef EVENT_LIST_HH
 #include "cEventList.h"
-#endif
 
-#ifndef DEFS_HH
 #include "defs.h"
-#endif
-#ifndef EVENT_FACTORY_MANAGER_HH
-#include "cEventFactoryManager.h"
-#endif
-#ifndef EVENT_LIST_ENTRY_HH
+#include "cEventManager.h"
 #include "cEventListEntry.h"
-#endif
-#ifndef EVENT_TRIGGERS_HH
 #include "cEventTriggers.h"
-#endif
-#ifndef STRING_HH
 #include "cString.h"
-#endif
 
 #include <float.h>           // for DBL_MIN
 #include <iostream>
 
 using namespace std;
 
-class cEventFactoryManager; // access
-class cEventTriggers; // access
-class cEventListEntry; // access
-class cString; // aggregate
 class cEvent;
 
 /////////////////
 //  cEventList
 /////////////////
-cEventList::cEventList( cEventFactoryManager* factory_manager,  cEventTriggers *triggers ) :
+cEventList::cEventList( cEventManager* factory_manager,  cEventTriggers *triggers ) :
 m_factory_manager( factory_manager ),
 m_triggers( triggers ),
 m_head(NULL),

Modified: branches/brysonda/source/event/cEventList.h
===================================================================
--- branches/brysonda/source/event/cEventList.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/event/cEventList.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -32,7 +32,7 @@
  **/
 
 class cEvent;
-class cEventFactoryManager;
+class cEventManager;
 class cEventListEntry; // access
 class cEventListIterator; // access
 class cEventTriggers; // access
@@ -44,7 +44,7 @@
   cEventListIterator begin() { return cEventListIterator(m_head); }
   const cEventListIterator end() const { return cEventListIterator(0); }
 protected:
-  cEventFactoryManager *m_factory_manager;
+  cEventManager *m_factory_manager;
   cEventTriggers *m_triggers;
 
   cEventListEntry *m_head;
@@ -78,7 +78,7 @@
    * @param triggers A trigger object. The event list needs a trigger object
    * to determine what events to call when.
    **/
-  cEventList( cEventFactoryManager *factory_manager, cEventTriggers *triggers );
+  cEventList( cEventManager *factory_manager, cEventTriggers *triggers );
   ~cEventList();
 
   // manipulators

Copied: branches/brysonda/source/event/cEventManager.cc (from rev 354, branches/brysonda/source/event/cEventFactoryManager.cc)
===================================================================
--- branches/brysonda/source/event/cEventFactoryManager.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/event/cEventManager.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -0,0 +1,4126 @@
+
+#include "cEventManager.h"
+
+#include "cAnalyzeUtil.h"
+#include "avida.h"
+#include "cAvidaDriver_Base.h"
+#include "cEnvironment.h"
+#include "cEvent.h"
+#include "cGenebank.h"
+#include "cGenotype.h"
+#include "cHardwareManager.h"
+#include "cInjectGenebank.h"
+#include "cInjectGenotype.h"
+#include "cInstUtil.h"
+#include "cLandscape.h"
+#include "cLineageControl.h"
+#include "cOrganism.h"
+#include "cPhenotype.h"
+#include "cPopulation.h"
+#include "cPopulationCell.h"
+#include "cResource.h"
+#include "cStats.h"
+#include "cStringUtil.h"
+#include "cTestCPU.h"
+#include "cTestUtil.h"
+#include "cTools.h"
+#include "cWorld.h"
+
+#include <ctype.h>           // for isdigit
+#include <iostream>
+
+using namespace std;
+
+
+class cEvent_exit : public cEvent {
+public:
+  const cString GetName() const { return "exit"; }
+  const cString GetDescription() const { return "exit"; }
+  
+  void Configure(cWorld* world, const cString& in_args) { ; }
+  void Process(){
+    cAvidaDriver_Base::main_driver->SetDone();
+  }
+};
+
+///// exit_if_generation_greater_than /////
+
+/**
+* Ends the Avida run when the current generation exceeds the
+ * maximum generation given as parameter.
+ *
+ * Parameters:
+ * max generation (int)
+ *   The generation at which the run should be stopped.
+ **/
+class cEvent_exit_if_generation_greater_than : public cEvent {
+private:
+  int max_generation;
+public:
+  const cString GetName() const { return "exit_if_generation_greater_than"; }
+  const cString GetDescription() const { return "exit_if_generation_greater_than  <int max_generation>"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    max_generation = args.PopWord().AsInt();
+  }
+  ///// exit_if_generation_greater_than /////
+  void Process(){
+    if( m_world->GetPopulation().GetGeneration() > max_generation ){
+      cAvidaDriver_Base::main_driver->SetDone();
+    }
+  }
+};
+
+///// exit_if_update_greater_than /////
+
+/**
+* Ends the Avida run when the current update exceeds the
+ * maximum update given as parameter.
+ *
+ * Parameters:
+ * max update (int)
+ *   The update at which the run should be stopped.
+ **/
+
+
+class cEvent_exit_if_update_greater_than : public cEvent {
+private:
+  int max_update;
+public:
+  const cString GetName() const { return "exit_if_update_greater_than"; }
+  const cString GetDescription() const { return "exit_if_update_greater_than  <int max_update>"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    max_update = args.PopWord().AsInt();
+  }
+  ///// exit_if_update_greater_than /////
+  void Process(){
+    if( m_world->GetPopulation().GetUpdate() > max_update ){
+      cAvidaDriver_Base::main_driver->SetDone();
+    }
+  }
+};
+
+///// exit_if_ave_lineage_label_smaller /////
+
+/**
+* Halts the avida run if the current average lineage label is smaller
+ * than the value given as parameter.
+ *
+ * Parameters:
+ * lineage_label_crit_value (int)
+ *   The critical value to which the average lineage label is compared.
+ **/
+
+
+class cEvent_exit_if_ave_lineage_label_smaller : public cEvent {
+private:
+  double lineage_label_crit_value;
+public:
+  const cString GetName() const { return "exit_if_ave_lineage_label_smaller"; }
+  const cString GetDescription() const { return "exit_if_ave_lineage_label_smaller  <double lineage_label_crit_value>"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    lineage_label_crit_value = args.PopWord().AsDouble();
+  }
+  ///// exit_if_ave_lineage_label_smaller /////
+  void Process(){
+    if( m_world->GetPopulation().GetStats().GetAveLineageLabel() < lineage_label_crit_value ){
+      cAvidaDriver_Base::main_driver->SetDone();
+    }
+  }
+};
+
+///// exit_if_ave_lineage_label_larger /////
+
+/**
+* Halts the avida run if the current average lineage label is larger
+ * than the value given as parameter.
+ *
+ * Parameters:
+ * lineage_label_crit_value (int)
+ *   The critical value to which the average lineage label is compared.
+ **/
+
+
+class cEvent_exit_if_ave_lineage_label_larger : public cEvent {
+private:
+  double lineage_label_crit_value;
+public:
+  const cString GetName() const { return "exit_if_ave_lineage_label_larger"; }
+  const cString GetDescription() const { return "exit_if_ave_lineage_label_larger  <double lineage_label_crit_value>"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    lineage_label_crit_value = args.PopWord().AsDouble();
+  }
+  ///// exit_if_ave_lineage_label_larger /////
+  void Process(){
+    if( m_world->GetPopulation().GetStats().GetAveLineageLabel() > lineage_label_crit_value ){
+      cAvidaDriver_Base::main_driver->SetDone();
+    }
+  }
+};
+
+///// echo /////
+
+/**
+* Writes out a message. If no message is given, average update and
+ * generation are written out.
+ *
+ * Parameters:
+ * message (string)
+ **/
+
+
+class cEvent_echo : public cEvent {
+private:
+  cString mesg;
+public:
+  const cString GetName() const { return "echo"; }
+  const cString GetDescription() const { return "echo  <cString mesg>"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    mesg = args.PopWord();
+  }
+  ///// echo /////
+  void Process(){
+    if( mesg == "" ){
+      mesg.Set("Echo : Update = %f\t AveGeneration = %f",
+               m_world->GetPopulation().GetUpdate(), m_world->GetPopulation().GetGeneration());
+    }
+    cAvidaDriver_Base::main_driver->NotifyComment(mesg);
+  }
+};
+
+///// print_data /////
+
+/**
+* Output user-defined data from the cStats object...
+ *
+ * Parameters:
+ * filename (string)
+ *   The name of the data file.
+ * format
+ *   A comma-seperated list of statistics to output.
+ **/
+
+
+class cEvent_print_data : public cEvent {
+private:
+  cString filename;
+  cString format;
+public:
+    const cString GetName() const { return "print_data"; }
+  const cString GetDescription() const { return "print_data  <cString filename> <cString format>"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    filename = args.PopWord();
+    format = args.PopWord();
+  }
+  ///// print_data /////
+  void Process(){
+    m_world->GetPopulation().GetStats().PrintDataFile(filename, format, ',');
+  }
+};
+
+///// print_average_data /////
+
+/**
+* Output various average quantities into datafile.
+ *
+ * Parameters:
+ * filename (string) default: average.dat
+   *   The name of the data file.
+   **/
+
+
+class cEvent_print_average_data : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "print_average_data"; }
+  const cString GetDescription() const { return "print_average_data  [cString fname=\"average.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname="average.dat"; else fname=args.PopWord();
+  }
+  ///// print_average_data /////
+  void Process(){
+    m_world->GetPopulation().GetStats().PrintAverageData(fname);
+  }
+};
+
+///// print_error_data /////
+
+/**
+* Prints out various data related to statistical errors.
+ *
+ * Parameters:
+ * filename (string) default: error.dat
+   *   The name of the data file.
+   **/
+
+
+class cEvent_print_error_data : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "print_error_data"; }
+  const cString GetDescription() const { return "print_error_data  [cString fname=\"error.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname="error.dat"; else fname=args.PopWord();
+  }
+  ///// print_error_data /////
+  void Process(){
+    m_world->GetPopulation().GetStats().PrintErrorData(fname);
+  }
+};
+
+///// print_variance_data /////
+
+/**
+* Prints out various variances.
+ *
+ * Parameters:
+ * filename (string) default: variance.dat
+   *   The name of the data file.
+   **/
+
+
+class cEvent_print_variance_data : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "print_variance_data"; }
+  const cString GetDescription() const { return "print_variance_data  [cString fname=\"variance.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname="variance.dat"; else fname=args.PopWord();
+  }
+  ///// print_variance_data /////
+  void Process(){
+    m_world->GetPopulation().GetStats().PrintVarianceData(fname);
+  }
+};
+
+///// print_dominant_data /////
+
+/**
+* Output various quantities related to the dominant organism.
+ *
+ * Parameters:
+ * filename (string) default: dominant.dat
+   *   The name of the data file.
+   **/
+
+
+class cEvent_print_dominant_data : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "print_dominant_data"; }
+  const cString GetDescription() const { return "print_dominant_data  [cString fname=\"dominant.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname="dominant.dat"; else fname=args.PopWord();
+  }
+  ///// print_dominant_data /////
+  void Process(){
+    m_world->GetPopulation().GetStats().PrintDominantData(fname);
+  }
+};
+
+///// print_stats_data /////
+
+/**
+* Output various statistical quantities.
+ *
+ * Parameters:
+ * filename (string) default: stats.dat
+   *   The name of the data file.
+   **/
+
+
+class cEvent_print_stats_data : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "print_stats_data"; }
+  const cString GetDescription() const { return "print_stats_data  [cString fname=\"stats.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname="stats.dat"; else fname=args.PopWord();
+  }
+  ///// print_stats_data /////
+  void Process(){
+    m_world->GetPopulation().GetStats().PrintStatsData(fname);
+  }
+};
+
+///// print_count_data /////
+
+/**
+* Output various counts, such as number of organisms etc.
+ *
+ * Parameters:
+ * filename (string) default: count.dat
+   *   The name of the data file.
+   **/
+
+
+class cEvent_print_count_data : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "print_count_data"; }
+  const cString GetDescription() const { return "print_count_data  [cString fname=\"count.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname="count.dat"; else fname=args.PopWord();
+  }
+  ///// print_count_data /////
+  void Process(){
+    m_world->GetPopulation().GetStats().PrintCountData(fname);
+  }
+};
+
+///// print_totals_data /////
+
+/**
+* Various total numbers.
+ *
+ * Parameters:
+ * filename (string) default: totals.dat
+   *   The name of the data file.
+   **/
+
+
+class cEvent_print_totals_data : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "print_totals_data"; }
+  const cString GetDescription() const { return "print_totals_data  [cString fname=\"totals.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname="totals.dat"; else fname=args.PopWord();
+  }
+  ///// print_totals_data /////
+  void Process(){
+    m_world->GetPopulation().GetStats().PrintTotalsData(fname);
+  }
+};
+
+///// print_tasks_data /////
+
+/**
+* Output the number of times the various tasks have been performed in the
+ * last update.
+ *
+ * Parameters:
+ * filename (string) default: tasks.dat
+   *   The name of the data file.
+   **/
+
+
+class cEvent_print_tasks_data : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "print_tasks_data"; }
+  const cString GetDescription() const { return "print_tasks_data  [cString fname=\"tasks.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname="tasks.dat"; else fname=args.PopWord();
+  }
+  ///// print_tasks_data /////
+  void Process(){
+    m_world->GetPopulation().GetStats().PrintTasksData(fname);
+  }
+};
+
+///// print_tasks_exe_data /////
+
+/**
+**/
+
+
+class cEvent_print_tasks_exe_data : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "print_tasks_exe_data"; }
+  const cString GetDescription() const { return "print_tasks_exe_data  [cString fname=\"tasks_exe.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname="tasks_exe.dat"; else fname=args.PopWord();
+  }
+  ///// print_tasks_exe_data /////
+  void Process(){
+    m_world->GetPopulation().GetStats().PrintTasksExeData(fname);
+  }
+};
+
+///// print_resource_data /////
+
+/**
+**/
+
+
+class cEvent_print_resource_data : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "print_resource_data"; }
+  const cString GetDescription() const { return "print_resource_data  [cString fname=\"resource.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname="resource.dat"; else fname=args.PopWord();
+  }
+  ///// print_resource_data /////
+  void Process(){
+    m_world->GetPopulation().GetStats().PrintResourceData(fname);
+  }
+};
+
+///// print_time_data /////
+
+/**
+* Output time related data, such as update, generation, etc.
+ *
+ * Parameters:
+ * filename (string) default: time.dat
+   *   The name of the data file.
+   **/
+
+
+class cEvent_print_time_data : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "print_time_data"; }
+  const cString GetDescription() const { return "print_time_data  [cString fname=\"time.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname="time.dat"; else fname=args.PopWord();
+  }
+  ///// print_time_data /////
+  void Process(){
+    m_world->GetPopulation().GetStats().PrintTimeData(fname);
+  }
+};
+
+///// print_mutation_data /////
+
+/**
+**/
+
+
+class cEvent_print_mutation_data : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "print_mutation_data"; }
+  const cString GetDescription() const { return "print_mutation_data  [cString fname=\"mutation.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname="mutation.dat"; else fname=args.PopWord();
+  }
+  ///// print_mutation_data /////
+  void Process(){
+    m_world->GetPopulation().GetStats().PrintMutationData(fname);
+  }
+};
+
+///// print_mutation_rate_data /////
+
+/**
+Output (regular and log) statistics about individual copy
+ mutation rates (aver, stdev, skew, cur).
+ Useful only when mutation rate is set per organism.
+ **/
+
+
+class cEvent_print_mutation_rate_data : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "print_mutation_rate_data"; }
+  const cString GetDescription() const { return "print_mutation_rate_data  [cString fname=\"mutation_rates.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname="mutation_rates.dat"; else fname=args.PopWord();
+  }
+  ///// print_mutation_rate_data /////
+  void Process(){
+    m_world->GetPopulation().GetStats().PrintMutationRateData(fname);
+  }
+};
+
+///// print_divide_mut_data /////
+
+/**
+Output (regular and log) statistics about individual, per site,
+ rates divide mutation rates (aver, stdev, skew, cur).
+ Use with multiple divide instuction set.
+ **/
+
+
+class cEvent_print_divide_mut_data : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "print_divide_mut_data"; }
+  const cString GetDescription() const { return "print_divide_mut_data  [cString fname=\"divide_mut.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname="divide_mut.dat"; else fname=args.PopWord();
+  }
+  ///// print_divide_mut_data /////
+  void Process(){
+    m_world->GetPopulation().GetStats().PrintDivideMutData(fname);
+  }
+};
+
+///// print_dom_parasite_data /////
+
+/**
+* Output various quantities related to the dominant parasite.
+ *
+ * Parameters:
+ * filename (string) default: parasite.dat
+   *   The name of the data file.
+   **/
+
+
+class cEvent_print_dom_parasite_data : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "print_dom_parasite_data"; }
+  const cString GetDescription() const { return "print_dom_parasite_data  [cString fname=\"parasite.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname="parasite.dat"; else fname=args.PopWord();
+  }
+  ///// print_dom_parasite_data /////
+  void Process(){
+    m_world->GetPopulation().GetStats().PrintDominantParaData(fname);
+  }
+};
+
+///// print_instruction_data /////
+
+/**
+Sum of the by-organisms counts of what instructions they _successfully_
+ execute beteween birth and divide. Prior to their first divide, organisms
+ report values for their parents.
+ **/
+
+
+class cEvent_print_instruction_data : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "print_instruction_data"; }
+  const cString GetDescription() const { return "print_instruction_data  [cString fname=\"instruction.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname="instruction.dat"; else fname=args.PopWord();
+  }
+  ///// print_instruction_data /////
+  void Process(){
+    m_world->GetPopulation().GetStats().PrintInstructionData(fname);
+  }
+};
+
+///// print_instruction_abundance_histogram /////
+
+/**
+*
+ * Appends a line containing the bulk count (abundance) of
+ * each instruction in the population onto a file.
+ *
+ * Parameters:
+ * filename (string) default: "instruction_histogram.dat"
+   *
+   **/
+
+
+class cEvent_print_instruction_abundance_histogram : public cEvent {
+private:
+  cString filename;
+public:
+  const cString GetName() const { return "print_instruction_abundance_histogram"; }
+  const cString GetDescription() const { return "print_instruction_abundance_histogram  [cString filename=\"instruction_histogram.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") filename="instruction_histogram.dat"; else filename=args.PopWord();
+  }
+  ///// print_instruction_abundance_histogram /////
+  void Process(){
+    ofstream & fp = m_world->GetPopulation().GetStats().GetDataFileOFStream(filename);
+    cAnalyzeUtil::PrintInstructionAbundanceHistogram(m_world, fp);
+  }
+};
+
+///// print_depth_histogram /////
+
+/**
+**/
+
+
+class cEvent_print_depth_histogram : public cEvent {
+private:
+  cString filename;
+public:
+  const cString GetName() const { return "print_depth_histogram"; }
+  const cString GetDescription() const { return "print_depth_histogram  [cString filename=\"depth_histogram.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") filename="depth_histogram.dat"; else filename=args.PopWord();
+  }
+  ///// print_depth_histogram /////
+  void Process(){
+    ofstream & fp = m_world->GetPopulation().GetStats().GetDataFileOFStream(filename);
+    cAnalyzeUtil::PrintDepthHistogram(fp, &m_world->GetPopulation());
+  }
+};
+
+///// print_genotype_abundance_histogram /////
+
+/**
+* Writes out a genotype abundance histogram.
+ *
+ * Parameters:
+ * filename (string) default: genotype_abundance_histogram.dat
+   *   The name of the file into which the histogram is written.
+   **/
+
+
+class cEvent_print_genotype_abundance_histogram : public cEvent {
+private:
+  cString filename;
+public:
+  const cString GetName() const { return "print_genotype_abundance_histogram"; }
+  const cString GetDescription() const { return "print_genotype_abundance_histogram  [cString filename=\"genotype_abundance_histogram.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") filename="genotype_abundance_histogram.dat"; else filename=args.PopWord();
+  }
+  ///// print_genotype_abundance_histogram /////
+  void Process(){
+    ofstream & fp = m_world->GetPopulation().GetStats().GetDataFileOFStream(filename);
+    cAnalyzeUtil::PrintGenotypeAbundanceHistogram(fp, &m_world->GetPopulation());
+  }
+};
+
+///// print_species_abundance_histogram /////
+
+/**
+* Writes out a species abundance histogram.
+ *
+ * Parameters:
+ * filename (string) default: species_abundance_histogram.dat
+   *   The name of the file into which the histogram is written.
+   **/
+
+
+class cEvent_print_species_abundance_histogram : public cEvent {
+private:
+  cString filename;
+public:
+  const cString GetName() const { return "print_species_abundance_histogram"; }
+  const cString GetDescription() const { return "print_species_abundance_histogram  [cString filename=\"species_abundance_histogram.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") filename="species_abundance_histogram.dat"; else filename=args.PopWord();
+  }
+  ///// print_species_abundance_histogram /////
+  void Process(){
+    ofstream & fp = m_world->GetPopulation().GetStats().GetDataFileOFStream(filename);
+    cAnalyzeUtil::PrintSpeciesAbundanceHistogram(fp, &m_world->GetPopulation());
+  }
+};
+
+///// print_lineage_totals /////
+
+/**
+**/
+
+
+class cEvent_print_lineage_totals : public cEvent {
+private:
+  cString fname;
+  int verbose;
+public:
+    const cString GetName() const { return "print_lineage_totals"; }
+  const cString GetDescription() const { return "print_lineage_totals  [cString fname=\"lineage_totals.dat\"] [int verbose=1]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname="lineage_totals.dat"; else fname=args.PopWord();
+    if (args == "") verbose=1; else verbose=args.PopWord().AsInt();
+  }
+  ///// print_lineage_totals /////
+  void Process(){
+    static bool msg_printed = false;
+    if (m_world->GetPopulation().GetLineageControl() == NULL) {
+      if ( msg_printed == false ){
+        ofstream & fp = m_world->GetPopulation().GetStats().GetDataFileOFStream(fname);
+        fp << "No lineage data available!" << endl;
+        msg_printed = true;
+      }
+      return;
+    }
+    m_world->GetPopulation().GetLineageControl()->PrintLineageTotals(fname, verbose);
+  }
+};
+
+///// print_lineage_counts /////
+
+/**
+**/
+
+
+class cEvent_print_lineage_counts : public cEvent {
+private:
+  cString fname;
+  int verbose;
+public:
+    const cString GetName() const { return "print_lineage_counts"; }
+  const cString GetDescription() const { return "print_lineage_counts  [cString fname=\"lineage_counts.dat\"] [int verbose=0]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname="lineage_counts.dat"; else fname=args.PopWord();
+    if (args == "") verbose=0; else verbose=args.PopWord().AsInt();
+  }
+  ///// print_lineage_counts /////
+  void Process(){
+    static bool msg_printed = false;
+    if (m_world->GetPopulation().GetLineageControl() == NULL) {
+      if ( msg_printed == false ){
+        ofstream & fp = m_world->GetPopulation().GetStats().GetDataFileOFStream(fname);
+        fp << "No lineage data available!" << endl;
+        msg_printed = true;
+      }
+      return;
+    }
+    if (verbose) {    // verbose mode is the same in both methods
+      m_world->GetPopulation().GetLineageControl()->PrintLineageTotals(fname, verbose);
+      return;
+    }
+    m_world->GetPopulation().GetLineageControl()->PrintLineageCurCounts(fname);
+  }
+};
+
+///// print_dom /////
+
+/**
+* Write the currently dominant genotype to disk.
+ *
+ * Parameters:
+ * filename (string)
+ *   The name under which the genotype should be saved. If no
+ *   filename is given, the genotype is saved into the directory
+ *   genebank, under the name that the genebank has associated with
+ *   this genotype.
+ **/
+
+
+class cEvent_print_dom : public cEvent {
+private:
+  cString in_filename;
+public:
+  const cString GetName() const { return "print_dom"; }
+  const cString GetDescription() const { return "print_dom  [cString in_filename=\"\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") in_filename=""; else in_filename=args.PopWord();
+  }
+  ///// print_dom /////
+  void Process(){
+    cGenotype * dom = m_world->GetPopulation().GetGenebank().GetBestGenotype();
+    cString filename(in_filename);
+    if (filename == "") filename.Set("genebank/%s", dom->GetName()());
+    cTestUtil::PrintGenome(dom->GetGenome(), filename, dom, m_world->GetPopulation().GetUpdate());
+  }
+};
+
+///// parasite_debug /////
+
+//midget
+
+
+class cEvent_parasite_debug : public cEvent {
+private:
+  cString in_filename;
+public:
+  const cString GetName() const { return "parasite_debug"; }
+  const cString GetDescription() const { return "parasite_debug  [cString in_filename=\"\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") in_filename=""; else in_filename=args.PopWord();
+  }
+  ///// parasite_debug /////
+  void Process(){
+    m_world->GetPopulation().ParasiteDebug();
+  }
+};
+
+///// print_dom_parasite /////
+
+/**
+* Write the currently dominant injected genotype to disk.
+ *
+ * Parameters:
+ * filename (string)
+ *   The name under which the genotype should be saved. If no
+ *   filename is given, the genotype is saved into the directory
+ *   genebank, under the name that the genebank has associated with
+ *   this genotype.
+ **/
+
+
+class cEvent_print_dom_parasite : public cEvent {
+private:
+  cString in_filename;
+public:
+  const cString GetName() const { return "print_dom_parasite"; }
+  const cString GetDescription() const { return "print_dom_parasite  [cString in_filename=\"\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") in_filename=""; else in_filename=args.PopWord();
+  }
+  ///// print_dom_parasite /////
+  void Process(){
+    cInjectGenotype * dom = m_world->GetPopulation().GetInjectGenebank().GetBestInjectGenotype();
+    if (dom!=NULL) {
+      cString filename(in_filename);
+      if (filename == "") filename.Set("genebank/%s", dom->GetName()());
+      cTestUtil::PrintGenome(dom, dom->GetGenome(), filename, m_world->GetPopulation().GetUpdate()); }
+  }
+};
+
+///// print_genotype_map /////
+
+/**
+* write a matrix of genotype ID's to a file (matlab format)
+ **/
+
+
+class cEvent_print_genotype_map : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "print_genotype_map"; }
+  const cString GetDescription() const { return "print_genotype_map  [cString fname=\"genotype_map.m\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname="genotype_map.m"; else fname=args.PopWord();
+  }
+  ///// print_genotype_map /////
+  void Process(){
+    m_world->GetPopulation().GetStats().PrintGenotypeMap(fname);
+  }
+};
+
+///// print_number_phenotypes /////
+
+/**
+Output file with number of phenotypes based on tasks executed
+ for this update.  Executing a task any numbers of times is considered
+ the same as executing it once.
+ **/
+
+
+class cEvent_print_number_phenotypes : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "print_number_phenotypes"; }
+  const cString GetDescription() const { return "print_number_phenotypes  [cString fname=\"phenotype_count.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname="phenotype_count.dat"; else fname=args.PopWord();
+  }
+  ///// print_number_phenotypes /////
+  void Process(){
+    m_world->GetPopulation().PrintPhenotypeData(fname);
+  }
+};
+
+///// print_phenotype_status /////
+
+/**
+Prints merit status for all the organisms in the population.
+ Used for testing/debuging. 
+ **/
+
+
+class cEvent_print_phenotype_status : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "print_phenotype_status"; }
+  const cString GetDescription() const { return "print_phenotype_status  [cString fname=\"phenotype_status.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname="phenotype_status.dat"; else fname=args.PopWord();
+  }
+  ///// print_phenotype_status /////
+  void Process(){
+    m_world->GetPopulation().PrintPhenotypeStatus(fname);
+  }
+};
+
+///// save_population /////
+
+/**
+* Saves the full state of the population.
+ *
+ * Parameters:
+ * filename (string) default: save_pop.*
+   *   The name of the file into which the population should
+   *   be saved. If it is not given, then the name 'save_pop.*'
+   *   is used, with '*' replaced by the current update.
+   **/
+
+
+class cEvent_save_population : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "save_population"; }
+  const cString GetDescription() const { return "save_population  [cString fname=\"\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname=""; else fname=args.PopWord();
+  }
+  ///// save_population /////
+  void Process(){
+    cString filename;
+    if( fname == "" ){
+      filename.Set("save_pop.%d", m_world->GetPopulation().GetUpdate());
+    }
+    ofstream fp(filename());
+    m_world->GetPopulation().SavePopulation(fp);
+  }
+};
+
+///// load_population /////
+
+/**
+* Loads the full state of the population.
+ *
+ * Parameters:
+ * filename (string)
+ *   The name of the file to open.
+ **/
+
+
+class cEvent_load_population : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "load_population"; }
+  const cString GetDescription() const { return "load_population  <cString fname>"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    fname = args.PopWord();
+  }
+  ///// load_population /////
+  void Process(){
+    ifstream fp(fname());
+    m_world->GetPopulation().LoadPopulation(fp);
+  }
+};
+
+///// save_clone /////
+
+/**
+**/
+
+
+class cEvent_save_clone : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "save_clone"; }
+  const cString GetDescription() const { return "save_clone  [cString fname=\"\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname=""; else fname=args.PopWord();
+  }
+  ///// save_clone /////
+  void Process(){
+    cString filename;
+    if( fname == "" ){
+      filename.Set("clone.%d", m_world->GetPopulation().GetUpdate());
+    }
+    ofstream fp(filename());
+    m_world->GetPopulation().SaveClone(fp);
+  }
+};
+
+///// load_clone /////
+
+/**
+**/
+
+
+class cEvent_load_clone : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "load_clone"; }
+  const cString GetDescription() const { return "load_clone  <cString fname>"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    fname = args.PopWord();
+  }
+  ///// load_clone /////
+  void Process(){
+    ifstream fp(fname());
+    m_world->GetPopulation().LoadClone(fp);
+  }
+};
+
+///// load_dump_file /////
+
+/**
+* Sets up a population based on a dump file such as written out by
+ * detail_pop. It is also possible to append a history file to the dump
+ * file, in order to preserve the history of a previous run.
+ **/
+
+
+class cEvent_load_dump_file : public cEvent {
+private:
+  cString fname;
+  int update;
+public:
+    const cString GetName() const { return "load_dump_file"; }
+  const cString GetDescription() const { return "load_dump_file  <cString fname> [int update=-1]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    fname = args.PopWord();
+    if (args == "") update=-1; else update=args.PopWord().AsInt();
+  }
+  ///// load_dump_file /////
+  void Process(){
+    m_world->GetPopulation().LoadDumpFile(fname, update);
+  }
+};
+
+///// dump_pop /////
+
+/**
+* Writes out a line of data for each genotype in the current population. The
+ * line contains the genome as string, the number of organisms of that genotype,
+ * and the genotype ID.
+ *
+ * Parameters:
+ * filename (string) default: "dump.<update>"
+   *   The name of the file into which the population dump should be written.
+   **/
+
+
+class cEvent_dump_pop : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "dump_pop"; }
+  const cString GetDescription() const { return "dump_pop  [cString fname=\"\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname=""; else fname=args.PopWord();
+  }
+  ///// dump_pop /////
+  void Process(){
+    cString filename;
+    if( fname == "" ){
+      filename.Set("dump.%d", m_world->GetPopulation().GetUpdate());
+    }
+    ofstream fp(filename());
+    m_world->GetPopulation().GetGenebank().DumpTextSummary(fp);
+  }
+};
+
+///// print_genotypes /////
+
+/**
+* This is a new version of "detail_pop" or "historic_dump".  It allows you to
+ * output one line per genotype in memory where you get to choose what data
+ * should be included.
+ *
+ * Parameters
+ * data_fields (string)
+ *   This must be a comma separated string of all data you wish to output.
+ *   Options include: id, parent_id, parent2_id (for sex), parent_dist,
+ *       num_cpus, total_cpus, length, merit, gest_time, fitness, update_born,
+ *       update_dead, depth, lineage, sequence
+ * historic (int) default: 0
+   *   How many updates back of history should we include (-1 = all)
+   * filename (string) default: "genotypes-<update>.dat"
+     *   The name of the file into which the population dump should be written.
+     **/
+
+
+class cEvent_print_genotypes : public cEvent {
+private:
+  cString data_fields;
+  int historic;
+  cString fname;
+public:
+    const cString GetName() const { return "print_genotypes"; }
+  const cString GetDescription() const { return "print_genotypes  [cString data_fields=\"all\"] [int historic=0] [cString fname=\"\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") data_fields="all"; else data_fields=args.PopWord();
+    if (args == "") historic=0; else historic=args.PopWord().AsInt();
+    if (args == "") fname=""; else fname=args.PopWord();
+  }
+  ///// print_genotypes /////
+  void Process(){
+    cString filename = fname;
+    if (filename == "") {
+      filename.Set("genotypes-%d.dat", m_world->GetPopulation().GetUpdate());
+    }
+    ofstream fp(filename());
+    m_world->GetPopulation().GetGenebank().PrintGenotypes(fp, data_fields, historic);
+  }
+};
+
+///// detail_pop /////
+
+/**
+* Like dump_pop, but more detailed data is written out.
+ *
+ * Parameters:
+ * filename (string) default: "detail_pop.<update>"
+   *   The name of the file into which the population dump should be written.
+   **/
+
+
+class cEvent_detail_pop : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "detail_pop"; }
+  const cString GetDescription() const { return "detail_pop  [cString fname=\"\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname=""; else fname=args.PopWord();
+  }
+  ///// detail_pop /////
+  void Process(){
+    cString filename;
+    if( fname == "" ){
+      filename.Set("detail_pop.%d", m_world->GetPopulation().GetUpdate());
+    }
+    ofstream fp(filename());
+    m_world->GetPopulation().GetGenebank().DumpDetailedSummary(fp);
+  }
+};
+
+///// detail_sex_pop /////
+
+/**
+* Like detail_pop, but for sexual populations. 
+ * Info for both parents is writen out.
+ *
+ * Parameters:
+ * filename (string) default: "detail_pop.<update>"
+   *   The name of the file into which the population dump should be written.
+   **/
+
+
+class cEvent_detail_sex_pop : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "detail_sex_pop"; }
+  const cString GetDescription() const { return "detail_sex_pop  [cString fname=\"\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname=""; else fname=args.PopWord();
+  }
+  ///// detail_sex_pop /////
+  void Process(){
+    cString filename;
+    if( fname == "" ){
+      filename.Set("detail_pop.%d", m_world->GetPopulation().GetUpdate());
+    }
+    ofstream fp(filename());
+    m_world->GetPopulation().GetGenebank().DumpDetailedSexSummary(fp);
+  }
+};
+
+///// detail_parasite_pop /////
+
+/**
+* Like dump_pop, but more detailed data is written out.
+ *
+ * Parameters:
+ * filename (string) default: "detail_pop.<update>"
+   *   The name of the file into which the population dump should be written.
+   **/
+
+
+class cEvent_detail_parasite_pop : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "detail_parasite_pop"; }
+  const cString GetDescription() const { return "detail_parasite_pop  [cString fname=\"\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname=""; else fname=args.PopWord();
+  }
+  ///// detail_parasite_pop /////
+  void Process(){
+    cString filename;
+    if( fname == "" ){
+      filename.Set("detail_parasite_pop.%d", m_world->GetPopulation().GetUpdate());
+    }
+    //ofstream fp(filename());
+    m_world->GetPopulation().GetInjectGenebank().DumpDetailedSummary(filename, m_world->GetPopulation().GetUpdate());
+  }
+};
+
+///// dump_historic_pop /////
+
+/**
+* Similar to detail_pop. However, only genotypes that are not in the
+ * current population anymore are included. Genotypes that are not in
+ * the line of descent of any of the current genotypes to the ultimate
+ * ancestor are excluded.
+ *
+ * Parameters:
+ * back_dist (int) default: -1
+   *   How many updates back should we print?  -1 goes forever.  Use the
+   *   distance to the last dump historic if you only want a "diff".
+     * filename (string) default: "historic_dump.<update>"
+       *   The name of the file into which the historic dump should be written.
+       **/
+
+
+class cEvent_dump_historic_pop : public cEvent {
+private:
+  int back_dist;
+  cString fname;
+public:
+    const cString GetName() const { return "dump_historic_pop"; }
+  const cString GetDescription() const { return "dump_historic_pop  [int back_dist=-1] [cString fname=\"\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") back_dist=-1; else back_dist=args.PopWord().AsInt();
+    if (args == "") fname=""; else fname=args.PopWord();
+  }
+  ///// dump_historic_pop /////
+  void Process(){
+    cString filename;
+    if( fname == "" ){
+      filename.Set("historic_dump.%d", m_world->GetPopulation().GetUpdate());
+    }
+    ofstream fp(filename());
+    m_world->GetPopulation().GetGenebank().DumpHistoricSummary(fp, back_dist);
+  }
+};
+
+///// dump_historic_sex_pop /////
+
+/**
+* Similar to dump_historic_pop, but for sexual populations. 
+ * ID of both parents is writen out. 
+ *
+ * Parameters:
+ * filename (string) default: "historic_dump.<update>"
+   *   The name of the file into which the historic dump should be written.
+   **/
+
+
+class cEvent_dump_historic_sex_pop : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "dump_historic_sex_pop"; }
+  const cString GetDescription() const { return "dump_historic_sex_pop  [cString fname=\"\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname=""; else fname=args.PopWord();
+  }
+  ///// dump_historic_sex_pop /////
+  void Process(){
+    cString filename;
+    if( fname == "" ){
+      filename.Set("historic_dump.%d", m_world->GetPopulation().GetUpdate());
+    }
+    ofstream fp(filename());
+    m_world->GetPopulation().GetGenebank().DumpHistoricSexSummary(fp);
+  }
+};
+
+///// dump_memory /////
+
+/**
+* Dump the current memory state of all CPUs to a file.
+ **/
+
+
+class cEvent_dump_memory : public cEvent {
+private:
+  cString fname;
+public:
+  const cString GetName() const { return "dump_memory"; }
+  const cString GetDescription() const { return "dump_memory  [cString fname=\"\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname=""; else fname=args.PopWord();
+  }
+  ///// dump_memory /////
+  void Process(){
+    cString filename;
+    if (fname == "") {
+      filename.Set("memory_dump.%d", m_world->GetPopulation().GetUpdate());
+    }
+    ofstream fp(filename());
+    m_world->GetPopulation().DumpMemorySummary(fp);
+  }
+};
+
+///// inject /////
+
+/**
+* Injects a single organism into the population.
+ *
+ * Parameters:
+ * filename (string)
+ *   The filename of the genotype to load. If this is left empty, or the keyword
+ *   "START_CREATURE" is given, than the genotype specified in the genesis
+ *   file under "START_CREATURE" is used.
+ * cell ID (integer) default: 0
+   *   The grid-point into which the organism should be placed.
+   * merit (double) default: -1
+     *   The initial merit of the organism. If set to -1, this is ignored.
+     * lineage label (integer) default: 0
+       *   An integer that marks all descendants of this organism.
+       * neutral metric (double) default: 0
+         *   A double value that randomly drifts over time.
+         **/
+
+
+class cEvent_inject : public cEvent {
+private:
+  cString fname;
+  int cell_id;
+  double merit;
+  int lineage_label;
+  double neutral_metric;
+public:
+    const cString GetName() const { return "inject"; }
+  const cString GetDescription() const { return "inject  [cString fname=\"START_CREATURE\"] [int cell_id=0] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname="START_CREATURE"; else fname=args.PopWord();
+    if (args == "") cell_id=0; else cell_id=args.PopWord().AsInt();
+    if (args == "") merit=-1; else merit=args.PopWord().AsDouble();
+    if (args == "") lineage_label=0; else lineage_label=args.PopWord().AsInt();
+    if (args == "") neutral_metric=0; else neutral_metric=args.PopWord().AsDouble();
+  }
+  ///// inject /////
+  void Process(){
+    if (fname == "START_CREATURE") fname = m_world->GetConfig().START_CREATURE.Get();
+    cGenome genome =
+      cInstUtil::LoadGenome(fname, m_world->GetHardwareManager().GetInstSet());
+    m_world->GetPopulation().Inject(genome, cell_id, merit, lineage_label, neutral_metric);
+  }
+};
+
+///// inject_all /////
+
+/**
+* Injects identical organisms into all cells of the population.
+ *
+ * Parameters:
+ * filename (string)
+ *   The filename of the genotype to load. If this is left empty, or the keyword
+ *   "START_CREATURE" is given, than the genotype specified in the genesis
+ *   file under "START_CREATURE" is used.
+ * merit (double) default: -1
+   *   The initial merit of the organism. If set to -1, this is ignored.
+   * lineage label (integer) default: 0
+     *   An integer that marks all descendants of this organism.
+     * neutral metric (double) default: 0
+       *   A double value that randomly drifts over time.
+       **/
+
+
+class cEvent_inject_all : public cEvent {
+private:
+  cString fname;
+  double merit;
+  int lineage_label;
+  double neutral_metric;
+public:
+    const cString GetName() const { return "inject_all"; }
+  const cString GetDescription() const { return "inject_all  [cString fname=\"START_CREATURE\"] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname="START_CREATURE"; else fname=args.PopWord();
+    if (args == "") merit=-1; else merit=args.PopWord().AsDouble();
+    if (args == "") lineage_label=0; else lineage_label=args.PopWord().AsInt();
+    if (args == "") neutral_metric=0; else neutral_metric=args.PopWord().AsDouble();
+  }
+  ///// inject_all /////
+  void Process(){
+    if (fname == "START_CREATURE") fname = m_world->GetConfig().START_CREATURE.Get();
+    cGenome genome =
+      cInstUtil::LoadGenome(fname, m_world->GetHardwareManager().GetInstSet());
+    for (int i = 0; i < m_world->GetPopulation().GetSize(); i++) {
+      m_world->GetPopulation().Inject(genome, i, merit, lineage_label, neutral_metric);
+    }
+    m_world->GetPopulation().SetSyncEvents(true);
+  }
+};
+
+///// inject_range /////
+
+/**
+* Injects identical organisms into a range of cells of the population.
+ *
+ * Parameters:
+ * filename (string)
+ *   The filename of the genotype to load. If this is left empty, or the keyword
+ *   "START_CREATURE" is given, than the genotype specified in the genesis
+ *   file under "START_CREATURE" is used.
+ * start_cell (int)
+ *   First cell to inject into.
+ * stop_cell (int)
+ *   First cell *not* to inject into.
+ * merit (double) default: -1
+   *   The initial merit of the organism. If set to -1, this is ignored.
+   * lineage label (integer) default: 0
+     *   An integer that marks all descendants of this organism.
+     * neutral metric (double) default: 0
+       *   A double value that randomly drifts over time.
+       *
+       * Example:
+       *   inject_range creature.gen 0 10
+       *
+       * Will inject 10 organisms into cells 0 through 9.
+       **/
+
+
+class cEvent_inject_range : public cEvent {
+private:
+  cString fname;
+  int start_cell;
+  int end_cell;
+  double merit;
+  int lineage_label;
+  double neutral_metric;
+public:
+    const cString GetName() const { return "inject_range"; }
+  const cString GetDescription() const { return "inject_range  [cString fname=\"START_CREATURE\"] [int start_cell=0] [int end_cell=-1] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname="START_CREATURE"; else fname=args.PopWord();
+    if (args == "") start_cell=0; else start_cell=args.PopWord().AsInt();
+    if (args == "") end_cell=-1; else end_cell=args.PopWord().AsInt();
+    if (args == "") merit=-1; else merit=args.PopWord().AsDouble();
+    if (args == "") lineage_label=0; else lineage_label=args.PopWord().AsInt();
+    if (args == "") neutral_metric=0; else neutral_metric=args.PopWord().AsDouble();
+  }
+  ///// inject_range /////
+  void Process(){
+    if (fname == "START_CREATURE") fname = m_world->GetConfig().START_CREATURE.Get();
+    if (end_cell == -1) end_cell = start_cell + 1;
+    if (start_cell < 0 ||
+        end_cell > m_world->GetPopulation().GetSize() ||
+        start_cell >= end_cell) {
+      cout << "Warning: inject_range has invalid range!";
+    }
+    else {
+      cGenome genome =
+      cInstUtil::LoadGenome(fname, m_world->GetHardwareManager().GetInstSet());
+      for (int i = start_cell; i < end_cell; i++) {
+        m_world->GetPopulation().Inject(genome, i, merit, lineage_label, neutral_metric);
+      }
+      m_world->GetPopulation().SetSyncEvents(true);
+    }
+  }
+};
+
+///// inject_sequence /////
+
+/**
+* Injects identical organisms into a range of cells of the population.
+ *
+ * Parameters:
+ * sequence (string)
+ *   The genome sequence for this organism.  This is a mandatory argument.
+ * start_cell (int)
+ *   First cell to inject into.
+ * stop_cell (int)
+ *   First cell *not* to inject into.
+ * merit (double) default: -1
+   *   The initial merit of the organism. If set to -1, this is ignored.
+   * lineage label (integer) default: 0
+     *   An integer that marks all descendants of this organism.
+     * neutral metric (double) default: 0
+       *   A double value that randomly drifts over time.
+       *
+       * Example:
+       *   inject_range ckdfhgklsahnfsaggdsgajfg 0 10 100
+       *
+       * Will inject 10 organisms into cells 0 through 9 with a merit of 100.
+       **/
+
+
+class cEvent_inject_sequence : public cEvent {
+private:
+  cString seq;
+  int start_cell;
+  int end_cell;
+  double merit;
+  int lineage_label;
+  double neutral_metric;
+public:
+    const cString GetName() const { return "inject_sequence"; }
+  const cString GetDescription() const { return "inject_sequence  <cString seq> [int start_cell=0] [int end_cell=-1] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    seq = args.PopWord();
+    if (args == "") start_cell=0; else start_cell=args.PopWord().AsInt();
+    if (args == "") end_cell=-1; else end_cell=args.PopWord().AsInt();
+    if (args == "") merit=-1; else merit=args.PopWord().AsDouble();
+    if (args == "") lineage_label=0; else lineage_label=args.PopWord().AsInt();
+    if (args == "") neutral_metric=0; else neutral_metric=args.PopWord().AsDouble();
+  }
+  ///// inject_sequence /////
+  void Process(){
+    if (end_cell == -1) end_cell = start_cell + 1;
+    if (start_cell < 0 ||
+        end_cell > m_world->GetPopulation().GetSize() ||
+        start_cell >= end_cell) {
+      cout << "Warning: inject_sequence has invalid range!" << endl;
+      cout << "start=" << start_cell << "  end=" << end_cell
+        << "genome length=" << seq.GetSize() << endl;
+    }
+    else {
+      cGenome genome(seq);
+      for (int i = start_cell; i < end_cell; i++) {
+        m_world->GetPopulation().Inject(genome, i, merit, lineage_label, neutral_metric);
+      }
+      m_world->GetPopulation().SetSyncEvents(true);
+    }
+  }
+};
+
+///// inject_random /////
+
+/**
+* Injects a randomly generated genome into the population.
+ *
+ * Parameters:
+ * length (integer) [required]
+ *   Number of instructions in the randomly generated genome.
+ * cell ID (integer) default: -1
+   *   The grid-point into which the genome should be placed.  Default is random.
+   * merit (double) default: -1
+     *   The initial merit of the organism. If set to -1, this is ignored.
+     * lineage label (integer) default: 0
+       *   An integer that marks all descendants of this organism.
+       * neutral metric (double) default: 0
+         *   A double value that randomly drifts over time.
+         **/
+
+
+class cEvent_inject_random : public cEvent {
+private:
+  int length;
+  int cell_id;
+  double merit;
+  int lineage_label;
+  double neutral_metric;
+public:
+    const cString GetName() const { return "inject_random"; }
+  const cString GetDescription() const { return "inject_random  <int length> [int cell_id=-1] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    length = args.PopWord().AsInt();
+    if (args == "") cell_id=-1; else cell_id=args.PopWord().AsInt();
+    if (args == "") merit=-1; else merit=args.PopWord().AsDouble();
+    if (args == "") lineage_label=0; else lineage_label=args.PopWord().AsInt();
+    if (args == "") neutral_metric=0; else neutral_metric=args.PopWord().AsDouble();
+  }
+  ///// inject_random /////
+  void Process(){
+    if (cell_id == -1) cell_id = g_random.GetUInt(m_world->GetPopulation().GetSize());
+    cGenome genome =
+      cInstUtil::RandomGenome(length, m_world->GetHardwareManager().GetInstSet());
+    m_world->GetPopulation().Inject(genome, cell_id, merit, lineage_label, neutral_metric);
+  }
+};
+
+///// inject_range_parasite /////
+
+/**
+* Injects identical organisms into a range of cells of the population.
+ *
+ * Parameters:
+ * filename (string)
+ *   The filename of the genotype to load. If this is left empty, or the keyword
+ *   "START_CREATURE" is given, than the genotype specified in the genesis
+ *   file under "START_CREATURE" is used.
+ * start_cell (int)
+ *   First cell to inject into.
+ * stop_cell (int)
+ *   First cell *not* to inject into.
+ * merit (double) default: -1
+   *   The initial merit of the organism. If set to -1, this is ignored.
+   * lineage label (integer) default: 0
+     *   An integer that marks all descendants of this organism.
+     * neutral metric (double) default: 0
+       *   A double value that randomly drifts over time.
+       *
+       * Example:
+       *   inject_range creature.gen 0 10
+       *
+       * Will inject 10 organisms into cells 0 through 9.
+       **/
+
+
+class cEvent_inject_range_parasite : public cEvent {
+private:
+  cString fname_parasite;
+  int start_cell;
+  int end_cell;
+  double merit;
+  int lineage_label;
+  double neutral_metric;
+  int mem_space;
+public:
+    const cString GetName() const { return "inject_range_parasite"; }
+  const cString GetDescription() const { return "inject_range_parasite  [cString fname_parasite=\"organism.parasite\"] [int start_cell=0] [int end_cell=-1] [double merit=-1] [int lineage_label=0] [double neutral_metric=0] [int mem_space=2]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname_parasite="organism.parasite"; else fname_parasite=args.PopWord();
+    if (args == "") start_cell=0; else start_cell=args.PopWord().AsInt();
+    if (args == "") end_cell=-1; else end_cell=args.PopWord().AsInt();
+    if (args == "") merit=-1; else merit=args.PopWord().AsDouble();
+    if (args == "") lineage_label=0; else lineage_label=args.PopWord().AsInt();
+    if (args == "") neutral_metric=0; else neutral_metric=args.PopWord().AsDouble();
+    if (args == "") mem_space=2; else mem_space=args.PopWord().AsInt();
+  }
+  ///// inject_range_parasite /////
+  void Process(){
+    if (fname_parasite == "START_CREATURE") fname_parasite = m_world->GetConfig().START_CREATURE.Get();
+    if (end_cell == -1) end_cell = start_cell + 1;
+    if (start_cell < 0 ||
+        end_cell > m_world->GetPopulation().GetSize() ||
+        start_cell >= end_cell) {
+      cout << "Warning: inject_range has invalid range!";
+    }
+    else {
+      cGenome genome_parasite =
+      cInstUtil::LoadGenome(fname_parasite, m_world->GetHardwareManager().GetInstSet());
+      for (int i = start_cell; i < end_cell; i++) {
+        m_world->GetPopulation().Inject(genome_parasite, i, merit, lineage_label, neutral_metric, mem_space);
+      }
+      m_world->GetPopulation().SetSyncEvents(true);
+    }
+  }
+};
+
+///// inject_range_pair /////
+
+/**
+* Injects identical organisms into a range of cells of the population.
+ *
+ * Parameters:
+ * filename (string)
+ *   The filename of the genotype to load. If this is left empty, or the keyword
+ *   "START_CREATURE" is given, than the genotype specified in the genesis
+ *   file under "START_CREATURE" is used.
+ * start_cell (int)
+ *   First cell to inject into.
+ * stop_cell (int)
+ *   First cell *not* to inject into.
+ * merit (double) default: -1
+   *   The initial merit of the organism. If set to -1, this is ignored.
+   * lineage label (integer) default: 0
+     *   An integer that marks all descendants of this organism.
+     * neutral metric (double) default: 0
+       *   A double value that randomly drifts over time.
+       *
+       * Example:
+       *   inject_range creature.gen 0 10
+       *
+       * Will inject 10 organisms into cells 0 through 9.
+       **/
+
+
+class cEvent_inject_range_pair : public cEvent {
+private:
+  cString fname;
+  cString fname_parasite;
+  int start_cell;
+  int end_cell;
+  double merit;
+  int lineage_label;
+  double neutral_metric;
+  int mem_space;
+public:
+    const cString GetName() const { return "inject_range_pair"; }
+  const cString GetDescription() const { return "inject_range_pair  [cString fname=\"START_CREATURE\"] [cString fname_parasite=\"organism.parasite\"] [int start_cell=0] [int end_cell=-1] [double merit=-1] [int lineage_label=0] [double neutral_metric=0] [int mem_space=2]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") fname="START_CREATURE"; else fname=args.PopWord();
+    if (args == "") fname_parasite="organism.parasite"; else fname_parasite=args.PopWord();
+    if (args == "") start_cell=0; else start_cell=args.PopWord().AsInt();
+    if (args == "") end_cell=-1; else end_cell=args.PopWord().AsInt();
+    if (args == "") merit=-1; else merit=args.PopWord().AsDouble();
+    if (args == "") lineage_label=0; else lineage_label=args.PopWord().AsInt();
+    if (args == "") neutral_metric=0; else neutral_metric=args.PopWord().AsDouble();
+    if (args == "") mem_space=2; else mem_space=args.PopWord().AsInt();
+  }
+  ///// inject_range_pair /////
+  void Process(){
+    if (fname == "START_CREATURE") fname = m_world->GetConfig().START_CREATURE.Get();
+    if (end_cell == -1) end_cell = start_cell + 1;
+    if (start_cell < 0 ||
+        end_cell > m_world->GetPopulation().GetSize() ||
+        start_cell >= end_cell) {
+      cout << "Warning: inject_range has invalid range!";
+    }
+    else {
+      cGenome genome =
+      cInstUtil::LoadGenome(fname, m_world->GetHardwareManager().GetInstSet());
+      cGenome genome_parasite =
+        cInstUtil::LoadGenome(fname_parasite, m_world->GetHardwareManager().GetInstSet());
+      for (int i = start_cell; i < end_cell; i++) {
+        m_world->GetPopulation().Inject(genome, i, merit, lineage_label, neutral_metric);
+        m_world->GetPopulation().Inject(genome_parasite, i, merit, lineage_label, neutral_metric, mem_space);
+      }
+      m_world->GetPopulation().SetSyncEvents(true);
+    }
+  }
+};
+
+///// zero_muts /////
+
+/**
+* This event will set all mutation rates to zero...
+ **/
+
+
+class cEvent_zero_muts : public cEvent {
+private:
+public:
+  const cString GetName() const { return "zero_muts"; }
+  const cString GetDescription() const { return "zero_muts"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+  }
+  ///// zero_muts /////
+  void Process(){
+    for (int i = 0; i < m_world->GetPopulation().GetSize(); i++) {
+      m_world->GetPopulation().GetCell(i).MutationRates().Clear();
+    }
+  }
+};
+
+///// mod_copy_mut /////
+
+/**
+**/
+
+
+class cEvent_mod_copy_mut : public cEvent {
+private:
+  double cmut_inc;
+  int cell;
+public:
+    const cString GetName() const { return "mod_copy_mut"; }
+  const cString GetDescription() const { return "mod_copy_mut  <double cmut_inc> [int cell=-1]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    cmut_inc = args.PopWord().AsDouble();
+    if (args == "") cell=-1; else cell=args.PopWord().AsInt();
+  }
+  ///// mod_copy_mut /////
+  void Process(){
+    const double new_cmut = m_world->GetConfig().COPY_MUT_PROB.Get() + cmut_inc;
+    if (cell < 0) {   // cell == -1  -->  all
+      for (int i = 0; i < m_world->GetPopulation().GetSize(); i++) {
+        m_world->GetPopulation().GetCell(i).MutationRates().SetCopyMutProb(new_cmut);
+      }
+      m_world->GetConfig().COPY_MUT_PROB.Set(new_cmut);
+    } else {
+      m_world->GetPopulation().GetCell(cell).MutationRates().SetCopyMutProb(new_cmut);
+    }
+  }
+};
+
+///// mod_div_mut /////
+
+/**
+**/
+
+
+class cEvent_mod_div_mut : public cEvent {
+private:
+  double dmut_inc;
+  int cell;
+public:
+    const cString GetName() const { return "mod_div_mut"; }
+  const cString GetDescription() const { return "mod_div_mut  <double dmut_inc> [int cell=-1]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    dmut_inc = args.PopWord().AsDouble();
+    if (args == "") cell=-1; else cell=args.PopWord().AsInt();
+  }
+  ///// mod_div_mut /////
+  void Process(){
+    const double new_div_mut = m_world->GetConfig().DIV_MUT_PROB.Get() + dmut_inc;
+    if (cell < 0) {   // cell == -1  -->  all
+      for (int i = 0; i < m_world->GetPopulation().GetSize(); i++) {
+        m_world->GetPopulation().GetCell(i).MutationRates().SetDivMutProb(new_div_mut);
+      }
+      m_world->GetConfig().DIV_MUT_PROB.Set(new_div_mut);
+    } else {
+      m_world->GetPopulation().GetCell(cell).MutationRates().SetDivMutProb(new_div_mut);
+    }
+  }
+};
+
+///// set_copy_mut /////
+
+/**
+**/
+
+
+class cEvent_set_copy_mut : public cEvent {
+private:
+  double cmut;
+  int start_cell;
+  int end_cell;
+public:
+    const cString GetName() const { return "set_copy_mut"; }
+  const cString GetDescription() const { return "set_copy_mut  <double cmut> [int start_cell=-1] [int end_cell=-1]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    cmut = args.PopWord().AsDouble();
+    if (args == "") start_cell=-1; else start_cell=args.PopWord().AsInt();
+    if (args == "") end_cell=-1; else end_cell=args.PopWord().AsInt();
+  }
+  ///// set_copy_mut /////
+  void Process(){
+    if (start_cell < 0) {   // start_cell == -1  -->  all
+      m_world->GetConfig().COPY_MUT_PROB.Set(cmut);
+      start_cell = 0;
+      end_cell = m_world->GetPopulation().GetSize();
+    }
+    else if (end_cell < -1)  { // end_cell == -1 --> Only one cell!
+      end_cell = start_cell + 1;
+    }
+    assert(start_cell >= 0 && start_cell < m_world->GetPopulation().GetSize());
+    assert(end_cell > 0 && end_cell <= m_world->GetPopulation().GetSize());
+    for (int i = start_cell; i < end_cell; i++) {
+      m_world->GetPopulation().GetCell(i).MutationRates().SetCopyMutProb(cmut);
+    }
+  }
+};
+
+///// mod_point_mut /////
+
+/**
+**/
+
+
+class cEvent_mod_point_mut : public cEvent {
+private:
+  double pmut_inc;
+  int cell;
+public:
+    const cString GetName() const { return "mod_point_mut"; }
+  const cString GetDescription() const { return "mod_point_mut  <double pmut_inc> [int cell=-1]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    pmut_inc = args.PopWord().AsDouble();
+    if (args == "") cell=-1; else cell=args.PopWord().AsInt();
+  }
+  ///// mod_point_mut /////
+  void Process(){
+    const double new_pmut = m_world->GetConfig().POINT_MUT_PROB.Get() + pmut_inc;
+    if (cell < 0) {   // cell == -1   -->  all
+      for (int i = 0; i < m_world->GetPopulation().GetSize(); i++) {
+        m_world->GetPopulation().GetCell(i).MutationRates().SetPointMutProb(new_pmut);
+      }
+      m_world->GetConfig().POINT_MUT_PROB.Set(new_pmut);
+    } else {
+      m_world->GetPopulation().GetCell(cell).MutationRates().SetPointMutProb(new_pmut);
+    }
+  }
+};
+
+///// set_point_mut /////
+
+/**
+**/
+
+
+class cEvent_set_point_mut : public cEvent {
+private:
+  double pmut;
+  int cell;
+public:
+    const cString GetName() const { return "set_point_mut"; }
+  const cString GetDescription() const { return "set_point_mut  <double pmut> [int cell=-1]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    pmut = args.PopWord().AsDouble();
+    if (args == "") cell=-1; else cell=args.PopWord().AsInt();
+  }
+  ///// set_point_mut /////
+  void Process(){
+    if (cell < 0) {   // cell == -1   -->  all
+      for (int i = 0; i < m_world->GetPopulation().GetSize(); i++) {
+        m_world->GetPopulation().GetCell(i).MutationRates().SetPointMutProb(pmut);
+      }
+      m_world->GetConfig().POINT_MUT_PROB.Set(pmut);
+    } else {
+      m_world->GetPopulation().GetCell(cell).MutationRates().SetPointMutProb(pmut);
+    }
+  }
+};
+
+///// calc_landscape /////
+
+/**
+**/
+
+
+class cEvent_calc_landscape : public cEvent {
+private:
+  int landscape_dist;
+public:
+  const cString GetName() const { return "calc_landscape"; }
+  const cString GetDescription() const { return "calc_landscape  [int landscape_dist=1]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") landscape_dist=1; else landscape_dist=args.PopWord().AsInt();
+  }
+  ///// calc_landscape /////
+  void Process(){
+    cGenome & genome = m_world->GetPopulation().GetGenebank().GetBestGenotype()->GetGenome();
+    cAnalyzeUtil::CalcLandscape(landscape_dist, genome,
+                                m_world->GetHardwareManager().GetInstSet());
+  }
+};
+
+///// predict_w_landscape /////
+
+/**
+**/
+
+
+class cEvent_predict_w_landscape : public cEvent {
+private:
+  cString datafile;
+public:
+  const cString GetName() const { return "predict_w_landscape"; }
+  const cString GetDescription() const { return "predict_w_landscape  [cString datafile=\"land-predict.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") datafile="land-predict.dat"; else datafile=args.PopWord();
+  }
+  ///// predict_w_landscape /////
+  void Process(){
+    cGenome & genome = m_world->GetPopulation().GetGenebank().GetBestGenotype()->GetGenome();
+    cLandscape landscape(genome, m_world->GetHardwareManager().GetInstSet());
+    static ofstream fp(datafile);
+    landscape.PredictWProcess(fp);
+  }
+};
+
+///// predict_nu_landscape /////
+
+/**
+**/
+
+
+class cEvent_predict_nu_landscape : public cEvent {
+private:
+  cString datafile;
+public:
+  const cString GetName() const { return "predict_nu_landscape"; }
+  const cString GetDescription() const { return "predict_nu_landscape  [cString datafile=\"land-predict.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") datafile="land-predict.dat"; else datafile=args.PopWord();
+  }
+  ///// predict_nu_landscape /////
+  void Process(){
+    cGenome & genome = m_world->GetPopulation().GetGenebank().GetBestGenotype()->GetGenome();
+    cLandscape landscape(genome, m_world->GetHardwareManager().GetInstSet());
+    static ofstream fp(datafile);
+    landscape.PredictNuProcess(fp);
+  }
+};
+
+///// sample_landscape /////
+
+/**
+**/
+
+
+class cEvent_sample_landscape : public cEvent {
+private:
+  int sample_size;
+public:
+  const cString GetName() const { return "sample_landscape"; }
+  const cString GetDescription() const { return "sample_landscape  [int sample_size=0]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") sample_size=0; else sample_size=args.PopWord().AsInt();
+  }
+  ///// sample_landscape /////
+  void Process(){
+    cGenome & genome = m_world->GetPopulation().GetGenebank().GetBestGenotype()->GetGenome();
+    cLandscape landscape(genome, m_world->GetHardwareManager().GetInstSet());
+    if (sample_size == 0) sample_size = m_world->GetHardwareManager().GetInstSet().GetSize() - 1;
+    landscape.SampleProcess(sample_size);
+    static ofstream fp("land-sample.dat");
+    landscape.PrintStats(fp, m_world->GetPopulation().GetUpdate());
+  }
+};
+
+///// random_landscape /////
+
+/**
+**/
+
+
+class cEvent_random_landscape : public cEvent {
+private:
+  int landscape_dist;
+  int sample_size;
+  int min_found;
+  int max_sample_size;
+  bool print_if_found;
+public:
+    const cString GetName() const { return "random_landscape"; }
+  const cString GetDescription() const { return "random_landscape  [int landscape_dist=1] [int sample_size=0] [int min_found=0] [int max_sample_size=0] [bool print_if_found=false]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") landscape_dist=1; else landscape_dist=args.PopWord().AsInt();
+    if (args == "") sample_size=0; else sample_size=args.PopWord().AsInt();
+    if (args == "") min_found=0; else min_found=args.PopWord().AsInt();
+    if (args == "") max_sample_size=0; else max_sample_size=args.PopWord().AsInt();
+    if (args == "") print_if_found=false; else print_if_found=args.PopWord();
+  }
+  ///// random_landscape /////
+  void Process(){
+    cGenome & genome = m_world->GetPopulation().GetGenebank().GetBestGenotype()->GetGenome();
+    cLandscape landscape(genome, m_world->GetHardwareManager().GetInstSet());
+    landscape.RandomProcess(sample_size, landscape_dist, min_found,
+                            max_sample_size, print_if_found);
+    static ofstream fp("land-random.dat");
+    landscape.PrintStats(fp, m_world->GetPopulation().GetUpdate());
+  }
+};
+
+///// analyze_landscape /////
+
+/**
+**/
+
+
+class cEvent_analyze_landscape : public cEvent {
+private:
+  int sample_size;
+  int min_found;
+  int max_sample_size;
+public:
+    const cString GetName() const { return "analyze_landscape"; }
+  const cString GetDescription() const { return "analyze_landscape  [int sample_size=1000] [int min_found=0] [int max_sample_size=0]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") sample_size=1000; else sample_size=args.PopWord().AsInt();
+    if (args == "") min_found=0; else min_found=args.PopWord().AsInt();
+    if (args == "") max_sample_size=0; else max_sample_size=args.PopWord().AsInt();
+  }
+  ///// analyze_landscape /////
+  void Process(){
+    cGenome & genome = m_world->GetPopulation().GetGenebank().GetBestGenotype()->GetGenome();
+    cAnalyzeUtil::
+    AnalyzeLandscape(genome, m_world->GetHardwareManager().GetInstSet(),
+                     sample_size, min_found, max_sample_size,
+                     m_world->GetPopulation().GetUpdate());
+  }
+};
+
+///// pairtest_landscape /////
+
+/**
+* If sample_size = 0, pairtest the full landscape.
+ **/
+
+
+class cEvent_pairtest_landscape : public cEvent {
+private:
+  int sample_size;
+public:
+  const cString GetName() const { return "pairtest_landscape"; }
+  const cString GetDescription() const { return "pairtest_landscape  [int sample_size=0]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") sample_size=0; else sample_size=args.PopWord().AsInt();
+  }
+  ///// pairtest_landscape /////
+  void Process(){
+    cGenome & genome = m_world->GetPopulation().GetGenebank().GetBestGenotype()->GetGenome();
+    cAnalyzeUtil::PairTestLandscape(genome, m_world->GetHardwareManager().GetInstSet(), sample_size, m_world->GetPopulation().GetUpdate());
+  }
+};
+
+///// test_dom /////
+
+/**
+**/
+
+
+class cEvent_test_dom : public cEvent {
+private:
+public:
+  const cString GetName() const { return "test_dom"; }
+  const cString GetDescription() const { return "test_dom"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args; }
+  ///// test_dom /////
+  void Process(){
+    cGenome & genome = m_world->GetPopulation().GetGenebank().GetBestGenotype()->GetGenome();
+    static ofstream fp("dom-test.dat");
+    cAnalyzeUtil::TestGenome(genome, m_world->GetHardwareManager().GetInstSet(), fp, m_world->GetPopulation().GetUpdate());
+  }
+};
+
+///// analyze_population /////
+
+/**
+**/
+
+
+class cEvent_analyze_population : public cEvent {
+private:
+  double sample_prob;
+  int landscape;
+  int save_genotype;
+  cString filename;
+public:
+    const cString GetName() const { return "analyze_population"; }
+  const cString GetDescription() const { return "analyze_population  [double sample_prob=1] [int landscape=0] [int save_genotype=0] [cString filename=\"\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") sample_prob=1; else sample_prob=args.PopWord().AsDouble();
+    if (args == "") landscape=0; else landscape=args.PopWord().AsInt();
+    if (args == "") save_genotype=0; else save_genotype=args.PopWord().AsInt();
+    if (args == "") filename=""; else filename=args.PopWord();
+  }
+  ///// analyze_population /////
+  void Process(){
+    static bool auto_filename = false;
+    if( filename == "" )
+      auto_filename = true;
+    if ( auto_filename )
+      filename.Set("population_info_%d.dat",m_world->GetPopulation().GetUpdate());
+    ofstream population_info(filename());
+    cAnalyzeUtil::AnalyzePopulation(m_world, population_info, sample_prob, landscape, save_genotype);
+  }
+};
+
+///// print_detailed_fitness_data /////
+
+/**
+**/
+
+
+class cEvent_print_detailed_fitness_data : public cEvent {
+private:
+  int save_max_f_genotype;
+  int print_fitness_histo;
+  double hist_fmax;
+  double hist_fstep;
+  cString filename;
+  cString filename2;
+  cString filename3;
+public:
+    const cString GetName() const { return "print_detailed_fitness_data"; }
+  const cString GetDescription() const { return "print_detailed_fitness_data  [int save_max_f_genotype=0] [int print_fitness_histo=0] [double hist_fmax=1] [double hist_fstep=0.1] [cString filename=\"fitness.dat\"] [cString filename2=\"fitness_histos.dat\"] [cString filename3=\"fitness_histos_testCPU.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") save_max_f_genotype=0; else save_max_f_genotype=args.PopWord().AsInt();
+    if (args == "") print_fitness_histo=0; else print_fitness_histo=args.PopWord().AsInt();
+    if (args == "") hist_fmax=1; else hist_fmax=args.PopWord().AsDouble();
+    if (args == "") hist_fstep=0.1; else hist_fstep=args.PopWord().AsDouble();
+    if (args == "") filename="fitness.dat"; else filename=args.PopWord();
+    if (args == "") filename2="fitness_histos.dat"; else filename2=args.PopWord();
+    if (args == "") filename3="fitness_histos_testCPU.dat"; else filename3=args.PopWord();
+  }
+  ///// print_detailed_fitness_data /////
+  void Process(){
+    static ofstream datafile(filename());
+    static ofstream histofile;
+    static ofstream histofile_testCPU;
+    if (print_fitness_histo && !histofile.is_open()){
+      histofile.open(filename2());
+      histofile_testCPU.open(filename3());
+    }
+    cAnalyzeUtil::PrintDetailedFitnessData( &m_world->GetPopulation(), datafile, histofile, histofile_testCPU, save_max_f_genotype, print_fitness_histo, hist_fmax, hist_fstep );
+  }
+};
+
+///// print_genetic_distance_data /////
+
+/**
+**/
+
+
+class cEvent_print_genetic_distance_data : public cEvent {
+private:
+  cString creature_name;
+  cString filename;
+public:
+    const cString GetName() const { return "print_genetic_distance_data"; }
+  const cString GetDescription() const { return "print_genetic_distance_data  [cString creature_name=\"\"] [cString filename=\"genetic_distance.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") creature_name=""; else creature_name=args.PopWord();
+    if (args == "") filename="genetic_distance.dat"; else filename=args.PopWord();
+  }
+  ///// print_genetic_distance_data /////
+  void Process(){
+    static ofstream popdump(filename());
+    if( creature_name == "" || creature_name == "START_CREATURE" ){
+      creature_name = m_world->GetConfig().START_CREATURE.Get(); }
+    cAnalyzeUtil::PrintGeneticDistanceData(m_world, popdump, creature_name() );
+  }
+};
+
+///// genetic_distance_pop_dump /////
+
+/**
+**/
+
+
+class cEvent_genetic_distance_pop_dump : public cEvent {
+private:
+  cString creature_name;
+  cString filename;
+  int save_genotype;
+public:
+    const cString GetName() const { return "genetic_distance_pop_dump"; }
+  const cString GetDescription() const { return "genetic_distance_pop_dump  [cString creature_name=\"\"] [cString filename=\"\"] [int save_genotype=0]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") creature_name=""; else creature_name=args.PopWord();
+    if (args == "") filename=""; else filename=args.PopWord();
+    if (args == "") save_genotype=0; else save_genotype=args.PopWord().AsInt();
+  }
+  ///// genetic_distance_pop_dump /////
+  void Process(){
+    static bool auto_filename = false;
+    if( creature_name == "" || creature_name == "START_CREATURE" ){
+      creature_name = m_world->GetConfig().START_CREATURE.Get(); }
+    if( filename == "" || filename == "AUTO" )
+      auto_filename = true;
+    if ( auto_filename )
+      filename.Set("pop_dump_%d.dat",m_world->GetPopulation().GetUpdate());
+    ofstream popdump(filename());
+    cAnalyzeUtil::GeneticDistancePopDump(m_world, popdump, creature_name(), save_genotype );
+  }
+};
+
+///// task_snapshot /////
+
+/**
+**/
+
+
+class cEvent_task_snapshot : public cEvent {
+private:
+  cString filename;
+public:
+  const cString GetName() const { return "task_snapshot"; }
+  const cString GetDescription() const { return "task_snapshot  [cString filename=\"\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") filename=""; else filename=args.PopWord();
+  }
+  ///// task_snapshot /////
+  void Process(){
+    static bool auto_filename = false;
+    if( filename == "" )
+      auto_filename = true;
+    if ( auto_filename )
+      filename.Set("tasks_%d.dat",m_world->GetPopulation().GetUpdate());
+    ofstream snapshot_file(filename());
+    cAnalyzeUtil::TaskSnapshot( &m_world->GetPopulation(), snapshot_file );
+  }
+};
+
+///// print_viable_tasks_data /////
+
+/**
+**/
+
+
+class cEvent_print_viable_tasks_data : public cEvent {
+private:
+  cString filename;
+public:
+  const cString GetName() const { return "print_viable_tasks_data"; }
+  const cString GetDescription() const { return "print_viable_tasks_data  [cString filename=\"viable_tasks.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") filename="viable_tasks.dat"; else filename=args.PopWord();
+  }
+  ///// print_viable_tasks_data /////
+  void Process(){
+    static ofstream datafile(filename());
+    cAnalyzeUtil::PrintViableTasksData(m_world, datafile);
+  }
+};
+
+///// apocalypse /////
+
+/**
+* Randomly removes a certain proportion of the population.
+ *
+ * Parameters:
+ * removal probability (double) default: 0.9
+   *   The probability with which a single organism is removed.
+   **/
+
+
+class cEvent_apocalypse : public cEvent {
+private:
+  double kill_prob;
+public:
+  const cString GetName() const { return "apocalypse"; }
+  const cString GetDescription() const { return "apocalypse  [double kill_prob=.9]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") kill_prob=.9; else kill_prob=args.PopWord().AsDouble();
+  }
+  ///// apocalypse /////
+  void Process(){
+    for (int i = 0; i < m_world->GetPopulation().GetSize(); i++) {
+      cPopulationCell & cell = m_world->GetPopulation().GetCell(i);
+      if (cell.IsOccupied() == false) continue;
+      if (g_random.P(kill_prob))  m_world->GetPopulation().KillOrganism(cell);
+    }
+  }
+};
+
+///// kill_rectangle /////
+
+/**
+* Kills all cell in a rectangle.
+ *
+ * Parameters:
+ * cell [X1][Y1][x2][Y2] (integer) default: 0
+   *   The start and stoping grid-points into which the organism should
+   be killed.
+   **/
+
+
+class cEvent_kill_rectangle : public cEvent {
+private:
+  int cell_X1;
+  int cell_Y1;
+  int cell_X2;
+  int cell_Y2;
+public:
+    const cString GetName() const { return "kill_rectangle"; }
+  const cString GetDescription() const { return "kill_rectangle  [int cell_X1=0] [int cell_Y1=0] [int cell_X2=0] [int cell_Y2=0]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") cell_X1=0; else cell_X1=args.PopWord().AsInt();
+    if (args == "") cell_Y1=0; else cell_Y1=args.PopWord().AsInt();
+    if (args == "") cell_X2=0; else cell_X2=args.PopWord().AsInt();
+    if (args == "") cell_Y2=0; else cell_Y2=args.PopWord().AsInt();
+  }
+  ///// kill_rectangle /////
+  void Process(){
+    int i, j, loc;
+    /* Be sure the user entered a valid range */
+    if (cell_X1 < 0) {
+      cell_X1 = 0;
+    } else if (cell_X1 > m_world->GetPopulation().GetWorldX() - 1) {
+      cell_X1 = m_world->GetPopulation().GetWorldX() - 1;
+    }
+    if (cell_X2 < 0) {
+      cell_X2 = 0;
+    } else if (cell_X2 > m_world->GetPopulation().GetWorldX() - 1) {
+      cell_X2 = m_world->GetPopulation().GetWorldX() - 1;
+    }
+    if (cell_Y1 < 0) {
+      cell_Y1 = 0;
+    } else if (cell_Y1 > m_world->GetPopulation().GetWorldY() - 1) {
+      cell_Y1 = m_world->GetPopulation().GetWorldY() - 1;
+    }
+    if (cell_Y2 < 0) {
+      cell_Y2 = 0;
+    } else if (cell_Y2 > m_world->GetPopulation().GetWorldY() - 1) {
+      cell_Y2 = m_world->GetPopulation().GetWorldY() - 1;
+    }
+    /* Account for a rectangle that crosses over the Zero X or Y cell */
+    if (cell_X2 < cell_X1) {
+      cell_X2 = cell_X2 + m_world->GetPopulation().GetWorldX();
+    }
+    if (cell_Y2 < cell_Y1) {
+      cell_Y2 = cell_Y2 + m_world->GetPopulation().GetWorldY();
+    }
+    for (i = cell_Y1; i <= cell_Y2; i++) {
+      for (j = cell_X1; j <= cell_X2; j++) {
+        loc = (i % m_world->GetPopulation().GetWorldY()) * m_world->GetPopulation().GetWorldX() +
+        (j % m_world->GetPopulation().GetWorldX());
+        cPopulationCell & cell = m_world->GetPopulation().GetCell(loc);
+        if (cell.IsOccupied() == true) {
+          m_world->GetPopulation().KillOrganism(cell);
+        }
+      }
+    }
+    m_world->GetPopulation().SetSyncEvents(true);
+  }
+};
+
+///// rate_kill /////
+
+/**
+* Randomly removes a certain proportion of the population.
+ * In principle, this event does the same thing as the apocalypse event.
+ * However, instead of a probability, here one has to specify a rate. The
+ * rate has the same unit as fitness. So if the average fitness is 20000,
+ * then you remove 50% of the population on every update with a removal rate
+ * of 10000.
+ *
+ * Parameters:
+ * removal rate (double)
+ *   The rate at which organisms are removed.
+ **/
+
+
+class cEvent_rate_kill : public cEvent {
+private:
+  double kill_rate;
+public:
+  const cString GetName() const { return "rate_kill"; }
+  const cString GetDescription() const { return "rate_kill  <double kill_rate>"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    kill_rate = args.PopWord().AsDouble();
+  }
+  ///// rate_kill /////
+  void Process(){
+    double ave_merit = m_world->GetPopulation().GetStats().SumMerit().Average();
+    if ( ave_merit <= 0 )
+      ave_merit = 1; // make sure that we don't get NAN's or negative numbers
+    ave_merit /= m_world->GetConfig().AVE_TIME_SLICE.Get();
+    const double kill_prob = kill_rate / ave_merit;
+    for (int i = 0; i < m_world->GetPopulation().GetSize(); i++) {
+      cPopulationCell & cell = m_world->GetPopulation().GetCell(i);
+      if (cell.IsOccupied() == false) continue;
+      if (g_random.P(kill_prob))  m_world->GetPopulation().KillOrganism(cell);
+    }
+  }
+};
+
+///// serial_transfer /////
+
+/**
+* This event does again the same thing as apocalypse. However, now
+ * the number of organisms to be retained can be specified
+ * exactly. Also, it is possible to specify whether any of these
+ * organisms may be dead or not.
+ *
+ * Parameters:
+ * transfer size (int) default: 1
+   *   The number of organisms to retain. If there are fewer living
+   *   organisms than the specified transfer size, then all living
+   *   organisms are retained.
+   * ignore deads (int) default: 1
+     *   When set to 1, only living organisms are retained. Otherwise,
+     *   every type of organism can be retained.
+     **/
+
+
+class cEvent_serial_transfer : public cEvent {
+private:
+  int transfer_size;
+  int ignore_deads;
+public:
+    const cString GetName() const { return "serial_transfer"; }
+  const cString GetDescription() const { return "serial_transfer  [int transfer_size=1] [int ignore_deads=1]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") transfer_size=1; else transfer_size=args.PopWord().AsInt();
+    if (args == "") ignore_deads=1; else ignore_deads=args.PopWord().AsInt();
+  }
+  ///// serial_transfer /////
+  void Process(){
+    m_world->GetPopulation().SerialTransfer( transfer_size, ignore_deads );
+  }
+};
+
+///// hillclimb /////
+
+/**
+* Does a hill climb with the dominant genotype.
+ **/
+
+
+class cEvent_hillclimb : public cEvent {
+private:
+public:
+  const cString GetName() const { return "hillclimb"; }
+  const cString GetDescription() const { return "hillclimb"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args; }
+  ///// hillclimb /////
+  void Process(){
+    cGenome & genome = m_world->GetPopulation().GetGenebank().GetBestGenotype()->GetGenome();
+    ofstream fp("hillclimb.dat");
+    cLandscape landscape(genome, m_world->GetHardwareManager().GetInstSet());
+    landscape.HillClimb(fp);
+  }
+};
+
+///// hillclimb_neut /////
+
+/**
+**/
+
+
+class cEvent_hillclimb_neut : public cEvent {
+private:
+public:
+  const cString GetName() const { return "hillclimb_neut"; }
+  const cString GetDescription() const { return "hillclimb_neut"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args; }
+  ///// hillclimb_neut /////
+  void Process(){
+    cGenome & genome = m_world->GetPopulation().GetGenebank().GetBestGenotype()->GetGenome();
+    ofstream fp("hillclimb.dat");
+    cLandscape landscape(genome, m_world->GetHardwareManager().GetInstSet());
+    landscape.HillClimb_Neut(fp);
+  }
+};
+
+///// hillclimb_rand /////
+
+/**
+**/
+
+
+class cEvent_hillclimb_rand : public cEvent {
+private:
+public:
+  const cString GetName() const { return "hillclimb_rand"; }
+  const cString GetDescription() const { return "hillclimb_rand"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args; }
+  ///// hillclimb_rand /////
+  void Process(){
+    cGenome & genome = m_world->GetPopulation().GetGenebank().GetBestGenotype()->GetGenome();
+    ofstream fp("hillclimb.dat");
+    cLandscape landscape(genome, m_world->GetHardwareManager().GetInstSet());
+    landscape.HillClimb_Rand(fp);
+  }
+};
+
+///// compete_demes /////
+
+/**
+* Compete all of the demes using a basic genetic algorithm approach. Fitness
+ * of each deme is determined differently depending on the competition_type: 
+ * 0: deme fitness = 1 (control, random deme selection)
+ * 1: deme fitness = number of births since last competition (default) 
+ * 2: deme fitness = average organism fitness at the current update
+ * 3: deme fitness = average mutation rate at the current update
+ * Merit can optionally be passed in.
+ **/
+
+
+class cEvent_compete_demes : public cEvent {
+private:
+  int competition_type;
+public:
+  const cString GetName() const { return "compete_demes"; }
+  const cString GetDescription() const { return "compete_demes  [int competition_type=1]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") competition_type=1; else competition_type=args.PopWord().AsInt();
+  }
+  ///// compete_demes /////
+  void Process(){
+    m_world->GetPopulation().CompeteDemes(competition_type);
+  }
+};
+
+///// reset_demes /////
+
+/**
+* Designed to serve as a control for the compete_demes. Each deme is 
+ * copied into itself and the parameters reset. 
+ **/
+
+
+class cEvent_reset_demes : public cEvent {
+private:
+public:
+  const cString GetName() const { return "reset_demes"; }
+  const cString GetDescription() const { return "reset_demes"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+  }
+  ///// reset_demes /////
+  void Process(){
+    m_world->GetPopulation().ResetDemes();
+  }
+};
+
+///// print_deme_stats /////
+
+/**
+* Print stats about individual demes
+ **/
+
+
+class cEvent_print_deme_stats : public cEvent {
+private:
+public:
+  const cString GetName() const { return "print_deme_stats"; }
+  const cString GetDescription() const { return "print_deme_stats"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+  }
+  ///// print_deme_stats /////
+  void Process(){
+    m_world->GetPopulation().PrintDemeStats();
+  }
+};
+
+///// copy_deme /////
+
+/**
+* Takes two numbers as arguments and copies the contents of the first deme
+ * listed into the second.
+ **/
+
+
+class cEvent_copy_deme : public cEvent {
+private:
+  int deme1_id;
+  int deme2_id;
+public:
+    const cString GetName() const { return "copy_deme"; }
+  const cString GetDescription() const { return "copy_deme  <int deme1_id> <int deme2_id>"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    deme1_id = args.PopWord().AsInt();
+    deme2_id = args.PopWord().AsInt();
+  }
+  ///// copy_deme /////
+  void Process(){
+    m_world->GetPopulation().CopyDeme(deme1_id, deme2_id);
+  }
+};
+
+///// calc_consensus /////
+
+/**
+* Calculates the consensus sequence.
+ *
+ * Parameters:
+ * lines saved (integer) default: 0
+   *    ???
+   **/
+
+
+class cEvent_calc_consensus : public cEvent {
+private:
+  int lines_saved;
+public:
+  const cString GetName() const { return "calc_consensus"; }
+  const cString GetDescription() const { return "calc_consensus  [int lines_saved=0]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") lines_saved=0; else lines_saved=args.PopWord().AsInt();
+  }
+  ///// calc_consensus /////
+  void Process(){
+    cAnalyzeUtil::CalcConsensus(m_world, lines_saved);
+  }
+};
+
+///// test_size_change_robustness /////
+
+/**
+**/
+
+
+class cEvent_test_size_change_robustness : public cEvent {
+private:
+  int num_trials;
+  cString filename;
+public:
+    const cString GetName() const { return "test_size_change_robustness"; }
+  const cString GetDescription() const { return "test_size_change_robustness  [int num_trials=100] [cString filename=\"size_change.dat\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") num_trials=100; else num_trials=args.PopWord().AsInt();
+    if (args == "") filename="size_change.dat"; else filename=args.PopWord();
+  }
+  ///// test_size_change_robustness /////
+  void Process(){
+    ofstream & fp = m_world->GetPopulation().GetStats().GetDataFileOFStream(filename);
+    cAnalyzeUtil::TestInsSizeChangeRobustness(fp,
+                                              m_world->GetHardwareManager().GetInstSet(),
+                                              m_world->GetPopulation().GetGenebank().GetBestGenotype()->GetGenome(),
+                                              num_trials, m_world->GetPopulation().GetUpdate());
+  }
+};
+
+///// test_threads /////
+
+/**
+**/
+
+
+class cEvent_test_threads : public cEvent {
+private:
+public:
+  const cString GetName() const { return "test_threads"; }
+  const cString GetDescription() const { return "test_threads"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+  }
+  
+  ///// test_threads /////
+  void Process(){
+    cTestCPU::TestThreads(m_world->GetPopulation().GetGenebank().GetBestGenotype()->GetGenome());
+  }
+};
+
+///// print_threads /////
+
+/**
+**/
+
+
+class cEvent_print_threads : public cEvent {
+private:
+public:
+  const cString GetName() const { return "print_threads"; }
+  const cString GetDescription() const { return "print_threads"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+  }
+  ///// print_threads /////
+  void Process(){
+    cTestCPU::PrintThreads( m_world->GetPopulation().GetGenebank().GetBestGenotype()->GetGenome() );
+  }
+};
+
+///// dump_fitness_grid /////
+
+/**
+* Writes out all fitness values of the organisms currently in the
+ * population.
+ *
+ * The output file is called "fgrid.*.out", where '*' is replaced by the
+ * number of the current update.
+ **/
+
+
+class cEvent_dump_fitness_grid : public cEvent {
+private:
+public:
+  const cString GetName() const { return "dump_fitness_grid"; }
+  const cString GetDescription() const { return "dump_fitness_grid"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+  }
+  ///// dump_fitness_grid /////
+  void Process(){
+    cString filename;
+    filename.Set("fgrid.%05d.out", m_world->GetPopulation().GetUpdate());
+    ofstream fp(filename());
+    for (int i = 0; i < m_world->GetPopulation().GetWorldX(); i++) {
+      for (int j = 0; j < m_world->GetPopulation().GetWorldY(); j++) {
+        cPopulationCell & cell = m_world->GetPopulation().GetCell(j*m_world->GetPopulation().GetWorldX()+i);
+        double fitness = (cell.IsOccupied()) ?
+          cell.GetOrganism()->GetGenotype()->GetFitness() : 0.0;
+        fp << fitness << " ";
+      }
+      fp << endl;
+    }
+  }
+};
+
+///// dump_genotype_grid /////
+
+/**
+* Writes out all genotype id values of the organisms currently in the
+ * population.
+ *
+ * The output file is called "idgrid.*.out", where '*' is replaced by the
+ * number of the current update.
+ **/
+
+
+class cEvent_dump_genotype_grid : public cEvent {
+private:
+public:
+  const cString GetName() const { return "dump_genotype_grid"; }
+  const cString GetDescription() const { return "dump_genotype_grid"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+  }
+  ///// dump_genotype_grid /////
+  void Process(){
+    cString filename;
+    filename.Set("idgrid.%05d.out", m_world->GetPopulation().GetUpdate());
+    ofstream fp(filename());
+    for (int i = 0; i < m_world->GetPopulation().GetWorldX(); i++) {
+      for (int j = 0; j < m_world->GetPopulation().GetWorldY(); j++) {
+        cPopulationCell & cell = m_world->GetPopulation().GetCell(j*m_world->GetPopulation().GetWorldX()+i);
+        int id = (cell.IsOccupied()) ?
+          cell.GetOrganism()->GetGenotype()->GetID() : -1;
+        fp << id << " ";
+      }
+      fp << endl;
+    }
+  }
+};
+
+///// dump_task_grid /////
+
+/**
+* Writes out a grid of tasks done by each organism
+ * Tasks are encoded as a binary string first, and then converted into a
+ * base 10 number 
+ **/
+
+
+class cEvent_dump_task_grid : public cEvent {
+private:
+public:
+  const cString GetName() const { return "dump_task_grid"; }
+  const cString GetDescription() const { return "dump_task_grid"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+  }
+  ///// dump_task_grid /////
+  void Process(){
+    cString filename;
+    filename.Set("task_grid_%d.dat",m_world->GetPopulation().GetUpdate());
+    ofstream fp(filename());
+    cAnalyzeUtil::TaskGrid( &m_world->GetPopulation(), fp );
+  }
+};
+
+///// dump_donor_grid /////
+
+/**
+* Writes out the grid of donor organisms in the population
+ * 
+ * The output file is called "donor_grid.*.out", where '*' is replaced by the
+ * number of the current update.
+ **/   
+
+
+class cEvent_dump_donor_grid : public cEvent {
+private:
+public:
+  const cString GetName() const { return "dump_donor_grid"; }
+  const cString GetDescription() const { return "dump_donor_grid"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+  }
+  
+  ///// dump_donor_grid /////
+  void Process(){
+    cString filename;
+    filename.Set("donor_grid.%05d.out", m_world->GetPopulation().GetUpdate());
+    ofstream fp(filename());
+    for (int i = 0; i < m_world->GetPopulation().GetWorldX(); i++) {  
+      for (int j = 0; j < m_world->GetPopulation().GetWorldY(); j++) {
+        cPopulationCell & cell = m_world->GetPopulation().GetCell(j*m_world->GetPopulation().GetWorldX()+i);
+        int donor = cell.IsOccupied() ?  
+          cell.GetOrganism()->GetPhenotype().IsDonorLast() : -1;    
+        fp << donor << " ";
+      }
+      fp << endl;
+    }
+  }
+};
+
+///// dump_receiver_grid /////
+
+/**
+* Writes out the grid of organisms which received merit in the population
+ *
+ * The output file is called "receiver_grid.*.out", where '*' is replaced by the
+ * number of the current update.
+ **/
+
+
+class cEvent_dump_receiver_grid : public cEvent {
+private:
+public:
+  const cString GetName() const { return "dump_receiver_grid"; }
+  const cString GetDescription() const { return "dump_receiver_grid"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+  }
+  ///// dump_receiver_grid /////
+  void Process(){
+    cString filename;
+    filename.Set("receiver_grid.%05d.out", m_world->GetPopulation().GetUpdate());
+    ofstream fp(filename());
+    for (int i = 0; i < m_world->GetPopulation().GetWorldX(); i++) {
+      for (int j = 0; j < m_world->GetPopulation().GetWorldY(); j++) {
+        cPopulationCell & cell = m_world->GetPopulation().GetCell(j*m_world->GetPopulation().GetWorldX()+i);
+        int receiver = cell.IsOccupied() ?
+          cell.GetOrganism()->GetPhenotype().IsReceiver() : -1;
+        fp << receiver << " ";
+      }
+      fp << endl;
+    }
+  }
+};
+
+///// print_tree_depths /////
+
+/**
+* Reconstruction of phylogenetic trees.
+ **/
+
+
+class cEvent_print_tree_depths : public cEvent {
+private:
+  cString filename;
+public:
+  const cString GetName() const { return "print_tree_depths"; }
+  const cString GetDescription() const { return "print_tree_depths  [cString filename=\"\"]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") filename=""; else filename=args.PopWord();
+  }
+  ///// print_tree_depths /////
+  void Process(){
+    if (filename == "") filename.Set("tree_depth.%d.dat", m_world->GetPopulation().GetUpdate());
+    ofstream fp(filename);
+    cAnalyzeUtil::PrintTreeDepths(&m_world->GetPopulation(), fp);
+  }
+};
+
+///// sever_grid_col /////
+
+/**
+* Remove the connections between cells along a column in an avida grid.
+ * Arguments:
+ *  col_id:  indicates the number of columns to the left of the cut.
+ *           default (or -1) = cut population in half
+ *  min_row: First row to start cutting from
+ *           default = 0
+ *  max_row: Last row to cut to
+ *           default (or -1) = last row in population.
+ **/
+
+
+class cEvent_sever_grid_col : public cEvent {
+private:
+  int col_id;
+  int min_row;
+  int max_row;
+public:
+    const cString GetName() const { return "sever_grid_col"; }
+  const cString GetDescription() const { return "sever_grid_col  [int col_id=-1] [int min_row=0] [int max_row=-1]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") col_id=-1; else col_id=args.PopWord().AsInt();
+    if (args == "") min_row=0; else min_row=args.PopWord().AsInt();
+    if (args == "") max_row=-1; else max_row=args.PopWord().AsInt();
+  }
+  ///// sever_grid_col /////
+  void Process(){
+    const int world_x = m_world->GetPopulation().GetWorldX();
+    const int world_y = m_world->GetPopulation().GetWorldY();
+    if (col_id == -1) col_id = world_x / 2;
+    if (max_row == -1) max_row = world_y;
+    if (col_id < 0 || col_id >= world_x) {
+      cerr << "Event Error: Column ID " << col_id
+      << " out of range for sever_grid_col" << endl;
+      return;
+    }
+    // Loop through all of the rows and make the cut on each...
+    for (int row_id = min_row; row_id < max_row; row_id++) {
+      int idA = row_id * world_x + col_id;
+      int idB  = GridNeighbor(idA, world_x, world_y, -1,  0);
+      int idA0 = GridNeighbor(idA, world_x, world_y,  0, -1);
+      int idA1 = GridNeighbor(idA, world_x, world_y,  0,  1);
+      int idB0 = GridNeighbor(idA, world_x, world_y, -1, -1);
+      int idB1 = GridNeighbor(idA, world_x, world_y, -1,  1);
+      cPopulationCell & cellA = m_world->GetPopulation().GetCell(idA);
+      cPopulationCell & cellB = m_world->GetPopulation().GetCell(idB);
+      tList<cPopulationCell> & cellA_list = cellA.ConnectionList();
+      tList<cPopulationCell> & cellB_list = cellB.ConnectionList();
+      cellA_list.Remove(&m_world->GetPopulation().GetCell(idB));
+      cellA_list.Remove(&m_world->GetPopulation().GetCell(idB0));
+      cellA_list.Remove(&m_world->GetPopulation().GetCell(idB1));
+      cellB_list.Remove(&m_world->GetPopulation().GetCell(idA));
+      cellB_list.Remove(&m_world->GetPopulation().GetCell(idA0));
+      cellB_list.Remove(&m_world->GetPopulation().GetCell(idA1));
+    }
+  }
+};
+
+///// sever_grid_row /////
+
+/**
+* Remove the connections between cells along a column in an avida grid.
+ * Arguments:
+ *  row_id:  indicates the number of rows above the cut.
+ *           default (or -1) = cut population in half
+ *  min_col: First row to start cutting from
+ *           default = 0
+ *  max_col: Last row to cut to
+ *           default (or -1) = last row in population.
+ **/
+
+
+class cEvent_sever_grid_row : public cEvent {
+private:
+  int row_id;
+  int min_col;
+  int max_col;
+public:
+    const cString GetName() const { return "sever_grid_row"; }
+  const cString GetDescription() const { return "sever_grid_row  [int row_id=-1] [int min_col=0] [int max_col=-1]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") row_id=-1; else row_id=args.PopWord().AsInt();
+    if (args == "") min_col=0; else min_col=args.PopWord().AsInt();
+    if (args == "") max_col=-1; else max_col=args.PopWord().AsInt();
+  }
+  ///// sever_grid_row /////
+  void Process(){
+    const int world_x = m_world->GetPopulation().GetWorldX();
+    const int world_y = m_world->GetPopulation().GetWorldY();
+    if (row_id == -1) row_id = world_y / 2;
+    if (max_col == -1) max_col = world_x;
+    if (row_id < 0 || row_id >= world_y) {
+      cerr << "Event Error: Row ID " << row_id
+      << " out of range for sever_grid_row" << endl;
+      return;
+    }
+    // Loop through all of the cols and make the cut on each...
+    for (int col_id = min_col; col_id < max_col; col_id++) {
+      int idA = row_id * world_x + col_id;
+      int idB  = GridNeighbor(idA, world_x, world_y,  0, -1);
+      int idA0 = GridNeighbor(idA, world_x, world_y, -1,  0);
+      int idA1 = GridNeighbor(idA, world_x, world_y,  1,  0);
+      int idB0 = GridNeighbor(idA, world_x, world_y, -1, -1);
+      int idB1 = GridNeighbor(idA, world_x, world_y,  1, -1);
+      cPopulationCell & cellA = m_world->GetPopulation().GetCell(idA);
+      cPopulationCell & cellB = m_world->GetPopulation().GetCell(idB);
+      tList<cPopulationCell> & cellA_list = cellA.ConnectionList();
+      tList<cPopulationCell> & cellB_list = cellB.ConnectionList();
+      cellA_list.Remove(&m_world->GetPopulation().GetCell(idB));
+      cellA_list.Remove(&m_world->GetPopulation().GetCell(idB0));
+      cellA_list.Remove(&m_world->GetPopulation().GetCell(idB1));
+      cellB_list.Remove(&m_world->GetPopulation().GetCell(idA));
+      cellB_list.Remove(&m_world->GetPopulation().GetCell(idA0));
+      cellB_list.Remove(&m_world->GetPopulation().GetCell(idA1));
+    }
+  }
+};
+
+///// join_grid_col /////
+
+/**
+* Join the connections between cells along a column in an avida grid.
+ * Arguments:
+ *  col_id:  indicates the number of columns to the left of the joining.
+ *           default (or -1) = join population halves.
+ *  min_row: First row to start joining from
+ *           default = 0
+ *  max_row: Last row to join to
+ *           default (or -1) = last row in population.
+ **/
+
+
+class cEvent_join_grid_col : public cEvent {
+private:
+  int col_id;
+  int min_row;
+  int max_row;
+public:
+    const cString GetName() const { return "join_grid_col"; }
+  const cString GetDescription() const { return "join_grid_col  [int col_id=-1] [int min_row=0] [int max_row=-1]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") col_id=-1; else col_id=args.PopWord().AsInt();
+    if (args == "") min_row=0; else min_row=args.PopWord().AsInt();
+    if (args == "") max_row=-1; else max_row=args.PopWord().AsInt();
+  }
+  ///// join_grid_col /////
+  void Process(){
+    const int world_x = m_world->GetPopulation().GetWorldX();
+    const int world_y = m_world->GetPopulation().GetWorldY();
+    if (col_id == -1) col_id = world_x / 2;
+    if (max_row == -1) max_row = world_y;
+    if (col_id < 0 || col_id >= world_x) {
+      cerr << "Event Error: Column ID " << col_id
+      << " out of range for join_grid_col" << endl;
+      return;
+    }
+    // Loop through all of the rows and make the cut on each...
+    for (int row_id = min_row; row_id < max_row; row_id++) {
+      int idA = row_id * world_x + col_id;
+      int idB  = GridNeighbor(idA, world_x, world_y, -1,  0);
+      cPopulationCell & cellA = m_world->GetPopulation().GetCell(idA);
+      cPopulationCell & cellB = m_world->GetPopulation().GetCell(idB);
+      cPopulationCell & cellA0 =
+        m_world->GetPopulation().GetCell(GridNeighbor(idA, world_x, world_y,  0, -1));
+      cPopulationCell & cellA1 =
+        m_world->GetPopulation().GetCell(GridNeighbor(idA, world_x, world_y,  0,  1));
+      cPopulationCell & cellB0 =
+        m_world->GetPopulation().GetCell(GridNeighbor(idA, world_x, world_y, -1, -1));
+      cPopulationCell & cellB1 =
+        m_world->GetPopulation().GetCell(GridNeighbor(idA, world_x, world_y, -1,  1));
+      tList<cPopulationCell> & cellA_list = cellA.ConnectionList();
+      tList<cPopulationCell> & cellB_list = cellB.ConnectionList();
+      if (cellA_list.FindPtr(&cellB)  == NULL) cellA_list.Push(&cellB);
+      if (cellA_list.FindPtr(&cellB0) == NULL) cellA_list.Push(&cellB0);
+      if (cellA_list.FindPtr(&cellB1) == NULL) cellA_list.Push(&cellB1);
+      if (cellB_list.FindPtr(&cellA)  == NULL) cellB_list.Push(&cellA);
+      if (cellB_list.FindPtr(&cellA0) == NULL) cellB_list.Push(&cellA0);
+      if (cellB_list.FindPtr(&cellA1) == NULL) cellB_list.Push(&cellA1);
+    }
+  }
+};
+
+///// join_grid_row /////
+
+/**
+* Remove the connections between cells along a column in an avida grid.
+ * Arguments:
+ *  row_id:  indicates the number of rows abovef the cut.
+ *           default (or -1) = cut population in half
+ *  min_col: First row to start cutting from
+ *           default = 0
+ *  max_col: Last row to cut to
+ *           default (or -1) = last row in population.
+ **/
+
+
+class cEvent_join_grid_row : public cEvent {
+private:
+  int row_id;
+  int min_col;
+  int max_col;
+public:
+    const cString GetName() const { return "join_grid_row"; }
+  const cString GetDescription() const { return "join_grid_row  [int row_id=-1] [int min_col=0] [int max_col=-1]"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    if (args == "") row_id=-1; else row_id=args.PopWord().AsInt();
+    if (args == "") min_col=0; else min_col=args.PopWord().AsInt();
+    if (args == "") max_col=-1; else max_col=args.PopWord().AsInt();
+  }
+  ///// join_grid_row /////
+  void Process(){
+    const int world_x = m_world->GetPopulation().GetWorldX();
+    const int world_y = m_world->GetPopulation().GetWorldY();
+    if (row_id == -1) row_id = world_y / 2;
+    if (max_col == -1) max_col = world_x;
+    if (row_id < 0 || row_id >= world_y) {
+      cerr << "Event Error: Row ID " << row_id
+      << " out of range for join_grid_row" << endl;
+      return;
+    }
+    // Loop through all of the cols and make the cut on each...
+    for (int col_id = min_col; col_id < max_col; col_id++) {
+      int idA = row_id * world_x + col_id;
+      int idB  = GridNeighbor(idA, world_x, world_y,  0, -1);
+      cPopulationCell & cellA = m_world->GetPopulation().GetCell(idA);
+      cPopulationCell & cellB = m_world->GetPopulation().GetCell(idB);
+      cPopulationCell & cellA0 =
+        m_world->GetPopulation().GetCell(GridNeighbor(idA, world_x, world_y, -1,  0));
+      cPopulationCell & cellA1 =
+        m_world->GetPopulation().GetCell(GridNeighbor(idA, world_x, world_y,  1,  0));
+      cPopulationCell & cellB0 =
+        m_world->GetPopulation().GetCell(GridNeighbor(idA, world_x, world_y, -1, -1));
+      cPopulationCell & cellB1 =
+        m_world->GetPopulation().GetCell(GridNeighbor(idA, world_x, world_y,  1, -1));
+      tList<cPopulationCell> & cellA_list = cellA.ConnectionList();
+      tList<cPopulationCell> & cellB_list = cellB.ConnectionList();
+      if (cellA_list.FindPtr(&cellB)  == NULL) cellA_list.Push(&cellB);
+      if (cellA_list.FindPtr(&cellB0) == NULL) cellA_list.Push(&cellB0);
+      if (cellA_list.FindPtr(&cellB1) == NULL) cellA_list.Push(&cellB1);
+      if (cellB_list.FindPtr(&cellA)  == NULL) cellB_list.Push(&cellA);
+      if (cellB_list.FindPtr(&cellA0) == NULL) cellB_list.Push(&cellA0);
+      if (cellB_list.FindPtr(&cellA1) == NULL) cellB_list.Push(&cellA1);
+    }
+  }
+};
+
+///// connect_cells /////
+
+/**
+* Connects a pair of specified cells.
+ * Arguments:
+ *  cellA_x, cellA_y, cellB_x, cellB_y
+ **/
+
+
+class cEvent_connect_cells : public cEvent {
+private:
+  int cellA_x;
+  int cellA_y;
+  int cellB_x;
+  int cellB_y;
+public:
+    const cString GetName() const { return "connect_cells"; }
+  const cString GetDescription() const { return "connect_cells  <int cellA_x> <int cellA_y> <int cellB_x> <int cellB_y>"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    cellA_x = args.PopWord().AsInt();
+    cellA_y = args.PopWord().AsInt();
+    cellB_x = args.PopWord().AsInt();
+    cellB_y = args.PopWord().AsInt();
+  }
+  ///// connect_cells /////
+  void Process(){
+    const int world_x = m_world->GetPopulation().GetWorldX();
+    const int world_y = m_world->GetPopulation().GetWorldY();
+    if (cellA_x < 0 || cellA_x >= world_x ||
+        cellA_y < 0 || cellA_y >= world_y ||
+        cellB_x < 0 || cellB_x >= world_x ||
+        cellB_y < 0 || cellB_y >= world_y) {
+      cerr << "Event 'connect_cells' cell out of range." << endl;
+      return;
+    }
+    int idA = cellA_y * world_x + cellA_x;
+    int idB = cellB_y * world_x + cellB_x;
+    cPopulationCell & cellA = m_world->GetPopulation().GetCell(idA);
+    cPopulationCell & cellB = m_world->GetPopulation().GetCell(idB);
+    tList<cPopulationCell> & cellA_list = cellA.ConnectionList();
+    tList<cPopulationCell> & cellB_list = cellB.ConnectionList();
+    cellA_list.PushRear(&cellB);
+    cellB_list.PushRear(&cellA);
+  }
+};
+
+///// disconnect_cells /////
+
+/**
+* Connects a pair of specified cells.
+ * Arguments:
+ *  cellA_x, cellA_y, cellB_x, cellB_y
+ **/
+
+
+class cEvent_disconnect_cells : public cEvent {
+private:
+  int cellA_x;
+  int cellA_y;
+  int cellB_x;
+  int cellB_y;
+public:
+    const cString GetName() const { return "disconnect_cells"; }
+  const cString GetDescription() const { return "disconnect_cells  <int cellA_x> <int cellA_y> <int cellB_x> <int cellB_y>"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    cellA_x = args.PopWord().AsInt();
+    cellA_y = args.PopWord().AsInt();
+    cellB_x = args.PopWord().AsInt();
+    cellB_y = args.PopWord().AsInt();
+  }
+  ///// disconnect_cells /////
+  void Process(){
+    const int world_x = m_world->GetPopulation().GetWorldX();
+    const int world_y = m_world->GetPopulation().GetWorldY();
+    if (cellA_x < 0 || cellA_x >= world_x ||
+        cellA_y < 0 || cellA_y >= world_y ||
+        cellB_x < 0 || cellB_x >= world_x ||
+        cellB_y < 0 || cellB_y >= world_y) {
+      cerr << "Event 'connect_cells' cell out of range." << endl;
+      return;
+    }
+    int idA = cellA_y * world_x + cellA_x;
+    int idB = cellB_y * world_x + cellB_x;
+    cPopulationCell & cellA = m_world->GetPopulation().GetCell(idA);
+    cPopulationCell & cellB = m_world->GetPopulation().GetCell(idB);
+    tList<cPopulationCell> & cellA_list = cellA.ConnectionList();
+    tList<cPopulationCell> & cellB_list = cellB.ConnectionList();
+    cellA_list.Remove(&cellB);
+    cellB_list.Remove(&cellA);
+  }
+};
+
+///// inject_resource /////
+
+/**
+* Inject (add) a specified amount of a specified resource.
+ **/
+
+
+class cEvent_inject_resource : public cEvent {
+private:
+  cString res_name;
+  double res_count;
+public:
+    const cString GetName() const { return "inject_resource"; }
+  const cString GetDescription() const { return "inject_resource  <cString res_name> <double res_count>"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    res_name = args.PopWord();
+    res_count = args.PopWord().AsDouble();
+  }
+  ///// inject_resource /////
+  void Process(){
+    cResourceLib & res_lib = m_world->GetEnvironment().GetResourceLib();
+    int res_id = res_lib.GetResource(res_name)->GetID();
+    m_world->GetPopulation().UpdateResource(res_id, res_count);
+  }
+};
+
+///// set_resource /////
+
+/**
+* Set the resource amount to a specific level
+ **/
+
+
+class cEvent_set_resource : public cEvent {
+private:
+  cString res_name;
+  double res_count;
+public:
+    const cString GetName() const { return "set_resource"; }
+  const cString GetDescription() const { return "set_resource  <cString res_name> <double res_count>"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    res_name = args.PopWord();
+    res_count = args.PopWord().AsDouble();
+  }
+  ///// set_resource /////
+  void Process(){
+    cResourceLib & res_lib = m_world->GetEnvironment().GetResourceLib();
+    cResource * found_resource = res_lib.GetResource(res_name);
+    if (found_resource != NULL) {
+      m_world->GetPopulation().SetResource(found_resource->GetID(), res_count);
+    }
+  }
+};
+
+///// inject_scaled_resource /////
+
+/**
+* Inject (add) a specified amount of a specified resource, scaled by
+ * the current average merit divided by the average time slice.
+ **/
+
+
+class cEvent_inject_scaled_resource : public cEvent {
+private:
+  cString res_name;
+  double res_count;
+public:
+    const cString GetName() const { return "inject_scaled_resource"; }
+  const cString GetDescription() const { return "inject_scaled_resource  <cString res_name> <double res_count>"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    res_name = args.PopWord();
+    res_count = args.PopWord().AsDouble();
+  }
+  ///// inject_scaled_resource /////
+  void Process(){
+    double ave_merit = m_world->GetPopulation().GetStats().SumMerit().Average();
+    if ( ave_merit <= 0 )
+      ave_merit = 1; // make sure that we don't get NAN's or negative numbers
+    ave_merit /= m_world->GetConfig().AVE_TIME_SLICE.Get();
+    cResourceLib & res_lib = m_world->GetEnvironment().GetResourceLib();
+    int res_id = res_lib.GetResource(res_name)->GetID();
+    m_world->GetPopulation().UpdateResource(res_id, res_count/ave_merit);
+  }
+};
+
+
+///// outflow_scaled_resource /////
+
+/**
+* Removes a specified percentage of a specified resource, scaled by
+ * the current average merit divided by the average time slice.
+ **/
+class cEvent_outflow_scaled_resource : public cEvent {
+private:
+  cString res_name;
+  double res_perc;
+public:
+    const cString GetName() const { return "outflow_scaled_resource"; }
+  const cString GetDescription() const { return "outflow_scaled_resource  <cString res_name> <double res_perc>"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    res_name = args.PopWord();
+    res_perc = args.PopWord().AsDouble();
+  }
+  void Process()
+  {
+    double ave_merit = m_world->GetPopulation().GetStats().SumMerit().Average();
+    if ( ave_merit <= 0 )
+      ave_merit = 1; // make sure that we don't get NAN's or negative numbers
+    ave_merit /= m_world->GetConfig().AVE_TIME_SLICE.Get();
+    cResourceLib & res_lib = m_world->GetEnvironment().GetResourceLib();
+    int res_id = res_lib.GetResource(res_name)->GetID();
+    double res_level = m_world->GetPopulation().GetResource(res_id);
+    // a quick calculation shows that this formula guarantees that
+    // the equilibrium level when resource is not used is independent
+    // of the average merit
+    double scaled_perc = 1/(1+ave_merit*(1-res_perc)/res_perc);
+    res_level -= res_level*scaled_perc;
+    m_world->GetPopulation().SetResource(res_id, res_level);
+  }
+};
+
+
+///// set_reaction_value /////
+
+/**
+* Set the value associated with a reaction to a specific level
+ **/
+class cEvent_set_reaction_value : public cEvent {
+private:
+  cString reaction_name;
+  double reaction_value;
+public:
+    const cString GetName() const { return "set_reaction_value"; }
+  const cString GetDescription() const { return "set_reaction_value  <cString reaction_name> <double reaction_value>"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    reaction_name = args.PopWord();
+    reaction_value = args.PopWord().AsDouble();
+  }
+  void Process()
+  {
+    m_world->GetEnvironment().SetReactionValue(reaction_name, reaction_value);
+  }
+};
+
+
+///// set_reaction_value_mult /////
+
+/**
+* Change the value of the reaction by multiplying it with the imput number
+ **/
+class cEvent_set_reaction_value_mult : public cEvent {
+private:
+  cString reaction_name;
+  double value_mult;
+public:
+    const cString GetName() const { return "set_reaction_value_mult"; }
+  const cString GetDescription() const { return "set_reaction_value_mult  <cString reaction_name> <double value_mult>"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    reaction_name = args.PopWord();
+    value_mult = args.PopWord().AsDouble();
+  }
+  void Process()
+  {
+    m_world->GetEnvironment().SetReactionValueMult(reaction_name, value_mult);
+  }
+};
+
+
+///// set_reaction_inst /////
+
+/**
+* Change the instruction triggered by the task
+ **/
+class cEvent_set_reaction_inst : public cEvent {
+private:
+  cString reaction_name;
+  cString inst_name;
+public:
+    const cString GetName() const { return "set_reaction_inst"; }
+  const cString GetDescription() const { return "set_reaction_inst <cString reaction_name> <cString inst_name>"; }
+  
+  void Configure(cWorld* world, const cString& in_args)
+  {
+    m_world = world;
+    m_args = in_args;
+    cString args(in_args);
+    reaction_name = args.PopWord();
+    inst_name = args.PopWord();
+  }
+  void Process()
+  {
+    m_world->GetEnvironment().SetReactionInst(reaction_name, inst_name);
+  }
+};
+
+cEventManager::cEventManager(cWorld* world) : m_world(world)
+{
+  Register<cEvent_exit>("exit");
+  Register<cEvent_exit_if_generation_greater_than>("exit_if_generation_greater_than");
+  Register<cEvent_exit_if_update_greater_than>("exit_if_update_greater_than");
+  Register<cEvent_exit_if_ave_lineage_label_smaller>("exit_if_ave_lineage_label_smaller");
+  Register<cEvent_exit_if_ave_lineage_label_larger>("exit_if_ave_lineage_label_larger");
+  Register<cEvent_echo>("echo");
+  Register<cEvent_print_data>("print_data");
+  Register<cEvent_print_average_data>("print_average_data");
+  Register<cEvent_print_error_data>("print_error_data");
+  Register<cEvent_print_variance_data>("print_variance_data");
+  Register<cEvent_print_dominant_data>("print_dominant_data");
+  Register<cEvent_print_stats_data>("print_stats_data");
+  Register<cEvent_print_count_data>("print_count_data");
+  Register<cEvent_print_totals_data>("print_totals_data");
+  Register<cEvent_print_tasks_data>("print_tasks_data");
+  Register<cEvent_print_tasks_exe_data>("print_tasks_exe_data");
+  Register<cEvent_print_resource_data>("print_resource_data");
+  Register<cEvent_print_time_data>("print_time_data");
+  Register<cEvent_print_mutation_data>("print_mutation_data");
+  Register<cEvent_print_mutation_rate_data>("print_mutation_rate_data");
+  Register<cEvent_print_divide_mut_data>("print_divide_mut_data");
+  Register<cEvent_print_dom_parasite_data>("print_dom_parasite_data");
+  Register<cEvent_print_instruction_data>("print_instruction_data");
+  Register<cEvent_print_instruction_abundance_histogram>("print_instruction_abundance_histogram");
+  Register<cEvent_print_depth_histogram>("print_depth_histogram");
+  Register<cEvent_print_genotype_abundance_histogram>("print_genotype_abundance_histogram");
+  Register<cEvent_print_species_abundance_histogram>("print_species_abundance_histogram");
+  Register<cEvent_print_lineage_totals>("print_lineage_totals");
+  Register<cEvent_print_lineage_counts>("print_lineage_counts");
+  Register<cEvent_print_dom>("print_dom");
+  Register<cEvent_parasite_debug>("parasite_debug");
+  Register<cEvent_print_dom_parasite>("print_dom_parasite");
+  Register<cEvent_print_genotype_map>("print_genotype_map");
+  Register<cEvent_print_number_phenotypes>("print_number_phenotypes");
+  Register<cEvent_print_phenotype_status>("print_phenotype_status");
+  Register<cEvent_save_population>("save_population");
+  Register<cEvent_load_population>("load_population");
+  Register<cEvent_save_clone>("save_clone");
+  Register<cEvent_load_clone>("load_clone");
+  Register<cEvent_load_dump_file>("load_dump_file");
+  Register<cEvent_dump_pop>("dump_pop");
+  Register<cEvent_print_genotypes>("print_genotypes");
+  Register<cEvent_detail_pop>("detail_pop");
+  Register<cEvent_detail_sex_pop>("detail_sex_pop");
+  Register<cEvent_detail_parasite_pop>("detail_parasite_pop");
+  Register<cEvent_dump_historic_pop>("dump_historic_pop");
+  Register<cEvent_dump_historic_sex_pop>("dump_historic_sex_pop");
+  Register<cEvent_dump_memory>("dump_memory");
+  Register<cEvent_inject>("inject");
+  Register<cEvent_inject_all>("inject_all");
+  Register<cEvent_inject_range>("inject_range");
+  Register<cEvent_inject_sequence>("inject_sequence");
+  Register<cEvent_inject_random>("inject_random");
+  Register<cEvent_inject_range_parasite>("inject_range_parasite");
+  Register<cEvent_inject_range_pair>("inject_range_pair");
+  Register<cEvent_zero_muts>("zero_muts");
+  Register<cEvent_mod_copy_mut>("mod_copy_mut");
+  Register<cEvent_mod_div_mut>("mod_div_mut");
+  Register<cEvent_set_copy_mut>("set_copy_mut");
+  Register<cEvent_mod_point_mut>("mod_point_mut");
+  Register<cEvent_set_point_mut>("set_point_mut");
+  Register<cEvent_calc_landscape>("calc_landscape");
+  Register<cEvent_predict_w_landscape>("predict_w_landscape");
+  Register<cEvent_predict_nu_landscape>("predict_nu_landscape");
+  Register<cEvent_sample_landscape>("sample_landscape");
+  Register<cEvent_random_landscape>("random_landscape");
+  Register<cEvent_analyze_landscape>("analyze_landscape");
+  Register<cEvent_pairtest_landscape>("pairtest_landscape");
+  Register<cEvent_test_dom>("test_dom");
+  Register<cEvent_analyze_population>("analyze_population");
+  Register<cEvent_print_detailed_fitness_data>("print_detailed_fitness_data");
+  Register<cEvent_print_genetic_distance_data>("print_genetic_distance_data");
+  Register<cEvent_genetic_distance_pop_dump>("genetic_distance_pop_dump");
+  Register<cEvent_task_snapshot>("task_snapshot");
+  Register<cEvent_print_viable_tasks_data>("print_viable_tasks_data");
+  Register<cEvent_apocalypse>("apocalypse");
+  Register<cEvent_kill_rectangle>("kill_rectangle");
+  Register<cEvent_rate_kill>("rate_kill");
+  Register<cEvent_serial_transfer>("serial_transfer");
+  Register<cEvent_hillclimb>("hillclimb");
+  Register<cEvent_hillclimb_neut>("hillclimb_neut");
+  Register<cEvent_hillclimb_rand>("hillclimb_rand");
+  Register<cEvent_compete_demes>("compete_demes");
+  Register<cEvent_reset_demes>("reset_demes");
+  Register<cEvent_print_deme_stats>("print_deme_stats");
+  Register<cEvent_copy_deme>("copy_deme");
+  Register<cEvent_calc_consensus>("calc_consensus");
+  Register<cEvent_test_size_change_robustness>("test_size_change_robustness");
+  Register<cEvent_test_threads>("test_threads");
+  Register<cEvent_print_threads>("print_threads");
+  Register<cEvent_dump_fitness_grid>("dump_fitness_grid");
+  Register<cEvent_dump_genotype_grid>("dump_genotype_grid");
+  Register<cEvent_dump_task_grid>("dump_task_grid");
+  Register<cEvent_dump_donor_grid>("dump_donor_grid");
+  Register<cEvent_dump_receiver_grid>("dump_receiver_grid");
+  Register<cEvent_print_tree_depths>("print_tree_depths");
+  Register<cEvent_sever_grid_col>("sever_grid_col");
+  Register<cEvent_sever_grid_row>("sever_grid_row");
+  Register<cEvent_join_grid_col>("join_grid_col");
+  Register<cEvent_join_grid_row>("join_grid_row");
+  Register<cEvent_connect_cells>("connect_cells");
+  Register<cEvent_disconnect_cells>("disconnect_cells");
+  Register<cEvent_inject_resource>("inject_resource");
+  Register<cEvent_set_resource>("set_resource");
+  Register<cEvent_inject_scaled_resource>("inject_scaled_resource");
+  Register<cEvent_outflow_scaled_resource>("outflow_scaled_resource");
+  Register<cEvent_set_reaction_value>("set_reaction_value");
+  Register<cEvent_set_reaction_value_mult>("set_reaction_value_mult");
+  Register<cEvent_set_reaction_inst>("set_reaction_inst");
+}
+
+cEvent* cEventManager::ConstructEvent(const cString name, const cString & args)
+{
+  cEvent* event = Create(name);
+  event->Configure(m_world, args);
+  return event;
+}
+
+void cEventManager::PrintAllEventDescriptions()
+{
+  tArray<cEvent*> events;
+  CreateAll(events);
+  
+  for (int i = 0; i < events.GetSize(); i++) {
+    cout << events[i]->GetDescription() << endl;
+    delete events[i];
+  }
+}
\ No newline at end of file

Copied: branches/brysonda/source/event/cEventManager.h (from rev 354, branches/brysonda/source/event/cEventFactoryManager.h)
===================================================================
--- branches/brysonda/source/event/cEventFactoryManager.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/event/cEventManager.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -0,0 +1,37 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (C) 1993 - 2003 California Institute of Technology             //
+//                                                                          //
+// Read the COPYING and README files, or contact 'avida at alife.org',         //
+// before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef cEventManager_h
+#define cEventManager_h
+
+#ifndef TLIST_HH
+#include "tList.h"
+#endif
+#ifndef TOBJECTFACTORY_H
+#include "tObjectFactory.h"
+#endif
+#ifndef STRING_HH
+#include "cString.h"
+#endif
+
+class cEvent;
+class cWorld;
+
+class cEventManager : private tObjectFactory<cEvent* ()> {
+private:
+  cWorld* m_world;
+  
+public:
+  cEventManager(cWorld* world);
+  ~cEventManager() { ; }
+
+  cEvent* ConstructEvent(const cString name, const cString& args);
+  
+  void PrintAllEventDescriptions();
+};
+
+#endif

Deleted: branches/brysonda/source/event/cPopulationEvent.h
===================================================================
--- branches/brysonda/source/event/cPopulationEvent.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/event/cPopulationEvent.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,32 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (C) 1993 - 2003 California Institute of Technology             //
-//                                                                          //
-// Read the COPYING and README files, or contact 'avida at alife.org',         //
-// before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef POPULATION_EVENT_HH
-#define POPULATION_EVENT_HH
-
-#ifndef EVENT_HH
-#include "cEvent.h"
-#endif
-
-class cString;
-class cPopulation;
-
-class cPopulationEvent : public cEvent {
-private:
-  // not implemented. prevents inadvertend wrong instantiation.
-  cPopulationEvent(const cPopulationEvent&);
-  const cPopulationEvent& operator=(cPopulationEvent&);
-
-protected:
-  cPopulation *population;
-  
-public:
-  cPopulationEvent() { ; }
-  void SetPopulation(cPopulation* pop) { population = pop; }
-};
-
-#endif

Deleted: branches/brysonda/source/event/cPopulationEventFactory.cc
===================================================================
--- branches/brysonda/source/event/cPopulationEventFactory.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/event/cPopulationEventFactory.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,4086 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (C) 1993 - 2003 California Institute of Technology             //
-//                                                                          //
-// Read the COPYING and README files, or contact 'avida at alife.org',         //
-// before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef POPULATION_EVENT_FACTORY_HH
-#include "cPopulationEventFactory.h"
-#endif
-
-#ifndef ANALYZE_UTIL_HH
-#include "cAnalyzeUtil.h"
-#endif
-#ifndef avida_h
-#include "avida.h"
-#endif
-#ifndef AVIDA_DRIVER_BASE_HH
-#include "cAvidaDriver_Base.h"
-#endif
-#ifndef CONFIG_HH
-#include "cConfig.h"
-#endif
-#ifndef ENVIRONMENT_HH
-#include "cEnvironment.h"
-#endif
-#ifndef EVENT_HH
-#include "cEvent.h"
-#endif
-#ifndef GENEBANK_HH
-#include "cGenebank.h"
-#endif
-#ifndef GENOTYPE_HH
-#include "cGenotype.h"
-#endif
-#ifndef INJECT_GENEBANK_HH
-#include "cInjectGenebank.h"
-#endif
-#ifndef INJECT_GENOTYPE_HH
-#include "cInjectGenotype.h"
-#endif
-#ifndef INST_UTIL_HH
-#include "cInstUtil.h"
-#endif
-#ifndef LANDSCAPE_HH
-#include "cLandscape.h"
-#endif
-#ifndef LINEAGE_CONTROL_HH
-#include "cLineageControl.h"
-#endif
-#ifndef ORGANISM_HH
-#include "cOrganism.h"
-#endif
-#ifndef PHENOTYPE_HH
-#include "cPhenotype.h"
-#endif
-#ifndef POPULATION_HH
-#include "cPopulation.h"
-#endif
-#ifndef POPULATION_CELL_HH
-#include "cPopulationCell.h"
-#endif
-#ifndef POPULATION_EVENT_HH
-#include "cPopulationEvent.h"
-#endif
-#ifndef RESOURCE_HH
-#include "cResource.h"
-#endif
-#ifndef STATS_HH
-#include "cStats.h"
-#endif
-#ifndef STRING_UTIL_HH
-#include "cStringUtil.h"
-#endif
-#ifndef TEST_CPU_HH
-#include "cTestCPU.h"
-#endif
-#ifndef TEST_UTIL_HH
-#include "cTestUtil.h"
-#endif
-#ifndef TOOLS_HH
-#include "cTools.h"
-#endif
-
-#include <ctype.h>           // for isdigit
-
-using namespace std;
-
-
-
-/////////////////
-//  events derived from cPopulationEvent (autogenerated code)
-/////////////////
-
-// The Process() functions
-using namespace std;
-
-///// exit /////
-
-/**
-* Ends the Avida run immediately.
- **/
-
-namespace nPopulation {
-  
-  class cEvent_exit : public cPopulationEvent {
-  public:
-    const cString GetName() const { return "exit"; }
-    const cString GetDescription() const { return "exit"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-  }
-    
-    ///// exit /////
-    void Process(){
-      cAvidaDriver_Base::main_driver->SetDone();
-    }
-  };
-  
-  ///// exit_if_generation_greater_than /////
-  
-  /**
-  * Ends the Avida run when the current generation exceeds the
-   * maximum generation given as parameter.
-   *
-   * Parameters:
-   * max generation (int)
-   *   The generation at which the run should be stopped.
-   **/
-  
-  
-  class cEvent_exit_if_generation_greater_than : public cPopulationEvent {
-  private:
-    int max_generation;
-  public:
-    const cString GetName() const { return "exit_if_generation_greater_than"; }
-    const cString GetDescription() const { return "exit_if_generation_greater_than  <int max_generation>"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      max_generation = args.PopWord().AsInt();
-  }
-    ///// exit_if_generation_greater_than /////
-    void Process(){
-      if( population->GetGeneration() > max_generation ){
-        cAvidaDriver_Base::main_driver->SetDone();
-      }
-    }
-  };
-  
-  ///// exit_if_update_greater_than /////
-  
-  /**
-    * Ends the Avida run when the current update exceeds the
-   * maximum update given as parameter.
-   *
-   * Parameters:
-   * max update (int)
-   *   The update at which the run should be stopped.
-   **/
-  
-  
-  class cEvent_exit_if_update_greater_than : public cPopulationEvent {
-  private:
-    int max_update;
-  public:
-    const cString GetName() const { return "exit_if_update_greater_than"; }
-    const cString GetDescription() const { return "exit_if_update_greater_than  <int max_update>"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      max_update = args.PopWord().AsInt();
-  }
-    ///// exit_if_update_greater_than /////
-    void Process(){
-      if( population->GetUpdate() > max_update ){
-        cAvidaDriver_Base::main_driver->SetDone();
-      }
-    }
-  };
-  
-  ///// exit_if_ave_lineage_label_smaller /////
-  
-  /**
-    * Halts the avida run if the current average lineage label is smaller
-   * than the value given as parameter.
-   *
-   * Parameters:
-   * lineage_label_crit_value (int)
-   *   The critical value to which the average lineage label is compared.
-   **/
-  
-  
-  class cEvent_exit_if_ave_lineage_label_smaller : public cPopulationEvent {
-  private:
-    double lineage_label_crit_value;
-  public:
-    const cString GetName() const { return "exit_if_ave_lineage_label_smaller"; }
-    const cString GetDescription() const { return "exit_if_ave_lineage_label_smaller  <double lineage_label_crit_value>"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      lineage_label_crit_value = args.PopWord().AsDouble();
-  }
-    ///// exit_if_ave_lineage_label_smaller /////
-    void Process(){
-      if( population->GetStats().GetAveLineageLabel() < lineage_label_crit_value ){
-        cAvidaDriver_Base::main_driver->SetDone();
-      }
-    }
-  };
-  
-  ///// exit_if_ave_lineage_label_larger /////
-  
-  /**
-    * Halts the avida run if the current average lineage label is larger
-   * than the value given as parameter.
-   *
-   * Parameters:
-   * lineage_label_crit_value (int)
-   *   The critical value to which the average lineage label is compared.
-   **/
-  
-  
-  class cEvent_exit_if_ave_lineage_label_larger : public cPopulationEvent {
-  private:
-    double lineage_label_crit_value;
-  public:
-    const cString GetName() const { return "exit_if_ave_lineage_label_larger"; }
-    const cString GetDescription() const { return "exit_if_ave_lineage_label_larger  <double lineage_label_crit_value>"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      lineage_label_crit_value = args.PopWord().AsDouble();
-  }
-    ///// exit_if_ave_lineage_label_larger /////
-    void Process(){
-      if( population->GetStats().GetAveLineageLabel() > lineage_label_crit_value ){
-        cAvidaDriver_Base::main_driver->SetDone();
-      }
-    }
-  };
-  
-  ///// echo /////
-  
-  /**
-    * Writes out a message. If no message is given, average update and
-   * generation are written out.
-   *
-   * Parameters:
-   * message (string)
-   **/
-  
-  
-  class cEvent_echo : public cPopulationEvent {
-  private:
-    cString mesg;
-  public:
-    const cString GetName() const { return "echo"; }
-    const cString GetDescription() const { return "echo  <cString mesg>"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      mesg = args.PopWord();
-  }
-    ///// echo /////
-    void Process(){
-      if( mesg == "" ){
-        mesg.Set("Echo : Update = %f\t AveGeneration = %f",
-                 population->GetUpdate(), population->GetGeneration());
-      }
-      cAvidaDriver_Base::main_driver->NotifyComment(mesg);
-    }
-  };
-  
-  ///// print_data /////
-  
-  /**
-    * Output user-defined data from the cStats object...
-   *
-   * Parameters:
-   * filename (string)
-   *   The name of the data file.
-   * format
-   *   A comma-seperated list of statistics to output.
-   **/
-  
-  
-  class cEvent_print_data : public cPopulationEvent {
-  private:
-    cString filename;
-    cString format;
-  public:
-      const cString GetName() const { return "print_data"; }
-    const cString GetDescription() const { return "print_data  <cString filename> <cString format>"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      filename = args.PopWord();
-      format = args.PopWord();
-    }
-    ///// print_data /////
-    void Process(){
-      population->GetStats().PrintDataFile(filename, format, ',');
-    }
-  };
-  
-  ///// print_average_data /////
-  
-  /**
-    * Output various average quantities into datafile.
-   *
-   * Parameters:
-   * filename (string) default: average.dat
-     *   The name of the data file.
-     **/
-  
-  
-  class cEvent_print_average_data : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "print_average_data"; }
-    const cString GetDescription() const { return "print_average_data  [cString fname=\"average.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname="average.dat"; else fname=args.PopWord();
-  }
-    ///// print_average_data /////
-    void Process(){
-      population->GetStats().PrintAverageData(fname);
-    }
-  };
-  
-  ///// print_error_data /////
-  
-  /**
-    * Prints out various data related to statistical errors.
-   *
-   * Parameters:
-   * filename (string) default: error.dat
-     *   The name of the data file.
-     **/
-  
-  
-  class cEvent_print_error_data : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "print_error_data"; }
-    const cString GetDescription() const { return "print_error_data  [cString fname=\"error.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname="error.dat"; else fname=args.PopWord();
-  }
-    ///// print_error_data /////
-    void Process(){
-      population->GetStats().PrintErrorData(fname);
-    }
-  };
-  
-  ///// print_variance_data /////
-  
-  /**
-    * Prints out various variances.
-   *
-   * Parameters:
-   * filename (string) default: variance.dat
-     *   The name of the data file.
-     **/
-  
-  
-  class cEvent_print_variance_data : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "print_variance_data"; }
-    const cString GetDescription() const { return "print_variance_data  [cString fname=\"variance.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname="variance.dat"; else fname=args.PopWord();
-  }
-    ///// print_variance_data /////
-    void Process(){
-      population->GetStats().PrintVarianceData(fname);
-    }
-  };
-  
-  ///// print_dominant_data /////
-  
-  /**
-    * Output various quantities related to the dominant organism.
-   *
-   * Parameters:
-   * filename (string) default: dominant.dat
-     *   The name of the data file.
-     **/
-  
-  
-  class cEvent_print_dominant_data : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "print_dominant_data"; }
-    const cString GetDescription() const { return "print_dominant_data  [cString fname=\"dominant.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname="dominant.dat"; else fname=args.PopWord();
-  }
-    ///// print_dominant_data /////
-    void Process(){
-      population->GetStats().PrintDominantData(fname);
-    }
-  };
-  
-  ///// print_stats_data /////
-  
-  /**
-    * Output various statistical quantities.
-   *
-   * Parameters:
-   * filename (string) default: stats.dat
-     *   The name of the data file.
-     **/
-  
-  
-  class cEvent_print_stats_data : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "print_stats_data"; }
-    const cString GetDescription() const { return "print_stats_data  [cString fname=\"stats.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname="stats.dat"; else fname=args.PopWord();
-  }
-    ///// print_stats_data /////
-    void Process(){
-      population->GetStats().PrintStatsData(fname);
-    }
-  };
-  
-  ///// print_count_data /////
-  
-  /**
-    * Output various counts, such as number of organisms etc.
-   *
-   * Parameters:
-   * filename (string) default: count.dat
-     *   The name of the data file.
-     **/
-  
-  
-  class cEvent_print_count_data : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "print_count_data"; }
-    const cString GetDescription() const { return "print_count_data  [cString fname=\"count.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname="count.dat"; else fname=args.PopWord();
-  }
-    ///// print_count_data /////
-    void Process(){
-      population->GetStats().PrintCountData(fname);
-    }
-  };
-  
-  ///// print_totals_data /////
-  
-  /**
-    * Various total numbers.
-   *
-   * Parameters:
-   * filename (string) default: totals.dat
-     *   The name of the data file.
-     **/
-  
-  
-  class cEvent_print_totals_data : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "print_totals_data"; }
-    const cString GetDescription() const { return "print_totals_data  [cString fname=\"totals.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname="totals.dat"; else fname=args.PopWord();
-  }
-    ///// print_totals_data /////
-    void Process(){
-      population->GetStats().PrintTotalsData(fname);
-    }
-  };
-  
-  ///// print_tasks_data /////
-  
-  /**
-    * Output the number of times the various tasks have been performed in the
-   * last update.
-   *
-   * Parameters:
-   * filename (string) default: tasks.dat
-     *   The name of the data file.
-     **/
-  
-  
-  class cEvent_print_tasks_data : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "print_tasks_data"; }
-    const cString GetDescription() const { return "print_tasks_data  [cString fname=\"tasks.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname="tasks.dat"; else fname=args.PopWord();
-  }
-    ///// print_tasks_data /////
-    void Process(){
-      population->GetStats().PrintTasksData(fname);
-    }
-  };
-  
-  ///// print_tasks_exe_data /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_print_tasks_exe_data : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "print_tasks_exe_data"; }
-    const cString GetDescription() const { return "print_tasks_exe_data  [cString fname=\"tasks_exe.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname="tasks_exe.dat"; else fname=args.PopWord();
-  }
-    ///// print_tasks_exe_data /////
-    void Process(){
-      population->GetStats().PrintTasksExeData(fname);
-    }
-  };
-  
-  ///// print_resource_data /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_print_resource_data : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "print_resource_data"; }
-    const cString GetDescription() const { return "print_resource_data  [cString fname=\"resource.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname="resource.dat"; else fname=args.PopWord();
-  }
-    ///// print_resource_data /////
-    void Process(){
-      population->GetStats().PrintResourceData(fname);
-    }
-  };
-  
-  ///// print_time_data /////
-  
-  /**
-    * Output time related data, such as update, generation, etc.
-   *
-   * Parameters:
-   * filename (string) default: time.dat
-     *   The name of the data file.
-     **/
-  
-  
-  class cEvent_print_time_data : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "print_time_data"; }
-    const cString GetDescription() const { return "print_time_data  [cString fname=\"time.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname="time.dat"; else fname=args.PopWord();
-  }
-    ///// print_time_data /////
-    void Process(){
-      population->GetStats().PrintTimeData(fname);
-    }
-  };
-  
-  ///// print_mutation_data /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_print_mutation_data : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "print_mutation_data"; }
-    const cString GetDescription() const { return "print_mutation_data  [cString fname=\"mutation.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname="mutation.dat"; else fname=args.PopWord();
-  }
-    ///// print_mutation_data /////
-    void Process(){
-      population->GetStats().PrintMutationData(fname);
-    }
-  };
-  
-  ///// print_mutation_rate_data /////
-  
-  /**
-    Output (regular and log) statistics about individual copy
-   mutation rates (aver, stdev, skew, cur).
-   Useful only when mutation rate is set per organism.
-   **/
-  
-  
-  class cEvent_print_mutation_rate_data : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "print_mutation_rate_data"; }
-    const cString GetDescription() const { return "print_mutation_rate_data  [cString fname=\"mutation_rates.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname="mutation_rates.dat"; else fname=args.PopWord();
-  }
-    ///// print_mutation_rate_data /////
-    void Process(){
-      population->GetStats().PrintMutationRateData(fname);
-    }
-  };
-  
-  ///// print_divide_mut_data /////
-  
-  /**
-    Output (regular and log) statistics about individual, per site,
-   rates divide mutation rates (aver, stdev, skew, cur).
-   Use with multiple divide instuction set.
-   **/
-  
-  
-  class cEvent_print_divide_mut_data : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "print_divide_mut_data"; }
-    const cString GetDescription() const { return "print_divide_mut_data  [cString fname=\"divide_mut.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname="divide_mut.dat"; else fname=args.PopWord();
-  }
-    ///// print_divide_mut_data /////
-    void Process(){
-      population->GetStats().PrintDivideMutData(fname);
-    }
-  };
-  
-  ///// print_dom_parasite_data /////
-  
-  /**
-    * Output various quantities related to the dominant parasite.
-   *
-   * Parameters:
-   * filename (string) default: parasite.dat
-     *   The name of the data file.
-     **/
-  
-  
-  class cEvent_print_dom_parasite_data : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "print_dom_parasite_data"; }
-    const cString GetDescription() const { return "print_dom_parasite_data  [cString fname=\"parasite.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname="parasite.dat"; else fname=args.PopWord();
-  }
-    ///// print_dom_parasite_data /////
-    void Process(){
-      population->GetStats().PrintDominantParaData(fname);
-    }
-  };
-  
-  ///// print_instruction_data /////
-  
-  /**
-    Sum of the by-organisms counts of what instructions they _successfully_
-   execute beteween birth and divide. Prior to their first divide, organisms
-   report values for their parents.
-   **/
-  
-  
-  class cEvent_print_instruction_data : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "print_instruction_data"; }
-    const cString GetDescription() const { return "print_instruction_data  [cString fname=\"instruction.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname="instruction.dat"; else fname=args.PopWord();
-  }
-    ///// print_instruction_data /////
-    void Process(){
-      population->GetStats().PrintInstructionData(fname);
-    }
-  };
-  
-  ///// print_instruction_abundance_histogram /////
-  
-  /**
-    *
-   * Appends a line containing the bulk count (abundance) of
-   * each instruction in the population onto a file.
-   *
-   * Parameters:
-   * filename (string) default: "instruction_histogram.dat"
-     *
-     **/
-  
-  
-  class cEvent_print_instruction_abundance_histogram : public cPopulationEvent {
-  private:
-    cString filename;
-  public:
-    const cString GetName() const { return "print_instruction_abundance_histogram"; }
-    const cString GetDescription() const { return "print_instruction_abundance_histogram  [cString filename=\"instruction_histogram.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") filename="instruction_histogram.dat"; else filename=args.PopWord();
-  }
-    ///// print_instruction_abundance_histogram /////
-    void Process(){
-      ofstream & fp = population->GetStats().GetDataFileOFStream(filename);
-      cAnalyzeUtil::PrintInstructionAbundanceHistogram(fp, population);
-    }
-  };
-  
-  ///// print_depth_histogram /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_print_depth_histogram : public cPopulationEvent {
-  private:
-    cString filename;
-  public:
-    const cString GetName() const { return "print_depth_histogram"; }
-    const cString GetDescription() const { return "print_depth_histogram  [cString filename=\"depth_histogram.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") filename="depth_histogram.dat"; else filename=args.PopWord();
-  }
-    ///// print_depth_histogram /////
-    void Process(){
-      ofstream & fp = population->GetStats().GetDataFileOFStream(filename);
-      cAnalyzeUtil::PrintDepthHistogram(fp, population);
-    }
-  };
-  
-  ///// print_genotype_abundance_histogram /////
-  
-  /**
-    * Writes out a genotype abundance histogram.
-   *
-   * Parameters:
-   * filename (string) default: genotype_abundance_histogram.dat
-     *   The name of the file into which the histogram is written.
-     **/
-  
-  
-  class cEvent_print_genotype_abundance_histogram : public cPopulationEvent {
-  private:
-    cString filename;
-  public:
-    const cString GetName() const { return "print_genotype_abundance_histogram"; }
-    const cString GetDescription() const { return "print_genotype_abundance_histogram  [cString filename=\"genotype_abundance_histogram.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") filename="genotype_abundance_histogram.dat"; else filename=args.PopWord();
-  }
-    ///// print_genotype_abundance_histogram /////
-    void Process(){
-      ofstream & fp = population->GetStats().GetDataFileOFStream(filename);
-      cAnalyzeUtil::PrintGenotypeAbundanceHistogram(fp, population);
-    }
-  };
-  
-  ///// print_species_abundance_histogram /////
-  
-  /**
-    * Writes out a species abundance histogram.
-   *
-   * Parameters:
-   * filename (string) default: species_abundance_histogram.dat
-     *   The name of the file into which the histogram is written.
-     **/
-  
-  
-  class cEvent_print_species_abundance_histogram : public cPopulationEvent {
-  private:
-    cString filename;
-  public:
-    const cString GetName() const { return "print_species_abundance_histogram"; }
-    const cString GetDescription() const { return "print_species_abundance_histogram  [cString filename=\"species_abundance_histogram.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") filename="species_abundance_histogram.dat"; else filename=args.PopWord();
-  }
-    ///// print_species_abundance_histogram /////
-    void Process(){
-      ofstream & fp = population->GetStats().GetDataFileOFStream(filename);
-      cAnalyzeUtil::PrintSpeciesAbundanceHistogram(fp, population);
-    }
-  };
-  
-  ///// print_lineage_totals /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_print_lineage_totals : public cPopulationEvent {
-  private:
-    cString fname;
-    int verbose;
-  public:
-      const cString GetName() const { return "print_lineage_totals"; }
-    const cString GetDescription() const { return "print_lineage_totals  [cString fname=\"lineage_totals.dat\"] [int verbose=1]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname="lineage_totals.dat"; else fname=args.PopWord();
-      if (args == "") verbose=1; else verbose=args.PopWord().AsInt();
-    }
-    ///// print_lineage_totals /////
-    void Process(){
-      static bool msg_printed = false;
-      if (population->GetLineageControl() == NULL) {
-        if ( msg_printed == false ){
-          ofstream & fp = population->GetStats().GetDataFileOFStream(fname);
-          fp << "No lineage data available!" << endl;
-          msg_printed = true;
-        }
-        return;
-      }
-      population->GetLineageControl()->PrintLineageTotals(fname, verbose);
-    }
-  };
-  
-  ///// print_lineage_counts /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_print_lineage_counts : public cPopulationEvent {
-  private:
-    cString fname;
-    int verbose;
-  public:
-      const cString GetName() const { return "print_lineage_counts"; }
-    const cString GetDescription() const { return "print_lineage_counts  [cString fname=\"lineage_counts.dat\"] [int verbose=0]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname="lineage_counts.dat"; else fname=args.PopWord();
-      if (args == "") verbose=0; else verbose=args.PopWord().AsInt();
-    }
-    ///// print_lineage_counts /////
-    void Process(){
-      static bool msg_printed = false;
-      if (population->GetLineageControl() == NULL) {
-        if ( msg_printed == false ){
-          ofstream & fp = population->GetStats().GetDataFileOFStream(fname);
-          fp << "No lineage data available!" << endl;
-          msg_printed = true;
-        }
-        return;
-      }
-      if (verbose) {    // verbose mode is the same in both methods
-        population->GetLineageControl()->PrintLineageTotals(fname, verbose);
-        return;
-      }
-      population->GetLineageControl()->PrintLineageCurCounts(fname);
-    }
-  };
-  
-  ///// print_dom /////
-  
-  /**
-    * Write the currently dominant genotype to disk.
-   *
-   * Parameters:
-   * filename (string)
-   *   The name under which the genotype should be saved. If no
-   *   filename is given, the genotype is saved into the directory
-   *   genebank, under the name that the genebank has associated with
-   *   this genotype.
-   **/
-  
-  
-  class cEvent_print_dom : public cPopulationEvent {
-  private:
-    cString in_filename;
-  public:
-    const cString GetName() const { return "print_dom"; }
-    const cString GetDescription() const { return "print_dom  [cString in_filename=\"\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") in_filename=""; else in_filename=args.PopWord();
-  }
-    ///// print_dom /////
-    void Process(){
-      cGenotype * dom = population->GetGenebank().GetBestGenotype();
-      cString filename(in_filename);
-      if (filename == "") filename.Set("genebank/%s", dom->GetName()());
-      cTestUtil::PrintGenome(dom->GetGenome(), filename, dom, population->GetUpdate());
-    }
-  };
-  
-  ///// parasite_debug /////
-  
-  //midget
-  
-  
-  class cEvent_parasite_debug : public cPopulationEvent {
-  private:
-    cString in_filename;
-  public:
-    const cString GetName() const { return "parasite_debug"; }
-    const cString GetDescription() const { return "parasite_debug  [cString in_filename=\"\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") in_filename=""; else in_filename=args.PopWord();
-  }
-    ///// parasite_debug /////
-    void Process(){
-      population->ParasiteDebug();
-    }
-  };
-  
-  ///// print_dom_parasite /////
-  
-  /**
-    * Write the currently dominant injected genotype to disk.
-   *
-   * Parameters:
-   * filename (string)
-   *   The name under which the genotype should be saved. If no
-   *   filename is given, the genotype is saved into the directory
-   *   genebank, under the name that the genebank has associated with
-   *   this genotype.
-   **/
-  
-  
-  class cEvent_print_dom_parasite : public cPopulationEvent {
-  private:
-    cString in_filename;
-  public:
-    const cString GetName() const { return "print_dom_parasite"; }
-    const cString GetDescription() const { return "print_dom_parasite  [cString in_filename=\"\"]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") in_filename=""; else in_filename=args.PopWord();
-    }
-    ///// print_dom_parasite /////
-    void Process(){
-      cInjectGenotype * dom = population->GetInjectGenebank().GetBestInjectGenotype();
-      if (dom!=NULL) {
-        cString filename(in_filename);
-        if (filename == "") filename.Set("genebank/%s", dom->GetName()());
-        cTestUtil::PrintGenome(dom, dom->GetGenome(), filename, population->GetUpdate()); }
-    }
-  };
-  
-  ///// print_genotype_map /////
-  
-  /**
-    * write a matrix of genotype ID's to a file (matlab format)
-   **/
-  
-  
-  class cEvent_print_genotype_map : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "print_genotype_map"; }
-    const cString GetDescription() const { return "print_genotype_map  [cString fname=\"genotype_map.m\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname="genotype_map.m"; else fname=args.PopWord();
-  }
-    ///// print_genotype_map /////
-    void Process(){
-      population->GetStats().PrintGenotypeMap(fname);
-    }
-  };
-  
-  ///// print_number_phenotypes /////
-  
-  /**
-    Output file with number of phenotypes based on tasks executed
-   for this update.  Executing a task any numbers of times is considered
-   the same as executing it once.
-   **/
-  
-  
-  class cEvent_print_number_phenotypes : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "print_number_phenotypes"; }
-    const cString GetDescription() const { return "print_number_phenotypes  [cString fname=\"phenotype_count.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname="phenotype_count.dat"; else fname=args.PopWord();
-  }
-    ///// print_number_phenotypes /////
-    void Process(){
-      population->PrintPhenotypeData(fname);
-    }
-  };
-  
-  ///// print_phenotype_status /////
-  
-  /**
-    Prints merit status for all the organisms in the population.
-   Used for testing/debuging. 
-   **/
-  
-  
-  class cEvent_print_phenotype_status : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "print_phenotype_status"; }
-    const cString GetDescription() const { return "print_phenotype_status  [cString fname=\"phenotype_status.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname="phenotype_status.dat"; else fname=args.PopWord();
-  }
-    ///// print_phenotype_status /////
-    void Process(){
-      population->PrintPhenotypeStatus(fname);
-    }
-  };
-  
-  ///// save_population /////
-  
-  /**
-    * Saves the full state of the population.
-   *
-   * Parameters:
-   * filename (string) default: save_pop.*
-     *   The name of the file into which the population should
-     *   be saved. If it is not given, then the name 'save_pop.*'
-     *   is used, with '*' replaced by the current update.
-     **/
-  
-  
-  class cEvent_save_population : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "save_population"; }
-    const cString GetDescription() const { return "save_population  [cString fname=\"\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname=""; else fname=args.PopWord();
-  }
-    ///// save_population /////
-    void Process(){
-      cString filename;
-      if( fname == "" ){
-        filename.Set("save_pop.%d", population->GetUpdate());
-      }
-      ofstream fp(filename());
-      population->SavePopulation(fp);
-    }
-  };
-  
-  ///// load_population /////
-  
-  /**
-    * Loads the full state of the population.
-   *
-   * Parameters:
-   * filename (string)
-   *   The name of the file to open.
-   **/
-  
-  
-  class cEvent_load_population : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "load_population"; }
-    const cString GetDescription() const { return "load_population  <cString fname>"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      fname = args.PopWord();
-  }
-    ///// load_population /////
-    void Process(){
-      ifstream fp(fname());
-      population->LoadPopulation(fp);
-    }
-  };
-  
-  ///// save_clone /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_save_clone : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "save_clone"; }
-    const cString GetDescription() const { return "save_clone  [cString fname=\"\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname=""; else fname=args.PopWord();
-  }
-    ///// save_clone /////
-    void Process(){
-      cString filename;
-      if( fname == "" ){
-        filename.Set("clone.%d", population->GetUpdate());
-      }
-      ofstream fp(filename());
-      population->SaveClone(fp);
-    }
-  };
-  
-  ///// load_clone /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_load_clone : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "load_clone"; }
-    const cString GetDescription() const { return "load_clone  <cString fname>"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      fname = args.PopWord();
-  }
-    ///// load_clone /////
-    void Process(){
-      ifstream fp(fname());
-      population->LoadClone(fp);
-    }
-  };
-  
-  ///// load_dump_file /////
-  
-  /**
-    * Sets up a population based on a dump file such as written out by
-   * detail_pop. It is also possible to append a history file to the dump
-   * file, in order to preserve the history of a previous run.
-   **/
-  
-  
-  class cEvent_load_dump_file : public cPopulationEvent {
-  private:
-    cString fname;
-    int update;
-  public:
-      const cString GetName() const { return "load_dump_file"; }
-    const cString GetDescription() const { return "load_dump_file  <cString fname> [int update=-1]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      fname = args.PopWord();
-      if (args == "") update=-1; else update=args.PopWord().AsInt();
-    }
-    ///// load_dump_file /////
-    void Process(){
-      population->LoadDumpFile(fname, update);
-    }
-  };
-  
-  ///// dump_pop /////
-  
-  /**
-    * Writes out a line of data for each genotype in the current population. The
-   * line contains the genome as string, the number of organisms of that genotype,
-   * and the genotype ID.
-   *
-   * Parameters:
-   * filename (string) default: "dump.<update>"
-     *   The name of the file into which the population dump should be written.
-     **/
-  
-  
-  class cEvent_dump_pop : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "dump_pop"; }
-    const cString GetDescription() const { return "dump_pop  [cString fname=\"\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname=""; else fname=args.PopWord();
-  }
-    ///// dump_pop /////
-    void Process(){
-      cString filename;
-      if( fname == "" ){
-        filename.Set("dump.%d", population->GetUpdate());
-      }
-      ofstream fp(filename());
-      population->GetGenebank().DumpTextSummary(fp);
-    }
-  };
-  
-  ///// print_genotypes /////
-  
-  /**
-    * This is a new version of "detail_pop" or "historic_dump".  It allows you to
-   * output one line per genotype in memory where you get to choose what data
-   * should be included.
-   *
-   * Parameters
-   * data_fields (string)
-   *   This must be a comma separated string of all data you wish to output.
-   *   Options include: id, parent_id, parent2_id (for sex), parent_dist,
-   *       num_cpus, total_cpus, length, merit, gest_time, fitness, update_born,
-   *       update_dead, depth, lineage, sequence
-   * historic (int) default: 0
-     *   How many updates back of history should we include (-1 = all)
-     * filename (string) default: "genotypes-<update>.dat"
-       *   The name of the file into which the population dump should be written.
-       **/
-  
-  
-  class cEvent_print_genotypes : public cPopulationEvent {
-  private:
-    cString data_fields;
-    int historic;
-    cString fname;
-  public:
-      const cString GetName() const { return "print_genotypes"; }
-    const cString GetDescription() const { return "print_genotypes  [cString data_fields=\"all\"] [int historic=0] [cString fname=\"\"]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") data_fields="all"; else data_fields=args.PopWord();
-      if (args == "") historic=0; else historic=args.PopWord().AsInt();
-      if (args == "") fname=""; else fname=args.PopWord();
-    }
-    ///// print_genotypes /////
-    void Process(){
-      cString filename = fname;
-      if (filename == "") {
-        filename.Set("genotypes-%d.dat", population->GetUpdate());
-      }
-      ofstream fp(filename());
-      population->GetGenebank().PrintGenotypes(fp, data_fields, historic);
-    }
-  };
-  
-  ///// detail_pop /////
-  
-  /**
-    * Like dump_pop, but more detailed data is written out.
-   *
-   * Parameters:
-   * filename (string) default: "detail_pop.<update>"
-     *   The name of the file into which the population dump should be written.
-     **/
-  
-  
-  class cEvent_detail_pop : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "detail_pop"; }
-    const cString GetDescription() const { return "detail_pop  [cString fname=\"\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname=""; else fname=args.PopWord();
-  }
-    ///// detail_pop /////
-    void Process(){
-      cString filename;
-      if( fname == "" ){
-        filename.Set("detail_pop.%d", population->GetUpdate());
-      }
-      ofstream fp(filename());
-      population->GetGenebank().DumpDetailedSummary(fp);
-    }
-  };
-  
-  ///// detail_sex_pop /////
-  
-  /**
-    * Like detail_pop, but for sexual populations. 
-   * Info for both parents is writen out.
-   *
-   * Parameters:
-   * filename (string) default: "detail_pop.<update>"
-     *   The name of the file into which the population dump should be written.
-     **/
-  
-  
-  class cEvent_detail_sex_pop : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "detail_sex_pop"; }
-    const cString GetDescription() const { return "detail_sex_pop  [cString fname=\"\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname=""; else fname=args.PopWord();
-  }
-    ///// detail_sex_pop /////
-    void Process(){
-      cString filename;
-      if( fname == "" ){
-        filename.Set("detail_pop.%d", population->GetUpdate());
-      }
-      ofstream fp(filename());
-      population->GetGenebank().DumpDetailedSexSummary(fp);
-    }
-  };
-  
-  ///// detail_parasite_pop /////
-  
-  /**
-    * Like dump_pop, but more detailed data is written out.
-   *
-   * Parameters:
-   * filename (string) default: "detail_pop.<update>"
-     *   The name of the file into which the population dump should be written.
-     **/
-  
-  
-  class cEvent_detail_parasite_pop : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "detail_parasite_pop"; }
-    const cString GetDescription() const { return "detail_parasite_pop  [cString fname=\"\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname=""; else fname=args.PopWord();
-  }
-    ///// detail_parasite_pop /////
-    void Process(){
-      cString filename;
-      if( fname == "" ){
-        filename.Set("detail_parasite_pop.%d", population->GetUpdate());
-      }
-      //ofstream fp(filename());
-      population->GetInjectGenebank().DumpDetailedSummary(filename, population->GetUpdate());
-    }
-  };
-  
-  ///// dump_historic_pop /////
-  
-  /**
-    * Similar to detail_pop. However, only genotypes that are not in the
-   * current population anymore are included. Genotypes that are not in
-   * the line of descent of any of the current genotypes to the ultimate
-   * ancestor are excluded.
-   *
-   * Parameters:
-   * back_dist (int) default: -1
-     *   How many updates back should we print?  -1 goes forever.  Use the
-     *   distance to the last dump historic if you only want a "diff".
-       * filename (string) default: "historic_dump.<update>"
-         *   The name of the file into which the historic dump should be written.
-         **/
-  
-  
-  class cEvent_dump_historic_pop : public cPopulationEvent {
-  private:
-    int back_dist;
-    cString fname;
-  public:
-      const cString GetName() const { return "dump_historic_pop"; }
-    const cString GetDescription() const { return "dump_historic_pop  [int back_dist=-1] [cString fname=\"\"]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") back_dist=-1; else back_dist=args.PopWord().AsInt();
-      if (args == "") fname=""; else fname=args.PopWord();
-    }
-    ///// dump_historic_pop /////
-    void Process(){
-      cString filename;
-      if( fname == "" ){
-        filename.Set("historic_dump.%d", population->GetUpdate());
-      }
-      ofstream fp(filename());
-      population->GetGenebank().DumpHistoricSummary(fp, back_dist);
-    }
-  };
-  
-  ///// dump_historic_sex_pop /////
-  
-  /**
-    * Similar to dump_historic_pop, but for sexual populations. 
-   * ID of both parents is writen out. 
-   *
-   * Parameters:
-   * filename (string) default: "historic_dump.<update>"
-     *   The name of the file into which the historic dump should be written.
-     **/
-  
-  
-  class cEvent_dump_historic_sex_pop : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "dump_historic_sex_pop"; }
-    const cString GetDescription() const { return "dump_historic_sex_pop  [cString fname=\"\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname=""; else fname=args.PopWord();
-  }
-    ///// dump_historic_sex_pop /////
-    void Process(){
-      cString filename;
-      if( fname == "" ){
-        filename.Set("historic_dump.%d", population->GetUpdate());
-      }
-      ofstream fp(filename());
-      population->GetGenebank().DumpHistoricSexSummary(fp);
-    }
-  };
-  
-  ///// dump_memory /////
-  
-  /**
-    * Dump the current memory state of all CPUs to a file.
-   **/
-  
-  
-  class cEvent_dump_memory : public cPopulationEvent {
-  private:
-    cString fname;
-  public:
-    const cString GetName() const { return "dump_memory"; }
-    const cString GetDescription() const { return "dump_memory  [cString fname=\"\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname=""; else fname=args.PopWord();
-  }
-    ///// dump_memory /////
-    void Process(){
-      cString filename;
-      if (fname == "") {
-        filename.Set("memory_dump.%d", population->GetUpdate());
-      }
-      ofstream fp(filename());
-      population->DumpMemorySummary(fp);
-    }
-  };
-  
-  ///// inject /////
-  
-  /**
-    * Injects a single organism into the population.
-   *
-   * Parameters:
-   * filename (string)
-   *   The filename of the genotype to load. If this is left empty, or the keyword
-   *   "START_CREATURE" is given, than the genotype specified in the genesis
-   *   file under "START_CREATURE" is used.
-   * cell ID (integer) default: 0
-     *   The grid-point into which the organism should be placed.
-     * merit (double) default: -1
-       *   The initial merit of the organism. If set to -1, this is ignored.
-       * lineage label (integer) default: 0
-         *   An integer that marks all descendants of this organism.
-         * neutral metric (double) default: 0
-           *   A double value that randomly drifts over time.
-           **/
-  
-  
-  class cEvent_inject : public cPopulationEvent {
-  private:
-    cString fname;
-    int cell_id;
-    double merit;
-    int lineage_label;
-    double neutral_metric;
-  public:
-      const cString GetName() const { return "inject"; }
-    const cString GetDescription() const { return "inject  [cString fname=\"START_CREATURE\"] [int cell_id=0] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname="START_CREATURE"; else fname=args.PopWord();
-      if (args == "") cell_id=0; else cell_id=args.PopWord().AsInt();
-      if (args == "") merit=-1; else merit=args.PopWord().AsDouble();
-      if (args == "") lineage_label=0; else lineage_label=args.PopWord().AsInt();
-      if (args == "") neutral_metric=0; else neutral_metric=args.PopWord().AsDouble();
-    }
-    ///// inject /////
-    void Process(){
-      if (fname == "START_CREATURE") fname=cConfig::GetStartCreature();
-      cGenome genome =
-        cInstUtil::LoadGenome(fname, population->GetEnvironment().GetInstSet());
-      population->Inject(genome, cell_id, merit, lineage_label, neutral_metric);
-    }
-  };
-  
-  ///// inject_all /////
-  
-  /**
-    * Injects identical organisms into all cells of the population.
-   *
-   * Parameters:
-   * filename (string)
-   *   The filename of the genotype to load. If this is left empty, or the keyword
-   *   "START_CREATURE" is given, than the genotype specified in the genesis
-   *   file under "START_CREATURE" is used.
-   * merit (double) default: -1
-     *   The initial merit of the organism. If set to -1, this is ignored.
-     * lineage label (integer) default: 0
-       *   An integer that marks all descendants of this organism.
-       * neutral metric (double) default: 0
-         *   A double value that randomly drifts over time.
-         **/
-  
-  
-  class cEvent_inject_all : public cPopulationEvent {
-  private:
-    cString fname;
-    double merit;
-    int lineage_label;
-    double neutral_metric;
-  public:
-      const cString GetName() const { return "inject_all"; }
-    const cString GetDescription() const { return "inject_all  [cString fname=\"START_CREATURE\"] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname="START_CREATURE"; else fname=args.PopWord();
-      if (args == "") merit=-1; else merit=args.PopWord().AsDouble();
-      if (args == "") lineage_label=0; else lineage_label=args.PopWord().AsInt();
-      if (args == "") neutral_metric=0; else neutral_metric=args.PopWord().AsDouble();
-    }
-    ///// inject_all /////
-    void Process(){
-      if (fname == "START_CREATURE") fname=cConfig::GetStartCreature();
-      cGenome genome =
-        cInstUtil::LoadGenome(fname, population->GetEnvironment().GetInstSet());
-      for (int i = 0; i < population->GetSize(); i++) {
-        population->Inject(genome, i, merit, lineage_label, neutral_metric);
-      }
-      population->SetSyncEvents(true);
-    }
-  };
-  
-  ///// inject_range /////
-  
-  /**
-    * Injects identical organisms into a range of cells of the population.
-   *
-   * Parameters:
-   * filename (string)
-   *   The filename of the genotype to load. If this is left empty, or the keyword
-   *   "START_CREATURE" is given, than the genotype specified in the genesis
-   *   file under "START_CREATURE" is used.
-   * start_cell (int)
-   *   First cell to inject into.
-   * stop_cell (int)
-   *   First cell *not* to inject into.
-   * merit (double) default: -1
-     *   The initial merit of the organism. If set to -1, this is ignored.
-     * lineage label (integer) default: 0
-       *   An integer that marks all descendants of this organism.
-       * neutral metric (double) default: 0
-         *   A double value that randomly drifts over time.
-         *
-         * Example:
-         *   inject_range creature.gen 0 10
-         *
-         * Will inject 10 organisms into cells 0 through 9.
-         **/
-  
-  
-  class cEvent_inject_range : public cPopulationEvent {
-  private:
-    cString fname;
-    int start_cell;
-    int end_cell;
-    double merit;
-    int lineage_label;
-    double neutral_metric;
-  public:
-      const cString GetName() const { return "inject_range"; }
-    const cString GetDescription() const { return "inject_range  [cString fname=\"START_CREATURE\"] [int start_cell=0] [int end_cell=-1] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname="START_CREATURE"; else fname=args.PopWord();
-      if (args == "") start_cell=0; else start_cell=args.PopWord().AsInt();
-      if (args == "") end_cell=-1; else end_cell=args.PopWord().AsInt();
-      if (args == "") merit=-1; else merit=args.PopWord().AsDouble();
-      if (args == "") lineage_label=0; else lineage_label=args.PopWord().AsInt();
-      if (args == "") neutral_metric=0; else neutral_metric=args.PopWord().AsDouble();
-    }
-    ///// inject_range /////
-    void Process(){
-      if (fname == "START_CREATURE") fname=cConfig::GetStartCreature();
-      if (end_cell == -1) end_cell = start_cell + 1;
-      if (start_cell < 0 ||
-          end_cell > population->GetSize() ||
-          start_cell >= end_cell) {
-        cout << "Warning: inject_range has invalid range!";
-      }
-      else {
-        cGenome genome =
-        cInstUtil::LoadGenome(fname, population->GetEnvironment().GetInstSet());
-        for (int i = start_cell; i < end_cell; i++) {
-          population->Inject(genome, i, merit, lineage_label, neutral_metric);
-        }
-        population->SetSyncEvents(true);
-      }
-    }
-  };
-  
-  ///// inject_sequence /////
-  
-  /**
-    * Injects identical organisms into a range of cells of the population.
-   *
-   * Parameters:
-   * sequence (string)
-   *   The genome sequence for this organism.  This is a mandatory argument.
-   * start_cell (int)
-   *   First cell to inject into.
-   * stop_cell (int)
-   *   First cell *not* to inject into.
-   * merit (double) default: -1
-     *   The initial merit of the organism. If set to -1, this is ignored.
-     * lineage label (integer) default: 0
-       *   An integer that marks all descendants of this organism.
-       * neutral metric (double) default: 0
-         *   A double value that randomly drifts over time.
-         *
-         * Example:
-         *   inject_range ckdfhgklsahnfsaggdsgajfg 0 10 100
-         *
-         * Will inject 10 organisms into cells 0 through 9 with a merit of 100.
-         **/
-  
-  
-  class cEvent_inject_sequence : public cPopulationEvent {
-  private:
-    cString seq;
-    int start_cell;
-    int end_cell;
-    double merit;
-    int lineage_label;
-    double neutral_metric;
-  public:
-      const cString GetName() const { return "inject_sequence"; }
-    const cString GetDescription() const { return "inject_sequence  <cString seq> [int start_cell=0] [int end_cell=-1] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      seq = args.PopWord();
-      if (args == "") start_cell=0; else start_cell=args.PopWord().AsInt();
-      if (args == "") end_cell=-1; else end_cell=args.PopWord().AsInt();
-      if (args == "") merit=-1; else merit=args.PopWord().AsDouble();
-      if (args == "") lineage_label=0; else lineage_label=args.PopWord().AsInt();
-      if (args == "") neutral_metric=0; else neutral_metric=args.PopWord().AsDouble();
-    }
-    ///// inject_sequence /////
-    void Process(){
-      if (end_cell == -1) end_cell = start_cell + 1;
-      if (start_cell < 0 ||
-          end_cell > population->GetSize() ||
-          start_cell >= end_cell) {
-        cout << "Warning: inject_sequence has invalid range!" << endl;
-        cout << "start=" << start_cell << "  end=" << end_cell
-          << "genome length=" << seq.GetSize() << endl;
-      }
-      else {
-        cGenome genome(seq);
-        for (int i = start_cell; i < end_cell; i++) {
-          population->Inject(genome, i, merit, lineage_label, neutral_metric);
-        }
-        population->SetSyncEvents(true);
-      }
-    }
-  };
-  
-  ///// inject_random /////
-  
-  /**
-    * Injects a randomly generated genome into the population.
-   *
-   * Parameters:
-   * length (integer) [required]
-   *   Number of instructions in the randomly generated genome.
-   * cell ID (integer) default: -1
-     *   The grid-point into which the genome should be placed.  Default is random.
-     * merit (double) default: -1
-       *   The initial merit of the organism. If set to -1, this is ignored.
-       * lineage label (integer) default: 0
-         *   An integer that marks all descendants of this organism.
-         * neutral metric (double) default: 0
-           *   A double value that randomly drifts over time.
-           **/
-  
-  
-  class cEvent_inject_random : public cPopulationEvent {
-  private:
-    int length;
-    int cell_id;
-    double merit;
-    int lineage_label;
-    double neutral_metric;
-  public:
-      const cString GetName() const { return "inject_random"; }
-    const cString GetDescription() const { return "inject_random  <int length> [int cell_id=-1] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      length = args.PopWord().AsInt();
-      if (args == "") cell_id=-1; else cell_id=args.PopWord().AsInt();
-      if (args == "") merit=-1; else merit=args.PopWord().AsDouble();
-      if (args == "") lineage_label=0; else lineage_label=args.PopWord().AsInt();
-      if (args == "") neutral_metric=0; else neutral_metric=args.PopWord().AsDouble();
-    }
-    ///// inject_random /////
-    void Process(){
-      if (cell_id == -1) cell_id = g_random.GetUInt(population->GetSize());
-      cGenome genome =
-        cInstUtil::RandomGenome(length, population->GetEnvironment().GetInstSet());
-      population->Inject(genome, cell_id, merit, lineage_label, neutral_metric);
-    }
-  };
-  
-  ///// inject_range_parasite /////
-  
-  /**
-    * Injects identical organisms into a range of cells of the population.
-   *
-   * Parameters:
-   * filename (string)
-   *   The filename of the genotype to load. If this is left empty, or the keyword
-   *   "START_CREATURE" is given, than the genotype specified in the genesis
-   *   file under "START_CREATURE" is used.
-   * start_cell (int)
-   *   First cell to inject into.
-   * stop_cell (int)
-   *   First cell *not* to inject into.
-   * merit (double) default: -1
-     *   The initial merit of the organism. If set to -1, this is ignored.
-     * lineage label (integer) default: 0
-       *   An integer that marks all descendants of this organism.
-       * neutral metric (double) default: 0
-         *   A double value that randomly drifts over time.
-         *
-         * Example:
-         *   inject_range creature.gen 0 10
-         *
-         * Will inject 10 organisms into cells 0 through 9.
-         **/
-  
-  
-  class cEvent_inject_range_parasite : public cPopulationEvent {
-  private:
-    cString fname_parasite;
-    int start_cell;
-    int end_cell;
-    double merit;
-    int lineage_label;
-    double neutral_metric;
-    int mem_space;
-  public:
-      const cString GetName() const { return "inject_range_parasite"; }
-    const cString GetDescription() const { return "inject_range_parasite  [cString fname_parasite=\"organism.parasite\"] [int start_cell=0] [int end_cell=-1] [double merit=-1] [int lineage_label=0] [double neutral_metric=0] [int mem_space=2]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname_parasite="organism.parasite"; else fname_parasite=args.PopWord();
-      if (args == "") start_cell=0; else start_cell=args.PopWord().AsInt();
-      if (args == "") end_cell=-1; else end_cell=args.PopWord().AsInt();
-      if (args == "") merit=-1; else merit=args.PopWord().AsDouble();
-      if (args == "") lineage_label=0; else lineage_label=args.PopWord().AsInt();
-      if (args == "") neutral_metric=0; else neutral_metric=args.PopWord().AsDouble();
-      if (args == "") mem_space=2; else mem_space=args.PopWord().AsInt();
-    }
-    ///// inject_range_parasite /////
-    void Process(){
-      if (fname_parasite == "START_CREATURE") fname_parasite=cConfig::GetStartCreature();
-      if (end_cell == -1) end_cell = start_cell + 1;
-      if (start_cell < 0 ||
-          end_cell > population->GetSize() ||
-          start_cell >= end_cell) {
-        cout << "Warning: inject_range has invalid range!";
-      }
-      else {
-        cGenome genome_parasite =
-        cInstUtil::LoadGenome(fname_parasite, population->GetEnvironment().GetInstSet());
-        for (int i = start_cell; i < end_cell; i++) {
-          population->Inject(genome_parasite, i, merit, lineage_label, neutral_metric, mem_space);
-        }
-        population->SetSyncEvents(true);
-      }
-    }
-  };
-  
-  ///// inject_range_pair /////
-  
-  /**
-    * Injects identical organisms into a range of cells of the population.
-   *
-   * Parameters:
-   * filename (string)
-   *   The filename of the genotype to load. If this is left empty, or the keyword
-   *   "START_CREATURE" is given, than the genotype specified in the genesis
-   *   file under "START_CREATURE" is used.
-   * start_cell (int)
-   *   First cell to inject into.
-   * stop_cell (int)
-   *   First cell *not* to inject into.
-   * merit (double) default: -1
-     *   The initial merit of the organism. If set to -1, this is ignored.
-     * lineage label (integer) default: 0
-       *   An integer that marks all descendants of this organism.
-       * neutral metric (double) default: 0
-         *   A double value that randomly drifts over time.
-         *
-         * Example:
-         *   inject_range creature.gen 0 10
-         *
-         * Will inject 10 organisms into cells 0 through 9.
-         **/
-  
-  
-  class cEvent_inject_range_pair : public cPopulationEvent {
-  private:
-    cString fname;
-    cString fname_parasite;
-    int start_cell;
-    int end_cell;
-    double merit;
-    int lineage_label;
-    double neutral_metric;
-    int mem_space;
-  public:
-      const cString GetName() const { return "inject_range_pair"; }
-    const cString GetDescription() const { return "inject_range_pair  [cString fname=\"START_CREATURE\"] [cString fname_parasite=\"organism.parasite\"] [int start_cell=0] [int end_cell=-1] [double merit=-1] [int lineage_label=0] [double neutral_metric=0] [int mem_space=2]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") fname="START_CREATURE"; else fname=args.PopWord();
-      if (args == "") fname_parasite="organism.parasite"; else fname_parasite=args.PopWord();
-      if (args == "") start_cell=0; else start_cell=args.PopWord().AsInt();
-      if (args == "") end_cell=-1; else end_cell=args.PopWord().AsInt();
-      if (args == "") merit=-1; else merit=args.PopWord().AsDouble();
-      if (args == "") lineage_label=0; else lineage_label=args.PopWord().AsInt();
-      if (args == "") neutral_metric=0; else neutral_metric=args.PopWord().AsDouble();
-      if (args == "") mem_space=2; else mem_space=args.PopWord().AsInt();
-    }
-    ///// inject_range_pair /////
-    void Process(){
-      if (fname == "START_CREATURE") fname=cConfig::GetStartCreature();
-      if (end_cell == -1) end_cell = start_cell + 1;
-      if (start_cell < 0 ||
-          end_cell > population->GetSize() ||
-          start_cell >= end_cell) {
-        cout << "Warning: inject_range has invalid range!";
-      }
-      else {
-        cGenome genome =
-        cInstUtil::LoadGenome(fname, population->GetEnvironment().GetInstSet());
-        cGenome genome_parasite =
-          cInstUtil::LoadGenome(fname_parasite, population->GetEnvironment().GetInstSet());
-        for (int i = start_cell; i < end_cell; i++) {
-          population->Inject(genome, i, merit, lineage_label, neutral_metric);
-          population->Inject(genome_parasite, i, merit, lineage_label, neutral_metric, mem_space);
-        }
-        population->SetSyncEvents(true);
-      }
-    }
-  };
-  
-  ///// zero_muts /////
-  
-  /**
-    * This event will set all mutation rates to zero...
-   **/
-  
-  
-  class cEvent_zero_muts : public cPopulationEvent {
-  private:
-  public:
-    const cString GetName() const { return "zero_muts"; }
-    const cString GetDescription() const { return "zero_muts"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-  }
-    ///// zero_muts /////
-    void Process(){
-      for (int i = 0; i < population->GetSize(); i++) {
-        population->GetCell(i).MutationRates().Clear();
-      }
-    }
-  };
-  
-  ///// mod_copy_mut /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_mod_copy_mut : public cPopulationEvent {
-  private:
-    double cmut_inc;
-    int cell;
-  public:
-      const cString GetName() const { return "mod_copy_mut"; }
-    const cString GetDescription() const { return "mod_copy_mut  <double cmut_inc> [int cell=-1]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      cmut_inc = args.PopWord().AsDouble();
-      if (args == "") cell=-1; else cell=args.PopWord().AsInt();
-    }
-    ///// mod_copy_mut /////
-    void Process(){
-      const double new_cmut = cConfig::GetCopyMutProb() + cmut_inc;
-      if (cell < 0) {   // cell == -1  -->  all
-        for (int i = 0; i < population->GetSize(); i++) {
-          population->GetCell(i).MutationRates().SetCopyMutProb(new_cmut);
-        }
-        cConfig::SetCopyMutProb(new_cmut);
-      } else {
-        population->GetCell(cell).MutationRates().SetCopyMutProb(new_cmut);
-      }
-    }
-  };
-  
-  ///// mod_div_mut /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_mod_div_mut : public cPopulationEvent {
-  private:
-    double dmut_inc;
-    int cell;
-  public:
-      const cString GetName() const { return "mod_div_mut"; }
-    const cString GetDescription() const { return "mod_div_mut  <double dmut_inc> [int cell=-1]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      dmut_inc = args.PopWord().AsDouble();
-      if (args == "") cell=-1; else cell=args.PopWord().AsInt();
-    }
-    ///// mod_div_mut /////
-    void Process(){
-      const double new_div_mut = cConfig::GetDivMutProb() + dmut_inc;
-      if (cell < 0) {   // cell == -1  -->  all
-        for (int i = 0; i < population->GetSize(); i++) {
-          population->GetCell(i).MutationRates().SetDivMutProb(new_div_mut);
-        }
-        cConfig::SetDivMutProb(new_div_mut);
-      } else {
-        population->GetCell(cell).MutationRates().SetDivMutProb(new_div_mut);
-      }
-    }
-  };
-  
-  ///// set_copy_mut /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_set_copy_mut : public cPopulationEvent {
-  private:
-    double cmut;
-    int start_cell;
-    int end_cell;
-  public:
-      const cString GetName() const { return "set_copy_mut"; }
-    const cString GetDescription() const { return "set_copy_mut  <double cmut> [int start_cell=-1] [int end_cell=-1]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      cmut = args.PopWord().AsDouble();
-      if (args == "") start_cell=-1; else start_cell=args.PopWord().AsInt();
-      if (args == "") end_cell=-1; else end_cell=args.PopWord().AsInt();
-    }
-    ///// set_copy_mut /////
-    void Process(){
-      if (start_cell < 0) {   // start_cell == -1  -->  all
-        cConfig::SetCopyMutProb(cmut);
-        start_cell = 0;
-        end_cell = population->GetSize();
-      }
-      else if (end_cell < -1)  { // end_cell == -1 --> Only one cell!
-        end_cell = start_cell + 1;
-      }
-      assert(start_cell >= 0 && start_cell < population->GetSize());
-      assert(end_cell > 0 && end_cell <= population->GetSize());
-      for (int i = start_cell; i < end_cell; i++) {
-        population->GetCell(i).MutationRates().SetCopyMutProb(cmut);
-      }
-    }
-  };
-  
-  ///// mod_point_mut /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_mod_point_mut : public cPopulationEvent {
-  private:
-    double pmut_inc;
-    int cell;
-  public:
-      const cString GetName() const { return "mod_point_mut"; }
-    const cString GetDescription() const { return "mod_point_mut  <double pmut_inc> [int cell=-1]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      pmut_inc = args.PopWord().AsDouble();
-      if (args == "") cell=-1; else cell=args.PopWord().AsInt();
-    }
-    ///// mod_point_mut /////
-    void Process(){
-      const double new_pmut = cConfig::GetPointMutProb() + pmut_inc;
-      if (cell < 0) {   // cell == -1   -->  all
-        for (int i = 0; i < population->GetSize(); i++) {
-          population->GetCell(i).MutationRates().SetPointMutProb(new_pmut);
-        }
-        cConfig::SetPointMutProb(new_pmut);
-      } else {
-        population->GetCell(cell).MutationRates().SetPointMutProb(new_pmut);
-      }
-    }
-  };
-  
-  ///// set_point_mut /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_set_point_mut : public cPopulationEvent {
-  private:
-    double pmut;
-    int cell;
-  public:
-      const cString GetName() const { return "set_point_mut"; }
-    const cString GetDescription() const { return "set_point_mut  <double pmut> [int cell=-1]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      pmut = args.PopWord().AsDouble();
-      if (args == "") cell=-1; else cell=args.PopWord().AsInt();
-    }
-    ///// set_point_mut /////
-    void Process(){
-      if (cell < 0) {   // cell == -1   -->  all
-        for (int i = 0; i < population->GetSize(); i++) {
-          population->GetCell(i).MutationRates().SetPointMutProb(pmut);
-        }
-        cConfig::SetPointMutProb(pmut);
-      } else {
-        population->GetCell(cell).MutationRates().SetPointMutProb(pmut);
-      }
-    }
-  };
-  
-  ///// calc_landscape /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_calc_landscape : public cPopulationEvent {
-  private:
-    int landscape_dist;
-  public:
-    const cString GetName() const { return "calc_landscape"; }
-    const cString GetDescription() const { return "calc_landscape  [int landscape_dist=1]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") landscape_dist=1; else landscape_dist=args.PopWord().AsInt();
-  }
-    ///// calc_landscape /////
-    void Process(){
-      cGenome & genome = population->GetGenebank().GetBestGenotype()->GetGenome();
-      cAnalyzeUtil::CalcLandscape(landscape_dist, genome,
-                                  population->GetEnvironment().GetInstSet());
-    }
-  };
-  
-  ///// predict_w_landscape /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_predict_w_landscape : public cPopulationEvent {
-  private:
-    cString datafile;
-  public:
-    const cString GetName() const { return "predict_w_landscape"; }
-    const cString GetDescription() const { return "predict_w_landscape  [cString datafile=\"land-predict.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") datafile="land-predict.dat"; else datafile=args.PopWord();
-  }
-    ///// predict_w_landscape /////
-    void Process(){
-      cGenome & genome = population->GetGenebank().GetBestGenotype()->GetGenome();
-      cLandscape landscape(genome, population->GetEnvironment().GetInstSet());
-      static ofstream fp(datafile);
-      landscape.PredictWProcess(fp);
-    }
-  };
-  
-  ///// predict_nu_landscape /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_predict_nu_landscape : public cPopulationEvent {
-  private:
-    cString datafile;
-  public:
-    const cString GetName() const { return "predict_nu_landscape"; }
-    const cString GetDescription() const { return "predict_nu_landscape  [cString datafile=\"land-predict.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") datafile="land-predict.dat"; else datafile=args.PopWord();
-  }
-    ///// predict_nu_landscape /////
-    void Process(){
-      cGenome & genome = population->GetGenebank().GetBestGenotype()->GetGenome();
-      cLandscape landscape(genome, population->GetEnvironment().GetInstSet());
-      static ofstream fp(datafile);
-      landscape.PredictNuProcess(fp);
-    }
-  };
-  
-  ///// sample_landscape /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_sample_landscape : public cPopulationEvent {
-  private:
-    int sample_size;
-  public:
-    const cString GetName() const { return "sample_landscape"; }
-    const cString GetDescription() const { return "sample_landscape  [int sample_size=0]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") sample_size=0; else sample_size=args.PopWord().AsInt();
-  }
-    ///// sample_landscape /////
-    void Process(){
-      cGenome & genome = population->GetGenebank().GetBestGenotype()->GetGenome();
-      cLandscape landscape(genome, population->GetEnvironment().GetInstSet());
-      if (sample_size == 0) sample_size = population->GetEnvironment().GetInstSet().GetSize() - 1;
-      landscape.SampleProcess(sample_size);
-      static ofstream fp("land-sample.dat");
-      landscape.PrintStats(fp, population->GetUpdate());
-    }
-  };
-  
-  ///// random_landscape /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_random_landscape : public cPopulationEvent {
-  private:
-    int landscape_dist;
-    int sample_size;
-    int min_found;
-    int max_sample_size;
-    bool print_if_found;
-  public:
-      const cString GetName() const { return "random_landscape"; }
-    const cString GetDescription() const { return "random_landscape  [int landscape_dist=1] [int sample_size=0] [int min_found=0] [int max_sample_size=0] [bool print_if_found=false]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") landscape_dist=1; else landscape_dist=args.PopWord().AsInt();
-      if (args == "") sample_size=0; else sample_size=args.PopWord().AsInt();
-      if (args == "") min_found=0; else min_found=args.PopWord().AsInt();
-      if (args == "") max_sample_size=0; else max_sample_size=args.PopWord().AsInt();
-      if (args == "") print_if_found=false; else print_if_found=args.PopWord();
-    }
-    ///// random_landscape /////
-    void Process(){
-      cGenome & genome = population->GetGenebank().GetBestGenotype()->GetGenome();
-      cLandscape landscape(genome, population->GetEnvironment().GetInstSet());
-      landscape.RandomProcess(sample_size, landscape_dist, min_found,
-                              max_sample_size, print_if_found);
-      static ofstream fp("land-random.dat");
-      landscape.PrintStats(fp, population->GetUpdate());
-    }
-  };
-  
-  ///// analyze_landscape /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_analyze_landscape : public cPopulationEvent {
-  private:
-    int sample_size;
-    int min_found;
-    int max_sample_size;
-  public:
-      const cString GetName() const { return "analyze_landscape"; }
-    const cString GetDescription() const { return "analyze_landscape  [int sample_size=1000] [int min_found=0] [int max_sample_size=0]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") sample_size=1000; else sample_size=args.PopWord().AsInt();
-      if (args == "") min_found=0; else min_found=args.PopWord().AsInt();
-      if (args == "") max_sample_size=0; else max_sample_size=args.PopWord().AsInt();
-    }
-    ///// analyze_landscape /////
-    void Process(){
-      cGenome & genome = population->GetGenebank().GetBestGenotype()->GetGenome();
-      cAnalyzeUtil::
-      AnalyzeLandscape(genome, population->GetEnvironment().GetInstSet(),
-                       sample_size, min_found, max_sample_size,
-                       population->GetUpdate());
-    }
-  };
-  
-  ///// pairtest_landscape /////
-  
-  /**
-    * If sample_size = 0, pairtest the full landscape.
-   **/
-  
-  
-  class cEvent_pairtest_landscape : public cPopulationEvent {
-  private:
-    int sample_size;
-  public:
-    const cString GetName() const { return "pairtest_landscape"; }
-    const cString GetDescription() const { return "pairtest_landscape  [int sample_size=0]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") sample_size=0; else sample_size=args.PopWord().AsInt();
-  }
-    ///// pairtest_landscape /////
-    void Process(){
-      cGenome & genome = population->GetGenebank().GetBestGenotype()->GetGenome();
-      cAnalyzeUtil::PairTestLandscape(genome, population->GetEnvironment().GetInstSet(), sample_size, population->GetUpdate());
-    }
-  };
-  
-  ///// test_dom /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_test_dom : public cPopulationEvent {
-  private:
-  public:
-    const cString GetName() const { return "test_dom"; }
-    const cString GetDescription() const { return "test_dom"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args; }
-    ///// test_dom /////
-    void Process(){
-      cGenome & genome = population->GetGenebank().GetBestGenotype()->GetGenome();
-      static ofstream fp("dom-test.dat");
-      cAnalyzeUtil::TestGenome(genome, population->GetEnvironment().GetInstSet(), fp, population->GetUpdate());
-    }
-  };
-  
-  ///// analyze_population /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_analyze_population : public cPopulationEvent {
-  private:
-    double sample_prob;
-    int landscape;
-    int save_genotype;
-    cString filename;
-  public:
-      const cString GetName() const { return "analyze_population"; }
-    const cString GetDescription() const { return "analyze_population  [double sample_prob=1] [int landscape=0] [int save_genotype=0] [cString filename=\"\"]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") sample_prob=1; else sample_prob=args.PopWord().AsDouble();
-      if (args == "") landscape=0; else landscape=args.PopWord().AsInt();
-      if (args == "") save_genotype=0; else save_genotype=args.PopWord().AsInt();
-      if (args == "") filename=""; else filename=args.PopWord();
-    }
-    ///// analyze_population /////
-    void Process(){
-      static bool auto_filename = false;
-      if( filename == "" )
-        auto_filename = true;
-      if ( auto_filename )
-        filename.Set("population_info_%d.dat",population->GetUpdate());
-      ofstream population_info(filename());
-      cAnalyzeUtil::AnalyzePopulation(population, population_info, sample_prob,
-                                      landscape, save_genotype);
-    }
-  };
-  
-  ///// print_detailed_fitness_data /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_print_detailed_fitness_data : public cPopulationEvent {
-  private:
-    int save_max_f_genotype;
-    int print_fitness_histo;
-    double hist_fmax;
-    double hist_fstep;
-    cString filename;
-    cString filename2;
-    cString filename3;
-  public:
-      const cString GetName() const { return "print_detailed_fitness_data"; }
-    const cString GetDescription() const { return "print_detailed_fitness_data  [int save_max_f_genotype=0] [int print_fitness_histo=0] [double hist_fmax=1] [double hist_fstep=0.1] [cString filename=\"fitness.dat\"] [cString filename2=\"fitness_histos.dat\"] [cString filename3=\"fitness_histos_testCPU.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") save_max_f_genotype=0; else save_max_f_genotype=args.PopWord().AsInt();
-      if (args == "") print_fitness_histo=0; else print_fitness_histo=args.PopWord().AsInt();
-      if (args == "") hist_fmax=1; else hist_fmax=args.PopWord().AsDouble();
-      if (args == "") hist_fstep=0.1; else hist_fstep=args.PopWord().AsDouble();
-      if (args == "") filename="fitness.dat"; else filename=args.PopWord();
-      if (args == "") filename2="fitness_histos.dat"; else filename2=args.PopWord();
-      if (args == "") filename3="fitness_histos_testCPU.dat"; else filename3=args.PopWord();
-    }
-    ///// print_detailed_fitness_data /////
-    void Process(){
-      static ofstream datafile(filename());
-      static ofstream histofile;
-      static ofstream histofile_testCPU;
-      if (print_fitness_histo && !histofile.is_open()){
-        histofile.open(filename2());
-        histofile_testCPU.open(filename3());
-      }
-      cAnalyzeUtil::PrintDetailedFitnessData( population, datafile, histofile, histofile_testCPU, save_max_f_genotype, print_fitness_histo, hist_fmax, hist_fstep );
-    }
-  };
-  
-  ///// print_genetic_distance_data /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_print_genetic_distance_data : public cPopulationEvent {
-  private:
-    cString creature_name;
-    cString filename;
-  public:
-      const cString GetName() const { return "print_genetic_distance_data"; }
-    const cString GetDescription() const { return "print_genetic_distance_data  [cString creature_name=\"\"] [cString filename=\"genetic_distance.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") creature_name=""; else creature_name=args.PopWord();
-      if (args == "") filename="genetic_distance.dat"; else filename=args.PopWord();
-    }
-    ///// print_genetic_distance_data /////
-    void Process(){
-      static ofstream popdump(filename());
-      if( creature_name == "" || creature_name == "START_CREATURE" ){
-        creature_name = cConfig::GetStartCreature(); }
-      cAnalyzeUtil::PrintGeneticDistanceData( population, popdump, creature_name() );
-    }
-  };
-  
-  ///// genetic_distance_pop_dump /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_genetic_distance_pop_dump : public cPopulationEvent {
-  private:
-    cString creature_name;
-    cString filename;
-    int save_genotype;
-  public:
-      const cString GetName() const { return "genetic_distance_pop_dump"; }
-    const cString GetDescription() const { return "genetic_distance_pop_dump  [cString creature_name=\"\"] [cString filename=\"\"] [int save_genotype=0]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") creature_name=""; else creature_name=args.PopWord();
-      if (args == "") filename=""; else filename=args.PopWord();
-      if (args == "") save_genotype=0; else save_genotype=args.PopWord().AsInt();
-    }
-    ///// genetic_distance_pop_dump /////
-    void Process(){
-      static bool auto_filename = false;
-      if( creature_name == "" || creature_name == "START_CREATURE" ){
-        creature_name = cConfig::GetStartCreature(); }
-      if( filename == "" || filename == "AUTO" )
-        auto_filename = true;
-      if ( auto_filename )
-        filename.Set("pop_dump_%d.dat",population->GetUpdate());
-      ofstream popdump(filename());
-      cAnalyzeUtil::GeneticDistancePopDump( population, popdump, creature_name(), save_genotype );
-    }
-  };
-  
-  ///// task_snapshot /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_task_snapshot : public cPopulationEvent {
-  private:
-    cString filename;
-  public:
-    const cString GetName() const { return "task_snapshot"; }
-    const cString GetDescription() const { return "task_snapshot  [cString filename=\"\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") filename=""; else filename=args.PopWord();
-  }
-    ///// task_snapshot /////
-    void Process(){
-      static bool auto_filename = false;
-      if( filename == "" )
-        auto_filename = true;
-      if ( auto_filename )
-        filename.Set("tasks_%d.dat",population->GetUpdate());
-      ofstream snapshot_file(filename());
-      cAnalyzeUtil::TaskSnapshot( population, snapshot_file );
-    }
-  };
-  
-  ///// print_viable_tasks_data /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_print_viable_tasks_data : public cPopulationEvent {
-  private:
-    cString filename;
-  public:
-    const cString GetName() const { return "print_viable_tasks_data"; }
-    const cString GetDescription() const { return "print_viable_tasks_data  [cString filename=\"viable_tasks.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") filename="viable_tasks.dat"; else filename=args.PopWord();
-  }
-    ///// print_viable_tasks_data /////
-    void Process(){
-      static ofstream datafile(filename());
-      cAnalyzeUtil::PrintViableTasksData( population, datafile );
-    }
-  };
-  
-  ///// apocalypse /////
-  
-  /**
-    * Randomly removes a certain proportion of the population.
-   *
-   * Parameters:
-   * removal probability (double) default: 0.9
-     *   The probability with which a single organism is removed.
-     **/
-  
-  
-  class cEvent_apocalypse : public cPopulationEvent {
-  private:
-    double kill_prob;
-  public:
-    const cString GetName() const { return "apocalypse"; }
-    const cString GetDescription() const { return "apocalypse  [double kill_prob=.9]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") kill_prob=.9; else kill_prob=args.PopWord().AsDouble();
-  }
-    ///// apocalypse /////
-    void Process(){
-      for (int i = 0; i < population->GetSize(); i++) {
-        cPopulationCell & cell = population->GetCell(i);
-        if (cell.IsOccupied() == false) continue;
-        if (g_random.P(kill_prob))  population->KillOrganism(cell);
-      }
-    }
-  };
-  
-  ///// kill_rectangle /////
-  
-  /**
-    * Kills all cell in a rectangle.
-   *
-   * Parameters:
-   * cell [X1][Y1][x2][Y2] (integer) default: 0
-     *   The start and stoping grid-points into which the organism should
-     be killed.
-     **/
-  
-  
-  class cEvent_kill_rectangle : public cPopulationEvent {
-  private:
-    int cell_X1;
-    int cell_Y1;
-    int cell_X2;
-    int cell_Y2;
-  public:
-      const cString GetName() const { return "kill_rectangle"; }
-    const cString GetDescription() const { return "kill_rectangle  [int cell_X1=0] [int cell_Y1=0] [int cell_X2=0] [int cell_Y2=0]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") cell_X1=0; else cell_X1=args.PopWord().AsInt();
-      if (args == "") cell_Y1=0; else cell_Y1=args.PopWord().AsInt();
-      if (args == "") cell_X2=0; else cell_X2=args.PopWord().AsInt();
-      if (args == "") cell_Y2=0; else cell_Y2=args.PopWord().AsInt();
-    }
-    ///// kill_rectangle /////
-    void Process(){
-      int i, j, loc;
-      /* Be sure the user entered a valid range */
-      if (cell_X1 < 0) {
-        cell_X1 = 0;
-      } else if (cell_X1 > population->GetWorldX() - 1) {
-        cell_X1 = population->GetWorldX() - 1;
-      }
-      if (cell_X2 < 0) {
-        cell_X2 = 0;
-      } else if (cell_X2 > population->GetWorldX() - 1) {
-        cell_X2 = population->GetWorldX() - 1;
-      }
-      if (cell_Y1 < 0) {
-        cell_Y1 = 0;
-      } else if (cell_Y1 > population->GetWorldY() - 1) {
-        cell_Y1 = population->GetWorldY() - 1;
-      }
-      if (cell_Y2 < 0) {
-        cell_Y2 = 0;
-      } else if (cell_Y2 > population->GetWorldY() - 1) {
-        cell_Y2 = population->GetWorldY() - 1;
-      }
-      /* Account for a rectangle that crosses over the Zero X or Y cell */
-      if (cell_X2 < cell_X1) {
-        cell_X2 = cell_X2 + population->GetWorldX();
-      }
-      if (cell_Y2 < cell_Y1) {
-        cell_Y2 = cell_Y2 + population->GetWorldY();
-      }
-      for (i = cell_Y1; i <= cell_Y2; i++) {
-        for (j = cell_X1; j <= cell_X2; j++) {
-          loc = (i % population->GetWorldY()) * population->GetWorldX() +
-          (j % population->GetWorldX());
-          cPopulationCell & cell = population->GetCell(loc);
-          if (cell.IsOccupied() == true) {
-            population->KillOrganism(cell);
-          }
-        }
-      }
-      population->SetSyncEvents(true);
-    }
-  };
-  
-  ///// rate_kill /////
-  
-  /**
-    * Randomly removes a certain proportion of the population.
-   * In principle, this event does the same thing as the apocalypse event.
-   * However, instead of a probability, here one has to specify a rate. The
-   * rate has the same unit as fitness. So if the average fitness is 20000,
-   * then you remove 50% of the population on every update with a removal rate
-   * of 10000.
-   *
-   * Parameters:
-   * removal rate (double)
-   *   The rate at which organisms are removed.
-   **/
-  
-  
-  class cEvent_rate_kill : public cPopulationEvent {
-  private:
-    double kill_rate;
-  public:
-    const cString GetName() const { return "rate_kill"; }
-    const cString GetDescription() const { return "rate_kill  <double kill_rate>"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      kill_rate = args.PopWord().AsDouble();
-  }
-    ///// rate_kill /////
-    void Process(){
-      double ave_merit = population->GetStats().SumMerit().Average();
-      if ( ave_merit <= 0 )
-        ave_merit = 1; // make sure that we don't get NAN's or negative numbers
-      ave_merit /= cConfig::GetAveTimeslice();
-      const double kill_prob = kill_rate / ave_merit;
-      for (int i = 0; i < population->GetSize(); i++) {
-        cPopulationCell & cell = population->GetCell(i);
-        if (cell.IsOccupied() == false) continue;
-        if (g_random.P(kill_prob))  population->KillOrganism(cell);
-      }
-    }
-  };
-  
-  ///// serial_transfer /////
-  
-  /**
-    * This event does again the same thing as apocalypse. However, now
-   * the number of organisms to be retained can be specified
-   * exactly. Also, it is possible to specify whether any of these
-   * organisms may be dead or not.
-   *
-   * Parameters:
-   * transfer size (int) default: 1
-     *   The number of organisms to retain. If there are fewer living
-     *   organisms than the specified transfer size, then all living
-     *   organisms are retained.
-     * ignore deads (int) default: 1
-       *   When set to 1, only living organisms are retained. Otherwise,
-       *   every type of organism can be retained.
-       **/
-  
-  
-  class cEvent_serial_transfer : public cPopulationEvent {
-  private:
-    int transfer_size;
-    int ignore_deads;
-  public:
-      const cString GetName() const { return "serial_transfer"; }
-    const cString GetDescription() const { return "serial_transfer  [int transfer_size=1] [int ignore_deads=1]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") transfer_size=1; else transfer_size=args.PopWord().AsInt();
-      if (args == "") ignore_deads=1; else ignore_deads=args.PopWord().AsInt();
-    }
-    ///// serial_transfer /////
-    void Process(){
-      population->SerialTransfer( transfer_size, ignore_deads );
-    }
-  };
-  
-  ///// hillclimb /////
-  
-  /**
-    * Does a hill climb with the dominant genotype.
-   **/
-  
-  
-  class cEvent_hillclimb : public cPopulationEvent {
-  private:
-  public:
-    const cString GetName() const { return "hillclimb"; }
-    const cString GetDescription() const { return "hillclimb"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args; }
-    ///// hillclimb /////
-    void Process(){
-      cGenome & genome = population->GetGenebank().GetBestGenotype()->GetGenome();
-      ofstream fp("hillclimb.dat");
-      cLandscape landscape(genome, population->GetEnvironment().GetInstSet());
-      landscape.HillClimb(fp);
-    }
-  };
-  
-  ///// hillclimb_neut /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_hillclimb_neut : public cPopulationEvent {
-  private:
-  public:
-    const cString GetName() const { return "hillclimb_neut"; }
-    const cString GetDescription() const { return "hillclimb_neut"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args; }
-    ///// hillclimb_neut /////
-    void Process(){
-      cGenome & genome = population->GetGenebank().GetBestGenotype()->GetGenome();
-      ofstream fp("hillclimb.dat");
-      cLandscape landscape(genome, population->GetEnvironment().GetInstSet());
-      landscape.HillClimb_Neut(fp);
-    }
-  };
-  
-  ///// hillclimb_rand /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_hillclimb_rand : public cPopulationEvent {
-  private:
-  public:
-    const cString GetName() const { return "hillclimb_rand"; }
-    const cString GetDescription() const { return "hillclimb_rand"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args; }
-    ///// hillclimb_rand /////
-    void Process(){
-      cGenome & genome = population->GetGenebank().GetBestGenotype()->GetGenome();
-      ofstream fp("hillclimb.dat");
-      cLandscape landscape(genome, population->GetEnvironment().GetInstSet());
-      landscape.HillClimb_Rand(fp);
-    }
-  };
-  
-  ///// compete_demes /////
-  
-  /**
-    * Compete all of the demes using a basic genetic algorithm approach. Fitness
-   * of each deme is determined differently depending on the competition_type: 
-   * 0: deme fitness = 1 (control, random deme selection)
-   * 1: deme fitness = number of births since last competition (default) 
-   * 2: deme fitness = average organism fitness at the current update
-   * 3: deme fitness = average mutation rate at the current update
-   * Merit can optionally be passed in.
-   **/
-  
-  
-  class cEvent_compete_demes : public cPopulationEvent {
-  private:
-    int competition_type;
-  public:
-    const cString GetName() const { return "compete_demes"; }
-    const cString GetDescription() const { return "compete_demes  [int competition_type=1]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") competition_type=1; else competition_type=args.PopWord().AsInt();
-  }
-    ///// compete_demes /////
-    void Process(){
-      population->CompeteDemes(competition_type);
-    }
-  };
-  
-  ///// reset_demes /////
-  
-  /**
-    * Designed to serve as a control for the compete_demes. Each deme is 
-   * copied into itself and the parameters reset. 
-   **/
-  
-  
-  class cEvent_reset_demes : public cPopulationEvent {
-  private:
-  public:
-    const cString GetName() const { return "reset_demes"; }
-    const cString GetDescription() const { return "reset_demes"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-  }
-    ///// reset_demes /////
-    void Process(){
-      population->ResetDemes();
-    }
-  };
-  
-  ///// print_deme_stats /////
-  
-  /**
-    * Print stats about individual demes
-   **/
-  
-  
-  class cEvent_print_deme_stats : public cPopulationEvent {
-  private:
-  public:
-    const cString GetName() const { return "print_deme_stats"; }
-    const cString GetDescription() const { return "print_deme_stats"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-  }
-    ///// print_deme_stats /////
-    void Process(){
-      population->PrintDemeStats();
-    }
-  };
-  
-  ///// copy_deme /////
-  
-  /**
-    * Takes two numbers as arguments and copies the contents of the first deme
-   * listed into the second.
-   **/
-  
-  
-  class cEvent_copy_deme : public cPopulationEvent {
-  private:
-    int deme1_id;
-    int deme2_id;
-  public:
-      const cString GetName() const { return "copy_deme"; }
-    const cString GetDescription() const { return "copy_deme  <int deme1_id> <int deme2_id>"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      deme1_id = args.PopWord().AsInt();
-      deme2_id = args.PopWord().AsInt();
-    }
-    ///// copy_deme /////
-    void Process(){
-      population->CopyDeme(deme1_id, deme2_id);
-    }
-  };
-  
-  ///// calc_consensus /////
-  
-  /**
-    * Calculates the consensus sequence.
-   *
-   * Parameters:
-   * lines saved (integer) default: 0
-     *    ???
-     **/
-  
-  
-  class cEvent_calc_consensus : public cPopulationEvent {
-  private:
-    int lines_saved;
-  public:
-    const cString GetName() const { return "calc_consensus"; }
-    const cString GetDescription() const { return "calc_consensus  [int lines_saved=0]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") lines_saved=0; else lines_saved=args.PopWord().AsInt();
-  }
-    ///// calc_consensus /////
-    void Process(){
-      cAnalyzeUtil::CalcConsensus(population, lines_saved);
-    }
-  };
-  
-  ///// test_size_change_robustness /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_test_size_change_robustness : public cPopulationEvent {
-  private:
-    int num_trials;
-    cString filename;
-  public:
-      const cString GetName() const { return "test_size_change_robustness"; }
-    const cString GetDescription() const { return "test_size_change_robustness  [int num_trials=100] [cString filename=\"size_change.dat\"]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") num_trials=100; else num_trials=args.PopWord().AsInt();
-      if (args == "") filename="size_change.dat"; else filename=args.PopWord();
-    }
-    ///// test_size_change_robustness /////
-    void Process(){
-      ofstream & fp = population->GetStats().GetDataFileOFStream(filename);
-      cAnalyzeUtil::TestInsSizeChangeRobustness(fp,
-                                                population->GetEnvironment().GetInstSet(),
-                                                population->GetGenebank().GetBestGenotype()->GetGenome(),
-                                                num_trials, population->GetUpdate());
-    }
-  };
-  
-  ///// test_threads /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_test_threads : public cPopulationEvent {
-  private:
-  public:
-    const cString GetName() const { return "test_threads"; }
-    const cString GetDescription() const { return "test_threads"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-  }
-    
-    ///// test_threads /////
-    void Process(){
-      cTestCPU::TestThreads(population->GetGenebank().GetBestGenotype()->GetGenome());
-    }
-  };
-  
-  ///// print_threads /////
-  
-  /**
-    **/
-  
-  
-  class cEvent_print_threads : public cPopulationEvent {
-  private:
-  public:
-    const cString GetName() const { return "print_threads"; }
-    const cString GetDescription() const { return "print_threads"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-  }
-    ///// print_threads /////
-    void Process(){
-      cTestCPU::PrintThreads( population->GetGenebank().GetBestGenotype()->GetGenome() );
-    }
-  };
-  
-  ///// dump_fitness_grid /////
-  
-  /**
-    * Writes out all fitness values of the organisms currently in the
-   * population.
-   *
-   * The output file is called "fgrid.*.out", where '*' is replaced by the
-   * number of the current update.
-   **/
-  
-  
-  class cEvent_dump_fitness_grid : public cPopulationEvent {
-  private:
-  public:
-    const cString GetName() const { return "dump_fitness_grid"; }
-    const cString GetDescription() const { return "dump_fitness_grid"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-  }
-    ///// dump_fitness_grid /////
-    void Process(){
-      cString filename;
-      filename.Set("fgrid.%05d.out", population->GetUpdate());
-      ofstream fp(filename());
-      for (int i = 0; i < population->GetWorldX(); i++) {
-        for (int j = 0; j < population->GetWorldY(); j++) {
-          cPopulationCell & cell = population->GetCell(j*population->GetWorldX()+i);
-          double fitness = (cell.IsOccupied()) ?
-            cell.GetOrganism()->GetGenotype()->GetFitness() : 0.0;
-          fp << fitness << " ";
-        }
-        fp << endl;
-      }
-    }
-  };
-  
-  ///// dump_genotype_grid /////
-  
-  /**
-    * Writes out all genotype id values of the organisms currently in the
-   * population.
-   *
-   * The output file is called "idgrid.*.out", where '*' is replaced by the
-   * number of the current update.
-   **/
-  
-  
-  class cEvent_dump_genotype_grid : public cPopulationEvent {
-  private:
-  public:
-    const cString GetName() const { return "dump_genotype_grid"; }
-    const cString GetDescription() const { return "dump_genotype_grid"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-  }
-    ///// dump_genotype_grid /////
-    void Process(){
-      cString filename;
-      filename.Set("idgrid.%05d.out", population->GetUpdate());
-      ofstream fp(filename());
-      for (int i = 0; i < population->GetWorldX(); i++) {
-        for (int j = 0; j < population->GetWorldY(); j++) {
-          cPopulationCell & cell = population->GetCell(j*population->GetWorldX()+i);
-          int id = (cell.IsOccupied()) ?
-            cell.GetOrganism()->GetGenotype()->GetID() : -1;
-          fp << id << " ";
-        }
-        fp << endl;
-      }
-    }
-  };
-  
-  ///// dump_task_grid /////
-  
-  /**
-    * Writes out a grid of tasks done by each organism
-   * Tasks are encoded as a binary string first, and then converted into a
-   * base 10 number 
-   **/
-  
-  
-  class cEvent_dump_task_grid : public cPopulationEvent {
-  private:
-  public:
-    const cString GetName() const { return "dump_task_grid"; }
-    const cString GetDescription() const { return "dump_task_grid"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-  }
-    ///// dump_task_grid /////
-    void Process(){
-      cString filename;
-      filename.Set("task_grid_%d.dat",population->GetUpdate());
-      ofstream fp(filename());
-      cAnalyzeUtil::TaskGrid( population, fp );
-    }
-  };
-  
-  ///// dump_donor_grid /////
-  
-  /**
-    * Writes out the grid of donor organisms in the population
-   * 
-   * The output file is called "donor_grid.*.out", where '*' is replaced by the
-   * number of the current update.
-   **/   
-  
-  
-  class cEvent_dump_donor_grid : public cPopulationEvent {
-  private:
-  public:
-    const cString GetName() const { return "dump_donor_grid"; }
-    const cString GetDescription() const { return "dump_donor_grid"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-  }
-    
-    ///// dump_donor_grid /////
-    void Process(){
-      cString filename;
-      filename.Set("donor_grid.%05d.out", population->GetUpdate());
-      ofstream fp(filename());
-      for (int i = 0; i < population->GetWorldX(); i++) {  
-        for (int j = 0; j < population->GetWorldY(); j++) {
-          cPopulationCell & cell = population->GetCell(j*population->GetWorldX()+i);
-          int donor = cell.IsOccupied() ?  
-            cell.GetOrganism()->GetPhenotype().IsDonorLast() : -1;    
-          fp << donor << " ";
-        }
-        fp << endl;
-      }
-    }
-  };
-  
-  ///// dump_receiver_grid /////
-  
-  /**
-    * Writes out the grid of organisms which received merit in the population
-   *
-   * The output file is called "receiver_grid.*.out", where '*' is replaced by the
-   * number of the current update.
-   **/
-  
-  
-  class cEvent_dump_receiver_grid : public cPopulationEvent {
-  private:
-  public:
-    const cString GetName() const { return "dump_receiver_grid"; }
-    const cString GetDescription() const { return "dump_receiver_grid"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-  }
-    ///// dump_receiver_grid /////
-    void Process(){
-      cString filename;
-      filename.Set("receiver_grid.%05d.out", population->GetUpdate());
-      ofstream fp(filename());
-      for (int i = 0; i < population->GetWorldX(); i++) {
-        for (int j = 0; j < population->GetWorldY(); j++) {
-          cPopulationCell & cell = population->GetCell(j*population->GetWorldX()+i);
-          int receiver = cell.IsOccupied() ?
-            cell.GetOrganism()->GetPhenotype().IsReceiver() : -1;
-          fp << receiver << " ";
-        }
-        fp << endl;
-      }
-    }
-  };
-  
-  ///// print_tree_depths /////
-  
-  /**
-    * Reconstruction of phylogenetic trees.
-   **/
-  
-  
-  class cEvent_print_tree_depths : public cPopulationEvent {
-  private:
-    cString filename;
-  public:
-    const cString GetName() const { return "print_tree_depths"; }
-    const cString GetDescription() const { return "print_tree_depths  [cString filename=\"\"]"; }
-    
-    void Configure(const cString& in_args)
-  {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") filename=""; else filename=args.PopWord();
-  }
-    ///// print_tree_depths /////
-    void Process(){
-      if (filename == "") filename.Set("tree_depth.%d.dat", population->GetUpdate());
-      ofstream fp(filename);
-      cAnalyzeUtil::PrintTreeDepths(population, fp);
-    }
-  };
-  
-  ///// sever_grid_col /////
-  
-  /**
-    * Remove the connections between cells along a column in an avida grid.
-   * Arguments:
-   *  col_id:  indicates the number of columns to the left of the cut.
-   *           default (or -1) = cut population in half
-   *  min_row: First row to start cutting from
-   *           default = 0
-   *  max_row: Last row to cut to
-   *           default (or -1) = last row in population.
-   **/
-  
-  
-  class cEvent_sever_grid_col : public cPopulationEvent {
-  private:
-    int col_id;
-    int min_row;
-    int max_row;
-  public:
-      const cString GetName() const { return "sever_grid_col"; }
-    const cString GetDescription() const { return "sever_grid_col  [int col_id=-1] [int min_row=0] [int max_row=-1]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") col_id=-1; else col_id=args.PopWord().AsInt();
-      if (args == "") min_row=0; else min_row=args.PopWord().AsInt();
-      if (args == "") max_row=-1; else max_row=args.PopWord().AsInt();
-    }
-    ///// sever_grid_col /////
-    void Process(){
-      const int world_x = population->GetWorldX();
-      const int world_y = population->GetWorldY();
-      if (col_id == -1) col_id = world_x / 2;
-      if (max_row == -1) max_row = world_y;
-      if (col_id < 0 || col_id >= world_x) {
-        cerr << "Event Error: Column ID " << col_id
-        << " out of range for sever_grid_col" << endl;
-        return;
-      }
-      // Loop through all of the rows and make the cut on each...
-      for (int row_id = min_row; row_id < max_row; row_id++) {
-        int idA = row_id * world_x + col_id;
-        int idB  = GridNeighbor(idA, world_x, world_y, -1,  0);
-        int idA0 = GridNeighbor(idA, world_x, world_y,  0, -1);
-        int idA1 = GridNeighbor(idA, world_x, world_y,  0,  1);
-        int idB0 = GridNeighbor(idA, world_x, world_y, -1, -1);
-        int idB1 = GridNeighbor(idA, world_x, world_y, -1,  1);
-        cPopulationCell & cellA = population->GetCell(idA);
-        cPopulationCell & cellB = population->GetCell(idB);
-        tList<cPopulationCell> & cellA_list = cellA.ConnectionList();
-        tList<cPopulationCell> & cellB_list = cellB.ConnectionList();
-        cellA_list.Remove(&population->GetCell(idB));
-        cellA_list.Remove(&population->GetCell(idB0));
-        cellA_list.Remove(&population->GetCell(idB1));
-        cellB_list.Remove(&population->GetCell(idA));
-        cellB_list.Remove(&population->GetCell(idA0));
-        cellB_list.Remove(&population->GetCell(idA1));
-      }
-    }
-  };
-  
-  ///// sever_grid_row /////
-  
-  /**
-    * Remove the connections between cells along a column in an avida grid.
-   * Arguments:
-   *  row_id:  indicates the number of rows above the cut.
-   *           default (or -1) = cut population in half
-   *  min_col: First row to start cutting from
-   *           default = 0
-   *  max_col: Last row to cut to
-   *           default (or -1) = last row in population.
-   **/
-  
-  
-  class cEvent_sever_grid_row : public cPopulationEvent {
-  private:
-    int row_id;
-    int min_col;
-    int max_col;
-  public:
-      const cString GetName() const { return "sever_grid_row"; }
-    const cString GetDescription() const { return "sever_grid_row  [int row_id=-1] [int min_col=0] [int max_col=-1]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") row_id=-1; else row_id=args.PopWord().AsInt();
-      if (args == "") min_col=0; else min_col=args.PopWord().AsInt();
-      if (args == "") max_col=-1; else max_col=args.PopWord().AsInt();
-    }
-    ///// sever_grid_row /////
-    void Process(){
-      const int world_x = population->GetWorldX();
-      const int world_y = population->GetWorldY();
-      if (row_id == -1) row_id = world_y / 2;
-      if (max_col == -1) max_col = world_x;
-      if (row_id < 0 || row_id >= world_y) {
-        cerr << "Event Error: Row ID " << row_id
-        << " out of range for sever_grid_row" << endl;
-        return;
-      }
-      // Loop through all of the cols and make the cut on each...
-      for (int col_id = min_col; col_id < max_col; col_id++) {
-        int idA = row_id * world_x + col_id;
-        int idB  = GridNeighbor(idA, world_x, world_y,  0, -1);
-        int idA0 = GridNeighbor(idA, world_x, world_y, -1,  0);
-        int idA1 = GridNeighbor(idA, world_x, world_y,  1,  0);
-        int idB0 = GridNeighbor(idA, world_x, world_y, -1, -1);
-        int idB1 = GridNeighbor(idA, world_x, world_y,  1, -1);
-        cPopulationCell & cellA = population->GetCell(idA);
-        cPopulationCell & cellB = population->GetCell(idB);
-        tList<cPopulationCell> & cellA_list = cellA.ConnectionList();
-        tList<cPopulationCell> & cellB_list = cellB.ConnectionList();
-        cellA_list.Remove(&population->GetCell(idB));
-        cellA_list.Remove(&population->GetCell(idB0));
-        cellA_list.Remove(&population->GetCell(idB1));
-        cellB_list.Remove(&population->GetCell(idA));
-        cellB_list.Remove(&population->GetCell(idA0));
-        cellB_list.Remove(&population->GetCell(idA1));
-      }
-    }
-  };
-  
-  ///// join_grid_col /////
-  
-  /**
-    * Join the connections between cells along a column in an avida grid.
-   * Arguments:
-   *  col_id:  indicates the number of columns to the left of the joining.
-   *           default (or -1) = join population halves.
-   *  min_row: First row to start joining from
-   *           default = 0
-   *  max_row: Last row to join to
-   *           default (or -1) = last row in population.
-   **/
-  
-  
-  class cEvent_join_grid_col : public cPopulationEvent {
-  private:
-    int col_id;
-    int min_row;
-    int max_row;
-  public:
-      const cString GetName() const { return "join_grid_col"; }
-    const cString GetDescription() const { return "join_grid_col  [int col_id=-1] [int min_row=0] [int max_row=-1]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") col_id=-1; else col_id=args.PopWord().AsInt();
-      if (args == "") min_row=0; else min_row=args.PopWord().AsInt();
-      if (args == "") max_row=-1; else max_row=args.PopWord().AsInt();
-    }
-    ///// join_grid_col /////
-    void Process(){
-      const int world_x = population->GetWorldX();
-      const int world_y = population->GetWorldY();
-      if (col_id == -1) col_id = world_x / 2;
-      if (max_row == -1) max_row = world_y;
-      if (col_id < 0 || col_id >= world_x) {
-        cerr << "Event Error: Column ID " << col_id
-        << " out of range for join_grid_col" << endl;
-        return;
-      }
-      // Loop through all of the rows and make the cut on each...
-      for (int row_id = min_row; row_id < max_row; row_id++) {
-        int idA = row_id * world_x + col_id;
-        int idB  = GridNeighbor(idA, world_x, world_y, -1,  0);
-        cPopulationCell & cellA = population->GetCell(idA);
-        cPopulationCell & cellB = population->GetCell(idB);
-        cPopulationCell & cellA0 =
-          population->GetCell(GridNeighbor(idA, world_x, world_y,  0, -1));
-        cPopulationCell & cellA1 =
-          population->GetCell(GridNeighbor(idA, world_x, world_y,  0,  1));
-        cPopulationCell & cellB0 =
-          population->GetCell(GridNeighbor(idA, world_x, world_y, -1, -1));
-        cPopulationCell & cellB1 =
-          population->GetCell(GridNeighbor(idA, world_x, world_y, -1,  1));
-        tList<cPopulationCell> & cellA_list = cellA.ConnectionList();
-        tList<cPopulationCell> & cellB_list = cellB.ConnectionList();
-        if (cellA_list.FindPtr(&cellB)  == NULL) cellA_list.Push(&cellB);
-        if (cellA_list.FindPtr(&cellB0) == NULL) cellA_list.Push(&cellB0);
-        if (cellA_list.FindPtr(&cellB1) == NULL) cellA_list.Push(&cellB1);
-        if (cellB_list.FindPtr(&cellA)  == NULL) cellB_list.Push(&cellA);
-        if (cellB_list.FindPtr(&cellA0) == NULL) cellB_list.Push(&cellA0);
-        if (cellB_list.FindPtr(&cellA1) == NULL) cellB_list.Push(&cellA1);
-      }
-    }
-  };
-  
-  ///// join_grid_row /////
-  
-  /**
-    * Remove the connections between cells along a column in an avida grid.
-   * Arguments:
-   *  row_id:  indicates the number of rows abovef the cut.
-   *           default (or -1) = cut population in half
-   *  min_col: First row to start cutting from
-   *           default = 0
-   *  max_col: Last row to cut to
-   *           default (or -1) = last row in population.
-   **/
-  
-  
-  class cEvent_join_grid_row : public cPopulationEvent {
-  private:
-    int row_id;
-    int min_col;
-    int max_col;
-    public:
-      const cString GetName() const { return "join_grid_row"; }
-    const cString GetDescription() const { return "join_grid_row  [int row_id=-1] [int min_col=0] [int max_col=-1]"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      if (args == "") row_id=-1; else row_id=args.PopWord().AsInt();
-      if (args == "") min_col=0; else min_col=args.PopWord().AsInt();
-      if (args == "") max_col=-1; else max_col=args.PopWord().AsInt();
-    }
-    ///// join_grid_row /////
-    void Process(){
-      const int world_x = population->GetWorldX();
-      const int world_y = population->GetWorldY();
-      if (row_id == -1) row_id = world_y / 2;
-      if (max_col == -1) max_col = world_x;
-      if (row_id < 0 || row_id >= world_y) {
-        cerr << "Event Error: Row ID " << row_id
-        << " out of range for join_grid_row" << endl;
-        return;
-      }
-      // Loop through all of the cols and make the cut on each...
-      for (int col_id = min_col; col_id < max_col; col_id++) {
-        int idA = row_id * world_x + col_id;
-        int idB  = GridNeighbor(idA, world_x, world_y,  0, -1);
-        cPopulationCell & cellA = population->GetCell(idA);
-        cPopulationCell & cellB = population->GetCell(idB);
-        cPopulationCell & cellA0 =
-          population->GetCell(GridNeighbor(idA, world_x, world_y, -1,  0));
-        cPopulationCell & cellA1 =
-          population->GetCell(GridNeighbor(idA, world_x, world_y,  1,  0));
-        cPopulationCell & cellB0 =
-          population->GetCell(GridNeighbor(idA, world_x, world_y, -1, -1));
-        cPopulationCell & cellB1 =
-          population->GetCell(GridNeighbor(idA, world_x, world_y,  1, -1));
-        tList<cPopulationCell> & cellA_list = cellA.ConnectionList();
-        tList<cPopulationCell> & cellB_list = cellB.ConnectionList();
-        if (cellA_list.FindPtr(&cellB)  == NULL) cellA_list.Push(&cellB);
-        if (cellA_list.FindPtr(&cellB0) == NULL) cellA_list.Push(&cellB0);
-        if (cellA_list.FindPtr(&cellB1) == NULL) cellA_list.Push(&cellB1);
-        if (cellB_list.FindPtr(&cellA)  == NULL) cellB_list.Push(&cellA);
-        if (cellB_list.FindPtr(&cellA0) == NULL) cellB_list.Push(&cellA0);
-        if (cellB_list.FindPtr(&cellA1) == NULL) cellB_list.Push(&cellA1);
-      }
-    }
-  };
-  
-  ///// connect_cells /////
-  
-  /**
-    * Connects a pair of specified cells.
-   * Arguments:
-   *  cellA_x, cellA_y, cellB_x, cellB_y
-   **/
-  
-  
-  class cEvent_connect_cells : public cPopulationEvent {
-  private:
-    int cellA_x;
-    int cellA_y;
-    int cellB_x;
-    int cellB_y;
-    public:
-      const cString GetName() const { return "connect_cells"; }
-    const cString GetDescription() const { return "connect_cells  <int cellA_x> <int cellA_y> <int cellB_x> <int cellB_y>"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      cellA_x = args.PopWord().AsInt();
-      cellA_y = args.PopWord().AsInt();
-      cellB_x = args.PopWord().AsInt();
-      cellB_y = args.PopWord().AsInt();
-    }
-    ///// connect_cells /////
-    void Process(){
-      const int world_x = population->GetWorldX();
-      const int world_y = population->GetWorldY();
-      if (cellA_x < 0 || cellA_x >= world_x ||
-          cellA_y < 0 || cellA_y >= world_y ||
-          cellB_x < 0 || cellB_x >= world_x ||
-          cellB_y < 0 || cellB_y >= world_y) {
-        cerr << "Event 'connect_cells' cell out of range." << endl;
-        return;
-      }
-      int idA = cellA_y * world_x + cellA_x;
-      int idB = cellB_y * world_x + cellB_x;
-      cPopulationCell & cellA = population->GetCell(idA);
-      cPopulationCell & cellB = population->GetCell(idB);
-      tList<cPopulationCell> & cellA_list = cellA.ConnectionList();
-      tList<cPopulationCell> & cellB_list = cellB.ConnectionList();
-      cellA_list.PushRear(&cellB);
-      cellB_list.PushRear(&cellA);
-    }
-  };
-  
-  ///// disconnect_cells /////
-  
-  /**
-    * Connects a pair of specified cells.
-   * Arguments:
-   *  cellA_x, cellA_y, cellB_x, cellB_y
-   **/
-  
-  
-  class cEvent_disconnect_cells : public cPopulationEvent {
-  private:
-    int cellA_x;
-    int cellA_y;
-    int cellB_x;
-    int cellB_y;
-    public:
-      const cString GetName() const { return "disconnect_cells"; }
-    const cString GetDescription() const { return "disconnect_cells  <int cellA_x> <int cellA_y> <int cellB_x> <int cellB_y>"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      cellA_x = args.PopWord().AsInt();
-      cellA_y = args.PopWord().AsInt();
-      cellB_x = args.PopWord().AsInt();
-      cellB_y = args.PopWord().AsInt();
-    }
-    ///// disconnect_cells /////
-    void Process(){
-      const int world_x = population->GetWorldX();
-      const int world_y = population->GetWorldY();
-      if (cellA_x < 0 || cellA_x >= world_x ||
-          cellA_y < 0 || cellA_y >= world_y ||
-          cellB_x < 0 || cellB_x >= world_x ||
-          cellB_y < 0 || cellB_y >= world_y) {
-        cerr << "Event 'connect_cells' cell out of range." << endl;
-        return;
-      }
-      int idA = cellA_y * world_x + cellA_x;
-      int idB = cellB_y * world_x + cellB_x;
-      cPopulationCell & cellA = population->GetCell(idA);
-      cPopulationCell & cellB = population->GetCell(idB);
-      tList<cPopulationCell> & cellA_list = cellA.ConnectionList();
-      tList<cPopulationCell> & cellB_list = cellB.ConnectionList();
-      cellA_list.Remove(&cellB);
-      cellB_list.Remove(&cellA);
-    }
-  };
-  
-  ///// inject_resource /////
-  
-  /**
-    * Inject (add) a specified amount of a specified resource.
-   **/
-  
-  
-  class cEvent_inject_resource : public cPopulationEvent {
-  private:
-    cString res_name;
-    double res_count;
-  public:
-      const cString GetName() const { return "inject_resource"; }
-    const cString GetDescription() const { return "inject_resource  <cString res_name> <double res_count>"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      res_name = args.PopWord();
-      res_count = args.PopWord().AsDouble();
-    }
-    ///// inject_resource /////
-    void Process(){
-      cResourceLib & res_lib = population->GetEnvironment().GetResourceLib();
-      int res_id = res_lib.GetResource(res_name)->GetID();
-      population->UpdateResource(res_id, res_count);
-    }
-  };
-  
-  ///// set_resource /////
-  
-  /**
-    * Set the resource amount to a specific level
-   **/
-  
-  
-  class cEvent_set_resource : public cPopulationEvent {
-  private:
-    cString res_name;
-    double res_count;
-  public:
-      const cString GetName() const { return "set_resource"; }
-    const cString GetDescription() const { return "set_resource  <cString res_name> <double res_count>"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      res_name = args.PopWord();
-      res_count = args.PopWord().AsDouble();
-    }
-    ///// set_resource /////
-    void Process(){
-      cResourceLib & res_lib = population->GetEnvironment().GetResourceLib();
-      cResource * found_resource = res_lib.GetResource(res_name);
-      if (found_resource != NULL) {
-        population->SetResource(found_resource->GetID(), res_count);
-      }
-    }
-  };
-  
-  ///// inject_scaled_resource /////
-  
-  /**
-    * Inject (add) a specified amount of a specified resource, scaled by
-   * the current average merit divided by the average time slice.
-   **/
-  
-  
-  class cEvent_inject_scaled_resource : public cPopulationEvent {
-  private:
-    cString res_name;
-    double res_count;
-  public:
-      const cString GetName() const { return "inject_scaled_resource"; }
-    const cString GetDescription() const { return "inject_scaled_resource  <cString res_name> <double res_count>"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      res_name = args.PopWord();
-      res_count = args.PopWord().AsDouble();
-    }
-    ///// inject_scaled_resource /////
-    void Process(){
-      double ave_merit = population->GetStats().SumMerit().Average();
-      if ( ave_merit <= 0 )
-        ave_merit = 1; // make sure that we don't get NAN's or negative numbers
-      ave_merit /= cConfig::GetAveTimeslice();
-      cResourceLib & res_lib = population->GetEnvironment().GetResourceLib();
-      int res_id = res_lib.GetResource(res_name)->GetID();
-      population->UpdateResource(res_id, res_count/ave_merit);
-    }
-  };
-  
-  
-  ///// outflow_scaled_resource /////
-  
-  /**
-    * Removes a specified percentage of a specified resource, scaled by
-   * the current average merit divided by the average time slice.
-   **/
-  class cEvent_outflow_scaled_resource : public cPopulationEvent {
-  private:
-    cString res_name;
-    double res_perc;
-  public:
-      const cString GetName() const { return "outflow_scaled_resource"; }
-    const cString GetDescription() const { return "outflow_scaled_resource  <cString res_name> <double res_perc>"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      res_name = args.PopWord();
-      res_perc = args.PopWord().AsDouble();
-    }
-    void Process()
-    {
-      double ave_merit = population->GetStats().SumMerit().Average();
-      if ( ave_merit <= 0 )
-        ave_merit = 1; // make sure that we don't get NAN's or negative numbers
-      ave_merit /= cConfig::GetAveTimeslice();
-      cResourceLib & res_lib = population->GetEnvironment().GetResourceLib();
-      int res_id = res_lib.GetResource(res_name)->GetID();
-      double res_level = population->GetResource(res_id);
-      // a quick calculation shows that this formula guarantees that
-      // the equilibrium level when resource is not used is independent
-      // of the average merit
-      double scaled_perc = 1/(1+ave_merit*(1-res_perc)/res_perc);
-      res_level -= res_level*scaled_perc;
-      population->SetResource(res_id, res_level);
-    }
-  };
-  
-  
-  ///// set_reaction_value /////
-  
-  /**
-    * Set the value associated with a reaction to a specific level
-   **/
-  class cEvent_set_reaction_value : public cPopulationEvent {
-  private:
-    cString reaction_name;
-    double reaction_value;
-  public:
-      const cString GetName() const { return "set_reaction_value"; }
-    const cString GetDescription() const { return "set_reaction_value  <cString reaction_name> <double reaction_value>"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      reaction_name = args.PopWord();
-      reaction_value = args.PopWord().AsDouble();
-    }
-    void Process()
-    {
-      population->GetEnvironment().SetReactionValue(reaction_name, reaction_value);
-    }
-  };
-  
-  
-  ///// set_reaction_value_mult /////
-  
-  /**
-    * Change the value of the reaction by multiplying it with the imput number
-   **/
-  class cEvent_set_reaction_value_mult : public cPopulationEvent {
-  private:
-    cString reaction_name;
-    double value_mult;
-  public:
-      const cString GetName() const { return "set_reaction_value_mult"; }
-    const cString GetDescription() const { return "set_reaction_value_mult  <cString reaction_name> <double value_mult>"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      reaction_name = args.PopWord();
-      value_mult = args.PopWord().AsDouble();
-    }
-    void Process()
-    {
-      population->GetEnvironment().SetReactionValueMult(reaction_name, value_mult);
-    }
-  };
-  
-  
-  ///// set_reaction_inst /////
-  
-  /**
-    * Change the instruction triggered by the task
-   **/
-  class cEvent_set_reaction_inst : public cPopulationEvent {
-  private:
-    cString reaction_name;
-    cString inst_name;
-  public:
-      const cString GetName() const { return "set_reaction_inst"; }
-    const cString GetDescription() const { return "set_reaction_inst <cString reaction_name> <cString inst_name>"; }
-    
-    void Configure(const cString& in_args)
-    {
-      m_args = in_args;
-      cString args(in_args);
-      reaction_name = args.PopWord();
-      inst_name = args.PopWord();
-    }
-    void Process()
-    {
-      population->GetEnvironment().SetReactionInst(reaction_name, inst_name);
-    }
-  };
-  
-}
-
-/////////////////
-// cEvent_Factory
-/////////////////
-
-cPopulationEventFactory::cPopulationEventFactory(cPopulation* pop) : m_population(pop)
-{
-  using namespace nPopulation;
-  Register<cEvent_exit>("exit");
-  Register<cEvent_exit_if_generation_greater_than>("exit_if_generation_greater_than");
-  Register<cEvent_exit_if_update_greater_than>("exit_if_update_greater_than");
-  Register<cEvent_exit_if_ave_lineage_label_smaller>("exit_if_ave_lineage_label_smaller");
-  Register<cEvent_exit_if_ave_lineage_label_larger>("exit_if_ave_lineage_label_larger");
-  Register<cEvent_echo>("echo");
-  Register<cEvent_print_data>("print_data");
-  Register<cEvent_print_average_data>("print_average_data");
-  Register<cEvent_print_error_data>("print_error_data");
-  Register<cEvent_print_variance_data>("print_variance_data");
-  Register<cEvent_print_dominant_data>("print_dominant_data");
-  Register<cEvent_print_stats_data>("print_stats_data");
-  Register<cEvent_print_count_data>("print_count_data");
-  Register<cEvent_print_totals_data>("print_totals_data");
-  Register<cEvent_print_tasks_data>("print_tasks_data");
-  Register<cEvent_print_tasks_exe_data>("print_tasks_exe_data");
-  Register<cEvent_print_resource_data>("print_resource_data");
-  Register<cEvent_print_time_data>("print_time_data");
-  Register<cEvent_print_mutation_data>("print_mutation_data");
-  Register<cEvent_print_mutation_rate_data>("print_mutation_rate_data");
-  Register<cEvent_print_divide_mut_data>("print_divide_mut_data");
-  Register<cEvent_print_dom_parasite_data>("print_dom_parasite_data");
-  Register<cEvent_print_instruction_data>("print_instruction_data");
-  Register<cEvent_print_instruction_abundance_histogram>("print_instruction_abundance_histogram");
-  Register<cEvent_print_depth_histogram>("print_depth_histogram");
-  Register<cEvent_print_genotype_abundance_histogram>("print_genotype_abundance_histogram");
-  Register<cEvent_print_species_abundance_histogram>("print_species_abundance_histogram");
-  Register<cEvent_print_lineage_totals>("print_lineage_totals");
-  Register<cEvent_print_lineage_counts>("print_lineage_counts");
-  Register<cEvent_print_dom>("print_dom");
-  Register<cEvent_parasite_debug>("parasite_debug");
-  Register<cEvent_print_dom_parasite>("print_dom_parasite");
-  Register<cEvent_print_genotype_map>("print_genotype_map");
-  Register<cEvent_print_number_phenotypes>("print_number_phenotypes");
-  Register<cEvent_print_phenotype_status>("print_phenotype_status");
-  Register<cEvent_save_population>("save_population");
-  Register<cEvent_load_population>("load_population");
-  Register<cEvent_save_clone>("save_clone");
-  Register<cEvent_load_clone>("load_clone");
-  Register<cEvent_load_dump_file>("load_dump_file");
-  Register<cEvent_dump_pop>("dump_pop");
-  Register<cEvent_print_genotypes>("print_genotypes");
-  Register<cEvent_detail_pop>("detail_pop");
-  Register<cEvent_detail_sex_pop>("detail_sex_pop");
-  Register<cEvent_detail_parasite_pop>("detail_parasite_pop");
-  Register<cEvent_dump_historic_pop>("dump_historic_pop");
-  Register<cEvent_dump_historic_sex_pop>("dump_historic_sex_pop");
-  Register<cEvent_dump_memory>("dump_memory");
-  Register<cEvent_inject>("inject");
-  Register<cEvent_inject_all>("inject_all");
-  Register<cEvent_inject_range>("inject_range");
-  Register<cEvent_inject_sequence>("inject_sequence");
-  Register<cEvent_inject_random>("inject_random");
-  Register<cEvent_inject_range_parasite>("inject_range_parasite");
-  Register<cEvent_inject_range_pair>("inject_range_pair");
-  Register<cEvent_zero_muts>("zero_muts");
-  Register<cEvent_mod_copy_mut>("mod_copy_mut");
-  Register<cEvent_mod_div_mut>("mod_div_mut");
-  Register<cEvent_set_copy_mut>("set_copy_mut");
-  Register<cEvent_mod_point_mut>("mod_point_mut");
-  Register<cEvent_set_point_mut>("set_point_mut");
-  Register<cEvent_calc_landscape>("calc_landscape");
-  Register<cEvent_predict_w_landscape>("predict_w_landscape");
-  Register<cEvent_predict_nu_landscape>("predict_nu_landscape");
-  Register<cEvent_sample_landscape>("sample_landscape");
-  Register<cEvent_random_landscape>("random_landscape");
-  Register<cEvent_analyze_landscape>("analyze_landscape");
-  Register<cEvent_pairtest_landscape>("pairtest_landscape");
-  Register<cEvent_test_dom>("test_dom");
-  Register<cEvent_analyze_population>("analyze_population");
-  Register<cEvent_print_detailed_fitness_data>("print_detailed_fitness_data");
-  Register<cEvent_print_genetic_distance_data>("print_genetic_distance_data");
-  Register<cEvent_genetic_distance_pop_dump>("genetic_distance_pop_dump");
-  Register<cEvent_task_snapshot>("task_snapshot");
-  Register<cEvent_print_viable_tasks_data>("print_viable_tasks_data");
-  Register<cEvent_apocalypse>("apocalypse");
-  Register<cEvent_kill_rectangle>("kill_rectangle");
-  Register<cEvent_rate_kill>("rate_kill");
-  Register<cEvent_serial_transfer>("serial_transfer");
-  Register<cEvent_hillclimb>("hillclimb");
-  Register<cEvent_hillclimb_neut>("hillclimb_neut");
-  Register<cEvent_hillclimb_rand>("hillclimb_rand");
-  Register<cEvent_compete_demes>("compete_demes");
-  Register<cEvent_reset_demes>("reset_demes");
-  Register<cEvent_print_deme_stats>("print_deme_stats");
-  Register<cEvent_copy_deme>("copy_deme");
-  Register<cEvent_calc_consensus>("calc_consensus");
-  Register<cEvent_test_size_change_robustness>("test_size_change_robustness");
-  Register<cEvent_test_threads>("test_threads");
-  Register<cEvent_print_threads>("print_threads");
-  Register<cEvent_dump_fitness_grid>("dump_fitness_grid");
-  Register<cEvent_dump_genotype_grid>("dump_genotype_grid");
-  Register<cEvent_dump_task_grid>("dump_task_grid");
-  Register<cEvent_dump_donor_grid>("dump_donor_grid");
-  Register<cEvent_dump_receiver_grid>("dump_receiver_grid");
-  Register<cEvent_print_tree_depths>("print_tree_depths");
-  Register<cEvent_sever_grid_col>("sever_grid_col");
-  Register<cEvent_sever_grid_row>("sever_grid_row");
-  Register<cEvent_join_grid_col>("join_grid_col");
-  Register<cEvent_join_grid_row>("join_grid_row");
-  Register<cEvent_connect_cells>("connect_cells");
-  Register<cEvent_disconnect_cells>("disconnect_cells");
-  Register<cEvent_inject_resource>("inject_resource");
-  Register<cEvent_set_resource>("set_resource");
-  Register<cEvent_inject_scaled_resource>("inject_scaled_resource");
-  Register<cEvent_outflow_scaled_resource>("outflow_scaled_resource");
-  Register<cEvent_set_reaction_value>("set_reaction_value");
-  Register<cEvent_set_reaction_value_mult>("set_reaction_value_mult");
-  Register<cEvent_set_reaction_inst>("set_reaction_inst");
-}

Deleted: branches/brysonda/source/event/cPopulationEventFactory.h
===================================================================
--- branches/brysonda/source/event/cPopulationEventFactory.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/event/cPopulationEventFactory.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,40 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (C) 1993 - 2003 California Institute of Technology             //
-//                                                                          //
-// Read the COPYING and README files, or contact 'avida at alife.org',         //
-// before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef POPULATION_EVENT_FACTORY_HH
-#define POPULATION_EVENT_FACTORY_HH
-
-#ifndef TOBJECTFACTORY_H
-#include "tObjectFactory.h"
-#endif
-
-#ifndef POPULATION_EVENT_HH
-#include "cPopulationEvent.h"
-#endif
-
-class cPopulation;
-class cString;
-
-class cPopulationEventFactory : public tObjectFactory<cEvent* ()> {
-private:
-  cPopulation *m_population;
-public:  
-  cPopulationEventFactory(cPopulation* pop);
-  ~cPopulationEventFactory() { ; }
-
-  cEvent* Create(const cString& key)
-  {
-    cPopulationEvent* event = static_cast<cPopulationEvent*>(this->tObjectFactory<cEvent* ()>::Create(key));
-    if( event != NULL ){
-      event->SetFactoryId( GetFactoryId() );
-      event->SetPopulation( m_population );
-    }
-    return event;
-  }
-};
-
-#endif

Deleted: branches/brysonda/source/event/event.pri
===================================================================
--- branches/brysonda/source/event/event.pri	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/event/event.pri	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,16 +0,0 @@
-
-event {
-  HEADERS += $$EVENT_HH/cEvent.h \
-             $$EVENT_HH/cEventFactoryManager.h \
-             $$EVENT_HH/cEventList.h \
-             $$EVENT_HH/cPopulationEventFactory.h
-
-  SOURCES += $$EVENT_CC/event.cc \
-             $$EVENT_CC/cEventFactoryManager.cc \
-             $$EVENT_CC/cEventList.cc \
-             $$EVENT_CC/event_list_entry.cc \
-             $$EVENT_CC/cEventListIterator.cc \
-             $$EVENT_CC/cEventTriggers.cc \
-             $$EVENT_CC/population_event.cc \
-             $$EVENT_CC/cPopulationEventFactory.cc
-}

Modified: branches/brysonda/source/main/CMakeLists.txt
===================================================================
--- branches/brysonda/source/main/CMakeLists.txt	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/CMakeLists.txt	2005-10-20 04:37:15 UTC (rev 355)
@@ -10,7 +10,6 @@
   cAvidaDriver_Population.cc
   cBirthChamber.cc
   cCallbackUtil.cc
-  cConfig.cc
   cEnvironment.cc
   cFitnessMatrix.cc
   cGenebank.cc

Modified: branches/brysonda/source/main/avida.cc
===================================================================
--- branches/brysonda/source/main/avida.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/avida.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -5,47 +5,11 @@
 // before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
 //////////////////////////////////////////////////////////////////////////////
 
-#ifndef avida_h
 #include "avida.h"
-#endif
 
-#ifndef AVIDA_DRIVER_BASE_HH
 #include "cAvidaDriver_Base.h"
-#endif
-#ifndef CALLBACK_UTIL_HH
-#include "cCallbackUtil.h"
-#endif
-#ifndef CONFIG_HH
-#include "cConfig.h"
-#endif
-#ifndef DEFS_HH
-#include "defs.h"
-#endif
 #include "cString.h"
-#ifndef ENVIRONMENT_HH
-#include "cEnvironment.h"
-#endif
-#ifndef HARDWARE_4STACK_HH
-#include "cHardware4Stack.h"
-#endif
-#ifndef HARDWARE_UTIL_HH
-#include "cHardwareUtil.h"
-#endif
-#ifndef HARDWARE_CPU_HH
-#include "cHardwareCPU.h"
-#endif
-#ifndef INST_LIB_CPU_HH
-#include "cInstLibCPU.h"
-#endif
-#ifndef POPULATION_INTERFACE_HH
-#include "cPopulationInterface.h"
-#endif
-#ifndef RESOURCE_COUNT_HH
-#include "cResourceCount.h"
-#endif
-#ifndef TEST_CPU_HH
-#include "cTestCPU.h"
-#endif
+#include "defs.h"
 
 #ifdef REVISION_SUPPORT
 #include "revision.h"
@@ -96,47 +60,3 @@
   delete cAvidaDriver_Base::main_driver;
   exit(exit_code);
 }
-
-
-void SetupAvida(
-		cEnvironment &environment,
-		cPopulationInterface &test_interface )
-{
-  // Build the instruction set.
-  cHardwareUtil::LoadInstSet(cConfig::GetInstFilename(), environment.GetInstSet());
-
-  // Initialize the default environment...
-  if (environment.Load(cConfig::GetEnvironmentFilename()) == false) {
-    cerr << "Unable to load environment... aborting!" << endl;
-    ExitAvida(-1);
-  }
-
-  cConfig::SetNumInstructions(environment.GetInstSet().GetSize());
-  cConfig::SetNumTasks(environment.GetTaskLib().GetSize());
-  cConfig::SetNumReactions(environment.GetReactionLib().GetSize());
-  cConfig::SetNumResources(environment.GetResourceLib().GetSize());
-
-  // Build a test population interface.
-  test_interface.SetFun_NewHardware(&cCallbackUtil::CB_NewHardware);
-  test_interface.SetFun_Recycle(&cCallbackUtil::CB_RecycleHardware);
-  test_interface.SetFun_Divide(&cCallbackUtil::CB_TestDivide);
-  test_interface.SetFun_GetInput(&cCallbackUtil::CB_GetInput);
-  test_interface.SetFun_GetInputAt(&cCallbackUtil::CB_GetInputAt);
-  test_interface.SetFun_GetResources(&cCallbackUtil::CB_GetResources);
-  test_interface.SetFun_UpdateResources(&cCallbackUtil::CB_UpdateResources);
-  test_interface.SetFun_ReceiveValue(&cCallbackUtil::CB_ReceiveValue);
-
-
-  int rSize = environment.GetResourceLib().GetSize();
-
-  // Setup the test CPUs.
-  cTestCPU::Setup(&(environment.GetInstSet()), &environment, rSize,
-		   test_interface);
-}
-
-
-
-
-
-
-

Modified: branches/brysonda/source/main/avida.h
===================================================================
--- branches/brysonda/source/main/avida.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/avida.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -8,8 +8,6 @@
 #ifndef avida_h
 #define avida_h
 
-class cEnvironment;
-class cPopulationInterface;
 class cString;
 
 cString AvidaVersion();
@@ -19,17 +17,4 @@
  **/
 void ExitAvida(int exit_code);
 
-/**
- * This function does all the command line parsing etc., sets everything
- * up, and returns a reference to the environment that should be used.
- *
- * Besides the command line parameters, this function needs two more
- * variables. One is the environment the Avida run should use (the
- * environment is read in from disk and initialized in SetupAvida), the
- * other is the test population interface (also initialized in SetupAvida).
- **/
-void SetupAvida(
-		cEnvironment &environment,
-		cPopulationInterface &test_interface );
-
 #endif

Modified: branches/brysonda/source/main/cAnalyze.cc
===================================================================
--- branches/brysonda/source/main/cAnalyze.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cAnalyze.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -27,7 +27,6 @@
 #include "cGenomeUtil.h"
 #include "cHardwareBase.h"
 #include "cHardwareStatusPrinter.h"
-#include "cHardwareUtil.h"
 #include "cHelpManager.h"
 #include "cInitFile.h"
 #include "cInstSet.h"
@@ -65,7 +64,7 @@
 , d_environment(environment)
 , verbose(false)
 , interactive_depth(0)
-, inst_set(cHardwareUtil::DefaultInstSet(cConfig::GetInstFilename()))
+// DDD - , inst_set(cHardwareUtil::DefaultInstSet(cConfig::GetInstFilename()))
 {
   random.ResetSeed(cConfig::GetRandSeed());
   

Modified: branches/brysonda/source/main/cAnalyzeUtil.cc
===================================================================
--- branches/brysonda/source/main/cAnalyzeUtil.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cAnalyzeUtil.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -5,73 +5,30 @@
 // before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
 //////////////////////////////////////////////////////////////////////////////
 
-#ifndef ANALYZE_UTIL_HH
 #include "cAnalyzeUtil.h"
-#endif
 
-#ifndef CONFIG_HH
-#include "cConfig.h"
-#endif
-#ifndef DEFS_HH
 #include "defs.h"
-#endif
-#ifndef ENVIRONMENT_HH
 #include "cEnvironment.h"
-#endif
-#ifndef GENEBANK_HH
 #include "cGenebank.h"
-#endif
-#ifndef GENOME_HH
 #include "cGenome.h"
-#endif
-#ifndef GENOME_UTIL_HH
 #include "cGenomeUtil.h"
-#endif
-#ifndef GENOTYPE_HH
 #include "cGenotype.h"
-#endif
-#ifndef HARDWARE_BASE_HH
 #include "cHardwareBase.h"
-#endif
-#ifndef HISTOGRAM_HH
+#include "cHardwareManager.h"
 #include "cHistogram.h"
-#endif
-#ifndef INST_SET_HH
 #include "cInstSet.h"
-#endif
-#ifndef INST_UTIL_HH
 #include "cInstUtil.h"
-#endif
-#ifndef LANDSCAPE_HH
 #include "cLandscape.h"
-#endif
-#ifndef ORGANISM_HH
 #include "cOrganism.h"
-#endif
-#ifndef PHENOTYPE_HH
 #include "cPhenotype.h"
-#endif
-#ifndef POPULATION_HH
 #include "cPopulation.h"
-#endif
-#ifndef POPULATION_CELL_HH
 #include "cPopulationCell.h"
-#endif
-#ifndef SPECIES_HH
 #include "cSpecies.h"
-#endif
-#ifndef STATS_HH
 #include "cStats.h"
-#endif
-#ifndef TEST_CPU_HH
 #include "cTestCPU.h"
-#endif
-#ifndef TEST_UTIL_HH
 #include "cTestUtil.h"
-#endif
-#ifndef TOOLS_HH
 #include "cTools.h"
-#endif
+#include "cWorld.h"
 
 #include <vector>
 
@@ -237,9 +194,10 @@
 }
 
 
-void cAnalyzeUtil::CalcConsensus(cPopulation * population, int lines_saved)
+void cAnalyzeUtil::CalcConsensus(cWorld* world, int lines_saved)
 {
-  const int num_inst = population->GetEnvironment().GetInstSet().GetSize();
+  cPopulation* population = &world->GetPopulation();
+  const int num_inst = world->GetHardwareManager().GetInstSet().GetSize();
   const int update = population->GetStats().GetUpdate();
   cGenebank & genebank = population->GetGenebank();
 
@@ -418,9 +376,10 @@
  * be saved or not.
  **/
 
-void cAnalyzeUtil::AnalyzePopulation(cPopulation * pop, ofstream & fp,
+void cAnalyzeUtil::AnalyzePopulation(cWorld* world, ofstream & fp,
 	    double sample_prob, bool landscape, bool save_genotype)
 {
+  cPopulation* pop = &world->GetPopulation();
   fp << "# (1) cell number (2) genotype name (3) length (4) fitness [test-cpu] (5) fitness (actual) (6) merit (7) no of breed trues occurred (8) lineage label (9) neutral metric (10) -... landscape data" << endl;
 
   const double skip_prob = 1.0 - sample_prob;
@@ -449,7 +408,7 @@
 
     // create landscape object for this creature
     if (landscape &&  genotype->GetTestFitness() > 0) {
-      cLandscape landscape( genome, pop->GetEnvironment().GetInstSet());
+      cLandscape landscape( genome, world->GetHardwareManager().GetInstSet());
       landscape.Process(1);
       landscape.PrintStats(fp);
     }
@@ -611,17 +570,17 @@
  * saved into the genebank or not.
  **/
 
-void cAnalyzeUtil::PrintGeneticDistanceData(cPopulation * pop, ofstream & fp,
+void cAnalyzeUtil::PrintGeneticDistanceData(cWorld* world, ofstream & fp,
 					    const char * creature_name)
 {
+  cPopulation* pop = &world->GetPopulation();
   double hamming_m1 = 0;
   double hamming_m2 = 0;
   int count = 0;
   int dom_dist = 0;
 
   // load the reference genome
-  cGenome reference_genome(cInstUtil::LoadGenome(creature_name,
-					 pop->GetEnvironment().GetInstSet()));
+  cGenome reference_genome(cInstUtil::LoadGenome(creature_name, world->GetHardwareManager().GetInstSet()));
 
   // get the info for the dominant genotype
   cGenotype * cur_genotype = pop->GetGenebank().GetBestGenotype();
@@ -666,15 +625,15 @@
  * saved into the genebank or not.
  **/
 
-void cAnalyzeUtil::GeneticDistancePopDump(cPopulation * pop, ofstream & fp,
+void cAnalyzeUtil::GeneticDistancePopDump(cWorld* world, ofstream & fp,
 			 const char * creature_name, bool save_creatures)
 {
+  cPopulation* pop = &world->GetPopulation();
   double sum_fitness = 0;
   int sum_num_organisms = 0;
 
   // load the reference genome
-  cGenome reference_genome( cInstUtil::LoadGenome(creature_name,
-				  pop->GetEnvironment().GetInstSet()) );
+  cGenome reference_genome( cInstUtil::LoadGenome(creature_name, world->GetHardwareManager().GetInstSet()) );
 
   // first, print out some documentation...
   fp << "# (1) genotype name (2) fitness [test-cpu] (3) abundance (4) Hamming distance to reference (5) Levenstein distance to reference" << endl;
@@ -805,9 +764,10 @@
  * so far (compare with the event 'print_task_data', which prints all tasks.
  **/
 
-void cAnalyzeUtil::PrintViableTasksData(cPopulation * pop, ofstream & fp)
+void cAnalyzeUtil::PrintViableTasksData(cWorld* world, ofstream & fp)
 {
-  const int num_tasks = cConfig::GetNumTasks();
+  const int num_tasks = world->GetNumTasks();
+  cPopulation* pop = &world->GetPopulation();
 
   static vector<int> tasks(num_tasks);
   vector<int>::iterator it;
@@ -954,9 +914,10 @@
  * Count the number of each instruction present in the population.  Output
  * this info to a log file
  **/
-void cAnalyzeUtil::PrintInstructionAbundanceHistogram(ofstream & fp,
-                  cPopulation * pop)
-{ int i,x,y;
+void cAnalyzeUtil::PrintInstructionAbundanceHistogram(cWorld* world, ofstream & fp)
+{
+  cPopulation* pop = &world->GetPopulation();
+  int i,x,y;
   int num_inst=0;
   int mem_size=0;
   int * inst_counts;
@@ -964,7 +925,7 @@
   assert(fp.good());
 
   // ----- number of instructions available?
-  num_inst=pop->GetEnvironment().GetInstSet().GetSize();
+  num_inst = world->GetNumInstructions();
   inst_counts= new int[num_inst];
 
   // ----- create and initialize counting array

Modified: branches/brysonda/source/main/cAnalyzeUtil.h
===================================================================
--- branches/brysonda/source/main/cAnalyzeUtil.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cAnalyzeUtil.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -13,6 +13,7 @@
 class cGenome;
 class cInstSet;
 class cPopulation;
+class cWorld;
 
 // This is a static class used to do various forms of complex analysis
 // on genomes.
@@ -40,9 +41,9 @@
 
 
   // Population-wide analysis
-  static void CalcConsensus(cPopulation * population, int lines_saved);
+  static void CalcConsensus(cWorld* world, int lines_saved);
 
-  static void AnalyzePopulation(cPopulation * pop, std::ofstream & fp,
+  static void AnalyzePopulation(cWorld* world, std::ofstream & fp,
 				double sample_prob=1, bool landscape=false,
 				bool save_genotype=false);
 
@@ -50,14 +51,14 @@
     std::ofstream & histofp, std::ofstream & histo_testCPU_fp, bool save_max_f_genotype,
     bool print_fitness_histo, double hist_fmax, double hist_fstep);
 
-  static void PrintGeneticDistanceData(cPopulation * pop, std::ofstream & fp,
+  static void PrintGeneticDistanceData(cWorld* world, std::ofstream & fp,
 				const char *creature_name );
-  static void GeneticDistancePopDump(cPopulation * pop, std::ofstream & fp,
+  static void GeneticDistancePopDump(cWorld* world, std::ofstream & fp,
 		    const char * creature_name, bool save_creatures=false);
 
   static void TaskSnapshot(cPopulation * pop, std::ofstream & fp);
   static void TaskGrid(cPopulation * pop, std::ofstream & fp);
-  static void PrintViableTasksData(cPopulation *pop, std::ofstream &fp);
+  static void PrintViableTasksData(cWorld* world, std::ofstream &fp);
   static void PrintTreeDepths(cPopulation * pop, std::ofstream & fp);
 
   static void PrintDepthHistogram(std::ofstream &fp, cPopulation * pop);
@@ -65,7 +66,7 @@
   static void PrintSpeciesAbundanceHistogram(std::ofstream &fp, cPopulation * pop);
 
   // this adds support for evan dorn's InstructionHistogramEvent.  -- kgn
-  static void PrintInstructionAbundanceHistogram(std::ofstream &fp, cPopulation * pop);
+  static void PrintInstructionAbundanceHistogram(cWorld* world, std::ofstream &fp);
   // -- kgn
 };
 #endif

Modified: branches/brysonda/source/main/cAvidaConfig.cc
===================================================================
--- branches/brysonda/source/main/cAvidaConfig.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cAvidaConfig.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -11,9 +11,8 @@
 
 #include <fstream>
 #include "defs.h"
-#include "cEventFactoryManager.h"
+#include "cEventManager.h"
 #include "cInitFile.h"
-#include "cPopulationEventFactory.h"
 #include "tDictionary.h"
 
 tList<cAvidaConfig::cBaseConfigGroup> cAvidaConfig::global_group_list;
@@ -303,9 +302,7 @@
     // Test against the possible inputs.
     if (cur_arg == "-events" || cur_arg == "-e") {
       cout << "Known events:" << endl;
-      // @DMB - A cleaner way of constructing the cEventFactoryManager should be created
-      cEventFactoryManager event_manager;
-      event_manager.AddFactory(new cPopulationEventFactory(NULL));
+      cEventManager event_manager(NULL);
       event_manager.PrintAllEventDescriptions();
       exit(0);
     }

Modified: branches/brysonda/source/main/cAvidaConfig.h
===================================================================
--- branches/brysonda/source/main/cAvidaConfig.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cAvidaConfig.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -3,7 +3,7 @@
  *  Avida2
  *
  *  Created by David on 10/16/05.
- *  cConfig class created by Charles.
+ *  Designed by Charles.
  *  Copyright 2005 Michigan State University. All rights reserved.
  *
  */

Modified: branches/brysonda/source/main/cAvidaDriver_Analyze.cc
===================================================================
--- branches/brysonda/source/main/cAvidaDriver_Analyze.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cAvidaDriver_Analyze.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -12,9 +12,6 @@
 #ifndef ANALYZE_HH
 #include "cAnalyze.h"
 #endif
-#ifndef CONFIG_HH
-#include "cConfig.h"
-#endif
 
 #ifndef ENVIRONMENT_HH
 #include "cEnvironment.h"
@@ -40,7 +37,8 @@
 void cAvidaDriver_Analyze::Run()
 {
   cout << "In analyze mode!!" << endl;
-  cAnalyze analyze(cConfig::GetAnalyzeFilename(), d_environment);
+  // DDD - get analyze config file from cAvidaConfig
+  cAnalyze analyze("analyze.cfg", d_environment);
   if (interactive == true) {
     analyze.RunInteractive();
   }

Modified: branches/brysonda/source/main/cAvidaDriver_Population.cc
===================================================================
--- branches/brysonda/source/main/cAvidaDriver_Population.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cAvidaDriver_Population.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -7,24 +7,14 @@
 
 #include "cAvidaDriver_Population.h"
 
-#include "cAvidaTriggers.h"
-#include "cCallbackUtil.h"
 #include "cChangeList.h"
-#include "cConfig.h"
-#include "cEventFactoryManager.h"
-#include "cEventList.h"
+#include "cPopulation.h"
+#include "cString.h"
 #include "cGenebank.h"
 #include "cGenotype.h"
-#include "cHardwareBase.h"
-#include "cHardwareFactory.h"
-#include "cInitFile.h"
-#include "cOrganism.h"
-#include "cPopulation.h"
 #include "cPopulationCell.h"
-#include "cPopulationEventFactory.h"
-#include "cPopulationInterface.h"
-#include "cString.h"
-#include "cTools.h"
+#include "cOrganism.h"
+#include "cHardwareBase.h"
 
 #include <iostream>
 #include <iomanip>
@@ -35,112 +25,61 @@
 //  cAvidaDriver_Population
 /////////////////////////////
 
-cAvidaDriver_Population::cAvidaDriver_Population(cEnvironment & environment, cChangeList * change_list)
-  : population(NULL), event_manager(NULL), event_list(NULL)
-{
-  // Setup Population    
-  cPopulationInterface default_interface;
-  default_interface.SetFun_NewHardware(&cCallbackUtil::CB_NewHardware);
-  default_interface.SetFun_Recycle(&cCallbackUtil::CB_RecycleHardware);
-  default_interface.SetFun_Divide(&cCallbackUtil::CB_Divide);
-  default_interface.SetFun_TestOnDivide(&cCallbackUtil::CB_TestOnDivide);
-  default_interface.SetFun_GetNeighbor(&cCallbackUtil::CB_GetNeighbor);
-  default_interface.SetFun_NumNeighbors(&cCallbackUtil::CB_GetNumNeighbors);
-  default_interface.SetFun_Rotate(&cCallbackUtil::CB_Rotate);
-  default_interface.SetFun_Breakpoint(&cCallbackUtil::CB_Breakpoint);
-  default_interface.SetFun_TestFitness(&cCallbackUtil::CB_TestFitness);
-  default_interface.SetFun_GetInput(&cCallbackUtil::CB_GetInput);
-  default_interface.SetFun_GetInputAt(&cCallbackUtil::CB_GetInputAt);
-  default_interface.SetFun_Debug(&cCallbackUtil::CB_Debug);
-  default_interface.SetFun_GetResources(&cCallbackUtil::CB_GetResources);
-  default_interface.SetFun_UpdateResources(&cCallbackUtil::CB_UpdateResources);
-  default_interface.SetFun_KillCell(&cCallbackUtil::CB_KillCell);
-  default_interface.SetFun_KillSurroundCell(&cCallbackUtil::CB_KillSurroundCell);
-  default_interface.SetFun_SendMessage(&cCallbackUtil::CB_SendMessage);
-  default_interface.SetFun_ReceiveValue(&cCallbackUtil::CB_ReceiveValue);
-  default_interface.SetFun_InjectParasite(&cCallbackUtil::CB_InjectParasite);
-  default_interface.SetFun_UpdateMerit(&cCallbackUtil::CB_UpdateMerit);
-
-  population = new cPopulation(default_interface, environment, change_list);
-
-  //Setup Event List
-  event_manager = new cEventFactoryManager;
-  cStats & stats = population->GetStats();
-  event_list = new cEventList( event_manager, new cAvidaTriggers(stats) );
-  
-  // in principle, one could add more than one event factory here.
-  // however, this is not a good idea, because the automatic documentation
-  // system cannot cope with this at this point. Claus
-  event_manager->AddFactory(new cPopulationEventFactory(population));
-
-  ReadEventListFile(cConfig::GetEventFilename());
-  
-  // Make sure the directory 'genebank' exits!
-  cTools::MkDir("genebank", true);
-}
-
-cAvidaDriver_Population::~cAvidaDriver_Population()
-{
-  if (population != NULL) delete population;
-}
-
 void cAvidaDriver_Population::Run()
 {
-  assert( population != NULL );
-
+  assert( m_world != NULL );
+  
   // Process until done...
   while ( !ProcessUpdate() ) {} 
 }
 
 bool cAvidaDriver_Population::ProcessUpdate()
 {
-  if (cChangeList *change_list = population->GetChangeList()) {
+  if (cChangeList* change_list = m_world->GetPopulation().GetChangeList()) {
     change_list->Reset();
   }
-
-  GetEvents();
+  
+  m_world->GetEvents();
   if (done_flag == true) return true;
-
+  
   // Increment the Update.
-  cStats & stats = population->GetStats();
+  cStats& stats = m_world->GetPopulation().GetStats();
   stats.IncCurrentUpdate();
-
+  
+  cPopulation* population = &m_world->GetPopulation();
+  
   // Handle all data collection for previous update.
   if (stats.GetUpdate() > 0) {
     // Tell the stats object to do update calculations and printing.
     stats.ProcessUpdate();
-
+    
     // Update all the genotypes for the end of this update.
-    cGenebank & genebank = population->GetGenebank();
+    cGenebank& genebank = population->GetGenebank();
     for (cGenotype * cur_genotype = genebank.ResetThread(0);
-	 cur_genotype != NULL && cur_genotype->GetThreshold();
-	 cur_genotype = genebank.NextGenotype(0)) {
+         cur_genotype != NULL && cur_genotype->GetThreshold();
+         cur_genotype = genebank.NextGenotype(0)) {
       cur_genotype->UpdateReset();
     }
   }
-
+  
   ProcessOrganisms();
-
+  
   // Do Point Mutations
-  if (cConfig::GetPointMutProb() > 0 ) {
+  if (m_world->GetConfig().POINT_MUT_PROB.Get() > 0 ) {
     for (int i = 0; i < population->GetSize(); i++) {
       if (population->GetCell(i).IsOccupied()) {
-	population->GetCell(i).GetOrganism()->
-	  GetHardware().PointMutate(cConfig::GetPointMutProb());
+        population->GetCell(i).GetOrganism()->GetHardware().PointMutate(m_world->GetConfig().POINT_MUT_PROB.Get());
       }
     }
   }
   
-
+  
 #ifdef DEBUG_CHECK_OK
   // If we're in a debug mode, make sure the population is OK.
   if (population->OK() == false) {
     g_debug.Warning("Population::OK() is failing.");
   }
 #endif
-
-  // Do any cleanup in the hardware factory...
-  cHardwareFactory::Update();
   
   // Exit conditons...
   if (population->GetNumOrganisms() == 0) done_flag = true;
@@ -156,24 +95,14 @@
 }
 
 
-void cAvidaDriver_Population::GetEvents()
-{
-  assert(population != NULL);
-
-  if (population->GetSyncEvents() == true) {
-    SyncEventList();
-    population->SetSyncEvents(false);
-  }
-  event_list->Process();
-}
-
 void cAvidaDriver_Population::ProcessOrganisms()
 {
+  cPopulation* population = &m_world->GetPopulation();
+  
   // Process the update.
-  const int UD_size =
-    cConfig::GetAveTimeslice() * population->GetNumOrganisms();
+  const int UD_size = m_world->GetConfig().AVE_TIME_SLICE.Get() * population->GetNumOrganisms();
   const double step_size = 1.0 / (double) UD_size;
-
+  
   for (int i = 0; i < UD_size; i++) {
     if (population->GetNumOrganisms() == 0) {
       done_flag = true;
@@ -181,71 +110,17 @@
     }
     population->ProcessStep(step_size);
   }
-
+  
   // end of update stats...
   population->CalcUpdateStats();
-
+  
   // No viewer; print out status for this update....
   cStats & stats = population->GetStats();
   cout.setf(ios::left);
   cout.setf(ios::showpoint);
   cout << "UD: " << setw(6) << stats.GetUpdate() << "  "
-       << "Gen: " << setw(9) << setprecision(7) << stats.SumGeneration().Average() << "  "
-       << "Fit: " << setw(9) << setprecision(7) << stats.GetAveFitness() << "  "
-       << "Size: " << population->GetNumOrganisms()
-       << endl;
+    << "Gen: " << setw(9) << setprecision(7) << stats.SumGeneration().Average() << "  "
+    << "Fit: " << setw(9) << setprecision(7) << stats.GetAveFitness() << "  "
+    << "Size: " << population->GetNumOrganisms()
+    << endl;
 }
-
-
-void cAvidaDriver_Population::
-ReadEventListFile(const cString & filename)
-{
-  cInitFile event_file(filename);
-
-  // Load in the proper event list and set it up.
-  event_file.Load();
-  event_file.Compress();
-
-  // Loop through the line_list and change the lines to events.
-  for (int line_id = 0; line_id < event_file.GetNumLines(); line_id++) {
-    event_list->AddEventFileFormat(event_file.GetLine(line_id));
-  }
-
-  ////////// Adding events from the Genesis file //////////
-  // Max Updates and/or Max Generations
-  if( cConfig::GetEndConditionMode() == 0 ){
-    if( cConfig::GetMaxUpdates() >= 0 ){
-      event_list->AddEvent( cEventTriggers::UPDATE, cConfig::GetMaxUpdates(),
-			    cEventTriggers::TRIGGER_ONCE,
-			    cEventTriggers::TRIGGER_END, "exit", "");
-    }
-    if( cConfig::GetMaxGenerations() >= 0 ){
-      event_list->AddEvent( cEventTriggers::GENERATION,
-			    cConfig::GetMaxGenerations(),
-			    cEventTriggers::TRIGGER_ONCE,
-			    cEventTriggers::TRIGGER_END, "exit", "");
-    }
-  }else{
-    if( cConfig::GetMaxUpdates() >= 0 && cConfig::GetMaxGenerations() >= 0 ){
-      cString max_gen_str;
-      max_gen_str.Set("%d",cConfig::GetMaxGenerations());
-      cString max_update_str;
-      max_update_str.Set("%d",cConfig::GetMaxUpdates());
-      event_list->AddEvent( cEventTriggers::UPDATE, cConfig::GetMaxUpdates(),
-			    1, cEventTriggers::TRIGGER_END,
-			    "exit_if_generation_greater_than", max_gen_str);
-      event_list->AddEvent( cEventTriggers::GENERATION,
-			    cConfig::GetMaxGenerations(),
-			    .01, cEventTriggers::TRIGGER_END,
-			    "exit_if_update_greater_than", max_update_str);
-    }
-  }
-
-}
-
-void cAvidaDriver_Population::SyncEventList()
-{
-  if( event_list != NULL ){
-    event_list->Sync();
-  }
-}

Modified: branches/brysonda/source/main/cAvidaDriver_Population.h
===================================================================
--- branches/brysonda/source/main/cAvidaDriver_Population.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cAvidaDriver_Population.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -14,24 +14,19 @@
 #ifndef STRING_HH
 #include "cString.h"
 #endif
+#ifndef cWorld_h
+#include "cWorld.h"
+#endif
 
-class cEnvironment;
-class cEventFactoryManager;
-class cEventList;
-class cString;
 class cChangeList;
-class cPopulation;
 
 class cAvidaDriver_Population : public cAvidaDriver_Base {
 protected:
-  cPopulation * population;
-  cEventFactoryManager * event_manager;
-  cEventList * event_list;
+  cWorld* m_world;
 
 public:
-  cPopulation &GetPopulation(){ return *population; }
+  cWorld& GetWorld() { return *m_world; }
 
-  void GetEvents();
   /**
    * Processes one complete update.
    *
@@ -39,12 +34,10 @@
    **/
   virtual bool ProcessUpdate();
   virtual void ProcessOrganisms();
-  void ReadEventListFile(const cString & filename="event_list");
-  void SyncEventList();
 			
-  cAvidaDriver_Population(cEnvironment & environment, cChangeList * change_list = 0);
-  virtual ~cAvidaDriver_Population();
-
+  cAvidaDriver_Population(cWorld* world, cChangeList* change_list = 0) : m_world(world) { ; }
+  virtual ~cAvidaDriver_Population() { delete m_world; }
+  
   virtual void Run();
   virtual void NotifyUpdate();
 };

Modified: branches/brysonda/source/main/cBirthChamber.cc
===================================================================
--- branches/brysonda/source/main/cBirthChamber.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cBirthChamber.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -5,43 +5,23 @@
 // before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
 //////////////////////////////////////////////////////////////////////////////
 
-#ifndef BIRTH_CHAMBER_HH
 #include "cBirthChamber.h"
-#endif
 
-#ifndef TARRAY_HH
 #include "tArray.h"
-#endif
-#ifndef CONFIG_HH
-#include "cConfig.h"
-#endif
-#ifndef FUNCTIONS_HH
 #include "functions.h"
-#endif
-#ifndef  GENEBANK_HH
 #include "cGenebank.h"
-#endif
-#ifndef GENOME_HH
 #include "cGenome.h"
-#endif
-#ifndef GENOME_UTIL_HH
 #include "cGenomeUtil.h"
-#endif
-#ifndef  GENOTYPE_HH
 #include "cGenotype.h"
-#endif
-#ifndef ORGANISM_HH
 #include "cOrganism.h"
-#endif
-#ifndef TOOLS_HH
 #include "cTools.h"
-#endif
+#include "cWorld.h"
 
-cBirthChamber::cBirthChamber()
-  : genebank(NULL)
+cBirthChamber::cBirthChamber(cWorld* world)
+  : m_world(world), genebank(NULL)
 {
-  const int num_orgs = cConfig::GetWorldX()*cConfig::GetWorldY();
-  const int num_demes = cConfig::GetNumDemes(); 
+  const int num_orgs = m_world->GetConfig().WORLD_X.Get() * m_world->GetConfig().WORLD_Y.Get();
+  const int num_demes = m_world->GetConfig().NUM_DEMES.Get(); 
   local_wait_entry.Resize(num_orgs);
   deme_wait_entry.Resize(num_demes);
   for (int i = 0; i < num_orgs; i++) {
@@ -155,13 +135,10 @@
 				tArray<cOrganism *> & child_array,
 				tArray<cMerit> & merit_array)
 {
-  const cPopulationInterface & pop_interface = parent.PopInterface();
-  const cEnvironment & environment = parent.GetPhenotype().GetEnvironment();
-
   // This is asexual who doesn't need to wait in the birth chamber
   // just build the child and return.
   child_array.Resize(1);
-  child_array[0] = new cOrganism(child_genome, pop_interface, environment);
+  child_array[0] = new cOrganism(m_world, child_genome);
   merit_array.Resize(1);
   merit_array[0] = parent.GetPhenotype().GetMerit();
 
@@ -188,13 +165,10 @@
 				    tArray<cOrganism *> & child_array,
 				    tArray<cMerit> & merit_array)
 {
-  const cPopulationInterface & pop_interface = parent.PopInterface();
-  const cEnvironment & environment = parent.GetPhenotype().GetEnvironment();
-
   // Build both child organisms...
   child_array.Resize(2);
-  child_array[0] = new cOrganism(old_entry.genome, pop_interface, environment);
-  child_array[1] = new cOrganism(new_genome, pop_interface, environment);
+  child_array[0] = new cOrganism(m_world, old_entry.genome);
+  child_array[1] = new cOrganism(m_world, new_genome);
 
   // Setup the merits for both children...
   merit_array.Resize(2);
@@ -279,8 +253,8 @@
 				   cOrganism & parent)
 {
   // Collect some info for building the child.
-  const int world_x = cConfig::GetWorldX();
-  const int world_y = cConfig::GetWorldY();
+  const int world_x = m_world->GetConfig().WORLD_X.Get();
+  const int world_y = m_world->GetConfig().WORLD_Y.Get();
   const int parent_id = parent.PopInterface().GetCellID();
   
   // If nothing is waiting, store child locally.
@@ -304,9 +278,9 @@
 				   cOrganism & parent)
 {
   // Collect some info for building the child.
-  const int world_x = cConfig::GetWorldX();
-  const int world_y = cConfig::GetWorldY();
-  const int num_demes = cConfig::GetNumDemes();
+  const int world_x = m_world->GetConfig().WORLD_X.Get();
+  const int world_y = m_world->GetConfig().WORLD_Y.Get();
+  const int num_demes = m_world->GetConfig().NUM_DEMES.Get();
   const int parent_id = parent.PopInterface().GetCellID();
   
   const int parent_deme = (int) parent_id/(world_y*world_x/num_demes);
@@ -381,7 +355,7 @@
 					       double & merit0,
 					       double & merit1)
 {
-  const int num_modules = cConfig::GetNumModules();
+  const int num_modules = m_world->GetConfig().MODULE_NUM.Get();
 
   int start_module = (int) (g_random.GetDouble() * num_modules);
   int end_module = (int) (g_random.GetDouble() * num_modules);
@@ -418,7 +392,7 @@
 						  double & merit0,
 						  double & merit1)
 {
-  const int num_modules = cConfig::GetNumModules();
+  const int num_modules = m_world->GetConfig().MODULE_NUM.Get();
 
   int swap_count = 0;
   for (int i = 0; i < num_modules; i++) {
@@ -454,7 +428,7 @@
 						  double & merit0,
 						  double & merit1)
 {
-  const int num_modules = cConfig::GetNumModules();
+  const int num_modules = m_world->GetConfig().MODULE_NUM.Get();
   tArray<bool> swapped_region(num_modules);
   swapped_region.SetAll(false);
 
@@ -537,20 +511,22 @@
   // If we make it this far, this must be a sexual or a "waiting" asexual
   // organism (which is the same as sexual with 0 recombination points)
 
+  const int birth_method = m_world->GetConfig().BIRTH_METHOD.Get();
+  
   // Find a waiting entry (locally or globally)
   cBirthEntry * old_entry = NULL;
   // First check if the birth method is one of the local ones... 
-  if (cConfig::GetBirthMethod() < NUM_LOCAL_POSITION_CHILD) { 
+  if (birth_method < NUM_LOCAL_POSITION_CHILD) { 
     old_entry = FindSexLocalWaiting(child_genome, parent);
   }
   // ... then check if population is split into demes
-  else if (cConfig::GetBirthMethod() == POSITION_CHILD_DEME_RANDOM) {
+  else if (birth_method == POSITION_CHILD_DEME_RANDOM) {
     old_entry = FindSexDemeWaiting(child_genome, parent);
   }
 
   // If none of the previous conditions were met, it must be global.
   // ...check if recombination must be with organisms of the same length
-  else if (cConfig::GetSameLengthSex() != 0) {
+  else if (m_world->GetConfig().SAME_LENGTH_SEX.Get() != 0) {
     old_entry = FindSexSizeWaiting(child_genome, parent);
   }
 
@@ -574,7 +550,7 @@
 
   // If we are NOT recombining, handle that here.
   if (parent_phenotype.CrossNum() == 0 || 
-      g_random.GetDouble() > cConfig::GetRecombProb()) {
+      g_random.GetDouble() > m_world->GetConfig().RECOMBINATION_PROB.Get()) {
     return DoPairAsexBirth(*old_entry, child_genome, parent, 
 			   child_array, merit_array);
   }
@@ -591,9 +567,9 @@
   //  2: Are the recombination regions continuous? (only used if modular)
   //  3: Can modules be shuffled during recombination? (only if non-continuous)
 
-  const int num_modules = cConfig::GetNumModules();
-  const int continuous_regions = cConfig::GetContRecRegs();
-  const int shuffle_regions = !cConfig::GetCorespondRecRegs();
+  const int num_modules = m_world->GetConfig().MODULE_NUM.Get();
+  const int continuous_regions = m_world->GetConfig().CONT_REC_REGS.Get();
+  const int shuffle_regions = !m_world->GetConfig().CORESPOND_REC_REGS.Get();
 
   // If we are NOT modular...
   if (num_modules == 0) {
@@ -617,17 +593,15 @@
 
   // Should there be a 2-fold cost to sex?
 
-  const int two_fold_cost = cConfig::GetTwoFoldCostSex();
-  const cPopulationInterface & pop_interface = parent.PopInterface();
-  const cEnvironment & environment = parent_phenotype.GetEnvironment();
+  const int two_fold_cost = m_world->GetConfig().TWO_FOLD_COST_SEX.Get();
 
   cGenotype * parent0_genotype = old_entry->parent_genotype;
   cGenotype * parent1_genotype = parent.GetGenotype();
 
   if (two_fold_cost == 0) {	// Build the two organisms.
     child_array.Resize(2);
-    child_array[0] = new cOrganism(genome0, pop_interface, environment);
-    child_array[1] = new cOrganism(genome1, pop_interface, environment);
+    child_array[0] = new cOrganism(m_world, genome0);
+    child_array[1] = new cOrganism(m_world, genome1);
     
     merit_array.Resize(2);
     merit_array[0] = merit0;
@@ -643,14 +617,14 @@
     merit_array.Resize(1);
 
     if (g_random.GetDouble() < 0.5) {
-      child_array[0] = new cOrganism(genome0, pop_interface, environment);
+      child_array[0] = new cOrganism(m_world, genome0);
       merit_array[0] = merit0;
 
       // Setup the genotype for the child...
       SetupGenotypeInfo(child_array[0], parent0_genotype, parent1_genotype);
     } 
     else {
-      child_array[0] = new cOrganism(genome1, pop_interface, environment);
+      child_array[0] = new cOrganism(m_world, genome1);
       merit_array[0] = merit1;
 
       // Setup the genotype for the child...

Modified: branches/brysonda/source/main/cBirthChamber.h
===================================================================
--- branches/brysonda/source/main/cBirthChamber.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cBirthChamber.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -30,6 +30,7 @@
 class cGenotype;
 class cOrganism;
 template <class T> class tArray;
+class cWorld;
 
 class cBirthChamber {
 private:
@@ -41,9 +42,10 @@
     cGenotype * parent_genotype;
     bool is_waiting;
   };
+  
+  cWorld* m_world;
+  cGenebank* genebank;
 
-  cGenebank * genebank;
-
   cBirthEntry global_wait_entry;
   tArray<cBirthEntry> local_wait_entry;
   tArray<cBirthEntry> deme_wait_entry;
@@ -96,7 +98,7 @@
   void SetupGenotypeInfo(cOrganism * organism, cGenotype * parent0_genotype,
 			 cGenotype * parent1_genotype);
 public:
-  cBirthChamber();
+  cBirthChamber(cWorld* world);
   ~cBirthChamber();
 
   void SetGenebank(cGenebank * in_genebank) { genebank = in_genebank; }

Deleted: branches/brysonda/source/main/cCallbackUtil.cc
===================================================================
--- branches/brysonda/source/main/cCallbackUtil.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cCallbackUtil.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,276 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (C) 1993 - 2003 California Institute of Technology             //
-//                                                                          //
-// Read the COPYING and README files, or contact 'avida at alife.org',         //
-// before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef CALLBACK_UTIL_HH
-#include "cCallbackUtil.h"
-#endif
-
-#ifndef avida_h
-#include "avida.h"
-#endif
-#ifndef AVIDA_DRIVER_BASE_HH
-#include "cAvidaDriver_Base.h"
-#endif
-#ifndef BIRTH_CHAMBER_HH
-#include "cBirthChamber.h"
-#endif
-#ifndef CONFIG_HH
-#include "cConfig.h"
-#endif
-#ifndef ENVIRONMENT_HH
-#include "cEnvironment.h"
-#endif
-#ifndef GENOTYPE_HH
-#include "cGenotype.h"
-#endif
-#ifndef HARDWARE_BASE_HH
-#include "cHardwareBase.h"
-#endif
-#ifndef HARDWARE_FACTORY_HH
-#include "cHardwareFactory.h"
-#endif
-#ifndef ORG_MESSAGE_HH
-#include "cOrgMessage.h"
-#endif
-#ifndef ORGANISM_HH
-#include "cOrganism.h"
-#endif
-#ifndef POPULATION_HH
-#include "cPopulation.h"
-#endif
-#ifndef POPULATION_CELL_HH
-#include "cPopulationCell.h"
-#endif
-#ifndef POPULATION_INTERFACE_HH
-#include "cPopulationInterface.h"
-#endif
-#ifndef TEST_CPU_HH
-#include "cTestCPU.h"
-#endif
-
-
-using namespace std;
-
-
-cHardwareBase * cCallbackUtil::CB_NewHardware(cPopulation * pop,
-					      cOrganism * owner)
-{
-  cInstSet * inst_set;
-
-  // Determine which inst_set we should be using...
-  // If we're in a population, setup the inst_set properly.
-  if (pop != NULL) inst_set = &(pop->GetEnvironment().GetInstSet());
-
-  // Otherwise, use the test inst lib...
-  else inst_set = cTestCPU::GetInstSet();
-
-  // For the moment, we only have one hardware type...
-  assert(inst_set != NULL && inst_set->OK());
-  cHardwareBase * new_hardware =
-    cHardwareFactory::Create(owner, inst_set, cConfig::GetHardwareType());
-
-  return new_hardware;
-}
-
-
-void cCallbackUtil::CB_RecycleHardware(cHardwareBase * out_hardware)
-{
-  cHardwareFactory::Recycle(out_hardware);
-}
-
-
-// Callback for a divide inside of a population.  Return parent alive.
-bool cCallbackUtil::CB_Divide(cPopulation * pop, int cell_id,
-			      cOrganism * parent, cGenome & child_genome)
-{
-  assert(pop != NULL);
-  assert(parent != NULL);
-  assert(pop->GetCell(cell_id).GetOrganism() == parent);
-
-  return pop->ActivateOffspring(child_genome, *parent);
-}
-
-
-// Callback for a divide outside of a population
-bool cCallbackUtil::CB_TestDivide(cPopulation * pop, int cell_id,
-				  cOrganism * parent, cGenome & child_genome)
-{
-  assert(pop == NULL);  // Must not be in a population...
-
-  // Reset the parent from the divide
-  parent->GetPhenotype().TestDivideReset(parent->GetGenome().GetSize());
-
-  // @CAO in the future, we probably want to pass this child the test_cpu!
-
-  return true;
-}
-
-// Callback to find out if we need to run a test CPU on all divides...
-bool cCallbackUtil::CB_TestOnDivide(cPopulation * pop, int cell_id)
-{
-  assert(pop != NULL); // Must be in a population...
-  return cConfig::GetTestOnDivide();
-}
-
-cOrganism * cCallbackUtil::CB_GetNeighbor(cPopulation * pop, int cell_id)
-{
-  assert(pop != NULL);
-  cPopulationCell & cell = pop->GetCell(cell_id);
-  assert(cell.IsOccupied());
-
-  return cell.ConnectionList().GetFirst()->GetOrganism();
-}
-
-
-int cCallbackUtil::CB_GetNumNeighbors(cPopulation * pop, int cell_id)
-{
-  assert(pop != NULL);
-  cPopulationCell & cell = pop->GetCell(cell_id);
-  assert(cell.IsOccupied());
-
-  return cell.ConnectionList().GetSize();
-}
-
-
-void cCallbackUtil::CB_Rotate(cPopulation * pop, int cell_id,
-				    int direction)
-{
-  assert(pop != NULL);
-  cPopulationCell & cell = pop->GetCell(cell_id);
-  assert(cell.IsOccupied());
-
-  if (direction >= 0) cell.ConnectionList().CircNext();
-  else cell.ConnectionList().CircPrev();
-}
-
-
-void cCallbackUtil::CB_Breakpoint()
-{
-  cAvidaDriver_Base::main_driver->SignalBreakpoint();
-}
-
-
-double cCallbackUtil::CB_TestFitness(cPopulation * pop, int cell_id)
-{
-  assert(pop != NULL);
-  cPopulationCell & cell = pop->GetCell(cell_id);
-  assert(cell.IsOccupied());
-
-  return cell.GetOrganism()->GetGenotype()->GetTestFitness();
-}
-
-
-int cCallbackUtil::CB_GetInput(cPopulation * pop, int cell_id)
-{
-  if (pop == NULL) return cTestCPU::GetInput();
-  cPopulationCell & cell = pop->GetCell(cell_id);
-  assert(cell.IsOccupied());
-  return cell.GetInput();
-}
-
-int cCallbackUtil::CB_GetInputAt(cPopulation * pop, int cell_id, int & input_pointer)
-{
-  if (pop == NULL) return cTestCPU::GetInputAt(input_pointer);
-  cPopulationCell & cell = pop->GetCell(cell_id);
-  assert(cell.IsOccupied());
-  return cell.GetInputAt(input_pointer);
-}
-
-int cCallbackUtil::CB_Debug(cPopulation * pop, int cell_id)
-{
-  if (pop == NULL) return -1;
-  cPopulationCell & cell = pop->GetCell(cell_id);
-  assert(cell.IsOccupied());
-  return cell.GetOrganism()->GetGenotype()->GetID();
-}
-
-
-const tArray<double> &
-cCallbackUtil::CB_GetResources(cPopulation * pop, int cell_id)
-{
-  if (pop == NULL) return cTestCPU::GetResources();
-
-  // @CAO for the moment, ignore the possibility of local resources...
-  return pop->GetCellResources(cell_id);
-}
-
-
-void cCallbackUtil::CB_UpdateResources(cPopulation * pop, int cell_id,
-				       const tArray<double> & res_change)
-{
-  if (pop == NULL) return cTestCPU::UpdateResources(res_change);
-
-  // @CAO for the moment, ignore the possibility of local resources...
-  return pop->UpdateCellResources(res_change, cell_id);
-}
-
-
-void cCallbackUtil::CB_KillCell(cPopulation * pop, int death_id)
-{
-  assert(pop != NULL);
-  cPopulationCell & death_cell = pop->GetCell(death_id);
-  pop->KillOrganism(death_cell);
-}
-
-void cCallbackUtil::CB_KillSurroundCell(cPopulation * pop, int commie_id)
-{
-	assert (pop != NULL);
-	cPopulationCell & death_cell = pop->GetCell(commie_id);
-	pop->Kaboom(death_cell);
-}
-
-bool cCallbackUtil::CB_SendMessage(cPopulation * pop, int cell_id, cOrgMessage & mess)
-{
-  mess.SetSenderID(cell_id);
-  mess.SetTime(pop->GetUpdate());
-  cPopulationCell & cell = pop->GetCell(cell_id);
-  if(cell.ConnectionList().GetFirst() == NULL)
-    return false;
-  mess.SetRecipientID(cell.ConnectionList().GetFirst()->GetID());
-  return cell.ConnectionList().GetFirst()->GetOrganism()->ReceiveMessage(mess);
-}
-
-int cCallbackUtil::CB_ReceiveValue(cPopulation * pop, int cell_id)
-{
-  if (pop == NULL) return cTestCPU::GetReceiveValue();
-
-  cPopulationCell & cell = pop->GetCell(cell_id);
-  assert(cell.IsOccupied());
-
-  const int num_neighbors = cell.ConnectionList().GetSize();
-  for (int i = 0; i < num_neighbors; i++) {
-	cPopulationCell & cell = pop->GetCell(cell_id);
-	cell.ConnectionList().CircNext();
-
-    cOrganism * cur_neighbor = cell.ConnectionList().GetFirst()->GetOrganism();
-    if (cur_neighbor == NULL || cur_neighbor->GetSentActive() == false) {
-      continue;
-    }
-
-    return cur_neighbor->RetrieveSentValue();
-  }
-
-  return 0;
-
-}
-
-bool cCallbackUtil::CB_InjectParasite(cPopulation * pop, int cell_id, cOrganism * parent,
-				      const cGenome & injected_code)
-{
-  assert(pop != NULL);
-  assert(parent != NULL);
-  assert(pop->GetCell(cell_id).GetOrganism() == parent);
-
-  return pop->ActivateInject(*parent, injected_code);
-}
-
-bool cCallbackUtil::CB_UpdateMerit(cPopulation * pop, int cell_id,
-				   double new_merit)
-{
-  assert(pop != NULL);
-  return pop->UpdateMerit(cell_id, new_merit);
-}

Deleted: branches/brysonda/source/main/cCallbackUtil.h
===================================================================
--- branches/brysonda/source/main/cCallbackUtil.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cCallbackUtil.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,51 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (C) 1993 - 2003 California Institute of Technology             //
-//                                                                          //
-// Read the COPYING and README files, or contact 'avida at alife.org',         //
-// before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef CALLBACK_UTIL_HH
-#define CALLBACK_UTIL_HH
-
-class cGenome;
-class cHardwareBase;
-class cOrganism;
-class cPopulation;
-class cPopulationInterface;
-class cOrgMessage;
-class cCodeLabel;
-template <class T> class tArray;
-
-class cCallbackUtil {
-public:
-  // Callbacks from organism...
-  static cHardwareBase * CB_NewHardware(cPopulation * pop, cOrganism * owner);
-  static void CB_RecycleHardware(cHardwareBase * out_hardware);
-  static bool CB_Divide(cPopulation * pop, int cell_id,
-			cOrganism * parent, cGenome & child_genome);
-  static bool CB_TestDivide(cPopulation * pop, int cell_id,
-			    cOrganism * parent, cGenome & child_genome);
-  static bool CB_TestOnDivide(cPopulation * pop, int cell_id);
-  static cOrganism * CB_GetNeighbor(cPopulation * pop, int cell_id);
-  static int CB_GetNumNeighbors(cPopulation * pop, int cell_id);
-  static void CB_Rotate(cPopulation * pop, int cell_id, int direction);
-  static void CB_Breakpoint();
-  static double CB_TestFitness(cPopulation * pop, int cell_id);
-  static int CB_GetInput(cPopulation * pop, int cell_id);
-  static int CB_GetInputAt(cPopulation * pop, int cell_id, int & input_pointer);
-  static int CB_Debug(cPopulation * pop, int cell_id);
-  static const tArray<double>& CB_GetResources(cPopulation * pop, int cell_id);
-  static void CB_UpdateResources(cPopulation  * pop, int cell_id,
-				 const tArray<double> & res_change);
-  static void CB_KillCell(cPopulation * pop, int death_id);
-  static void CB_KillSurroundCell(cPopulation * pop, int commie_id);
-  static bool CB_SendMessage(cPopulation * pop, int cell_id, cOrgMessage & mess);
-  static int CB_ReceiveValue(cPopulation * pop, int cell_id);
-  static bool CB_InjectParasite(cPopulation * pop, int cell_id, cOrganism * parent,
-				const cGenome & injected_code);
-
-  static bool CB_UpdateMerit(cPopulation * pop, int cell_id, double new_merit);
-};
-
-#endif

Deleted: branches/brysonda/source/main/cConfig.cc
===================================================================
--- branches/brysonda/source/main/cConfig.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cConfig.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,681 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (C) 1993 - 2003 California Institute of Technology             //
-//                                                                          //
-// Read the COPYING and README files, or contact 'avida at alife.org',         //
-// before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
-//////////////////////////////////////////////////////////////////////////////
-
-#include "cConfig.h"
-
-#include "defs.h"
-#include "cEventFactoryManager.h"
-#include "cGenesis.h"
-#include "cPopulationEventFactory.h"
-#include "cTools.h"
-
-using namespace std;
-
-tList<cConfig::cConfigGroup> cConfig::group_list;
-bool cConfig::analyze_mode;
-bool cConfig::primitive_mode;
-bool cConfig::interactive_analyze;
-cString cConfig::default_dir;
-cString cConfig::genesis_filename;
-cString cConfig::inst_filename;
-cString cConfig::event_filename;
-cString cConfig::analyze_filename;
-cString cConfig::env_filename;
-cString cConfig::start_creature;
-cString cConfig::clone_filename;
-cString cConfig::load_pop_filename;
-int cConfig::max_updates;
-int cConfig::max_generations;
-int cConfig::end_condition_mode;
-int cConfig::world_x;
-int cConfig::world_y;
-int cConfig::world_geometry;
-int cConfig::num_demes;
-int cConfig::rand_seed;
-double cConfig::point_mut_prob;
-double cConfig::copy_mut_prob;
-double cConfig::ins_mut_prob;
-double cConfig::del_mut_prob;
-double cConfig::div_mut_prob;
-double cConfig::divide_mut_prob;
-double cConfig::divide_ins_prob;
-double cConfig::divide_del_prob;
-double cConfig::parent_mut_prob;
-int cConfig::special_mut_line;
-double cConfig::recomb_prob;
-int cConfig::num_modules;
-int cConfig::cont_rec_regs;
-int cConfig::corespond_rec_regs;
-int cConfig::two_fold_cost_sex;
-int cConfig::same_length_sex;
-int cConfig::num_instructions;
-int cConfig::hardware_type;
-int cConfig::max_cpu_threads;
-double cConfig::thread_slicing_method;
-int cConfig::size_merit_method;
-int cConfig::base_size_merit;
-double cConfig::default_bonus;
-int cConfig::task_merit_method;
-int cConfig::max_label_exe_size;
-int cConfig::merit_time;
-double cConfig::merit_given;
-double cConfig::merit_received;
-int cConfig::max_donate_kin_distance;
-int cConfig::max_donate_edit_distance;
-int cConfig::max_donates;
-int cConfig::num_tasks;
-int cConfig::num_reactions;
-int cConfig::num_resources;
-int cConfig::slicing_method;
-int cConfig::birth_method;
-int cConfig::prefer_empty;
-int cConfig::death_method;
-int cConfig::alloc_method;
-int cConfig::divide_method;
-int cConfig::required_task;
-int cConfig::immunity_task;
-int cConfig::required_reaction;
-int cConfig::lineage_creation_method;
-int cConfig::generation_inc_method;
-int cConfig::age_limit;
-double cConfig::age_deviation;
-double cConfig::child_size_range;
-double cConfig::min_copied_lines;
-double cConfig::min_exe_lines;
-int cConfig::require_allocate;
-bool cConfig::test_on_divide;
-bool cConfig::test_sterilize;
-double cConfig::revert_fatal;
-double cConfig::revert_neg;
-double cConfig::revert_neut;
-double cConfig::revert_pos;
-double cConfig::sterilize_fatal;
-double cConfig::sterilize_neg;
-double cConfig::sterilize_neut;
-double cConfig::sterilize_pos;
-int cConfig::fail_implicit;
-int cConfig::ave_time_slice;
-int cConfig::species_threshold;
-int cConfig::threshold;
-int cConfig::genotype_print;
-int cConfig::species_print;
-int cConfig::species_recording;
-int cConfig::genotype_print_dom;
-int cConfig::test_cpu_time_mod;
-int cConfig::track_main_lineage;
-bool cConfig::log_threshold_only;
-bool cConfig::log_creatures;
-int cConfig::log_genotypes;
-bool cConfig::log_threshold;
-bool cConfig::log_species;
-bool cConfig::log_landscape;
-bool cConfig::log_lineages;
-int cConfig::debug_level;
-int cConfig::view_mode;
-double cConfig::die_prob;
-
-void cConfig::InitGroupList(){
-  // Start with the Architecture variables...
-  cConfigGroup * arch_group = new cConfigGroup("Architecture Variables");
-  group_list.PushRear(arch_group);
-  
-  arch_group->Add(max_updates, "-1", "MAX_UPDATES",
-                  "Maximum updates to run experiment (-1 = no limit)");
-  arch_group->Add(max_generations, "-1", "MAX_GENERATIONS",
-                  "Maximum generations to run experiment (-1 = no limit)");
-  arch_group->Add(end_condition_mode, "0", "END_CONDITION_MODE",
-                  "End run when ...\n0 = MAX_UPDATES _OR_ MAX_GENERATIONS is reached\n1 = MAX_UPDATES _AND_ MAX_GENERATIONS is reached");
-  arch_group->Add(world_x, "100", "WORLD-X",
-                  "Width of the Avida world");
-  arch_group->Add(world_y, "100", "WORLD-Y",
-                  "Height of the Avida world");
-  arch_group->Add(world_geometry, "2", "WORLD_GEOMETRY",
-                  "1 = Bounded Grid\n2 = Torus");
-  arch_group->Add(num_demes, "0", "NUM_DEMES",
-                  "Number of independed groups in the population; 0=off");
-  arch_group->Add(rand_seed, "0", "RANDOM_SEED",
-                  "Random number seed (0 for based on time)");
-  arch_group->Add(hardware_type, "0", "HARDWARE_TYPE",
-                  "0 = Original CPUs\n1 = New, Stack-based CPUs");
-  
-  // Configuration file group.
-  cConfigGroup * file_group = new cConfigGroup("Configuration Files");
-  group_list.PushRear(file_group);
-  
-  file_group->Add(default_dir, DEFAULT_DIR, "DEFAULT_DIR",
-                  "Directory in which config files are found");
-  file_group->Add(inst_filename, "inst_set.default", "INST_SET",
-                  "File containing instruction set");
-  file_group->Add(event_filename, "events.cfg", "EVENT_FILE",
-                  "File containing list of events during run");
-  file_group->Add(analyze_filename, "analyze.cfg", "ANALYZE_FILE",
-                  "File used for analysis mode");
-  file_group->Add(env_filename, "environment.cfg", "ENVIRONMENT_FILE",
-                  "File that describes the environment");
-  file_group->Add(start_creature, "organism.default", "START_CREATURE",
-                  "Organism to seed the soup");
-  
-  // Reproduction group.
-  cConfigGroup * repro_group = new cConfigGroup("Birth and Death");
-  group_list.PushRear(repro_group);
-  
-  repro_group->Add(birth_method, "4", "BIRTH_METHOD",
-                   "0 = Replace random organism in neighborhood\n1 = Replace oldest organism in neighborhood\n2 = Replace largest Age/Merit in neighborhood\n3 = Place only in empty cells in neighborhood\n4 = Replace random from population (Mass Action)\n5 = Replace oldest in entire population (like Tierra)\n6 = Replace random within deme");
-  repro_group->Add(prefer_empty, "1", "PREFER_EMPTY",
-                   "Are empty cells given preference in offsping placement?");
-  repro_group->Add(death_method, "1", "DEATH_METHOD",
-                   "0 = Never die of old age.\n1 = Die when inst executed = AGE_LIMIT (+deviation)\n2 = Die when inst executed = length*AGE_LIMIT (+dev)");
-  repro_group->Add(age_limit, "20", "AGE_LIMIT",
-                   "Modifies DEATH_METHOD");
-  repro_group->Add(age_deviation, "0", "AGE_DEVIATION",
-                   "Creates a distribution around AGE_LIMIT");
-  repro_group->Add(alloc_method, "0", "ALLOC_METHOD",
-                   "0 = Allocated space is set to default instruction.\n1 = Set to section of dead genome (Necrophilia)\n2 = Allocated space is set to random instruction.");
-  repro_group->Add(divide_method, "1", "DIVIDE_METHOD",
-                   "0 = Divide leaves state of mother untouched.\n1 = Divide resets state of mother (after the divide, we have 2 children)\n2 = Divide resets state of current thread only(does not touch possible parasite threads)");
-  repro_group->Add(generation_inc_method, "1", "GENERATION_INC_METHOD",
-                   "0 = Only the generation of the child is\n    increased on divide.\n1 = Both the generation of the mother and child are\n    increased on divide (good with DIVIDE_METHOD 1).");
-  repro_group->Add(recomb_prob, "1", "RECOMBINATION_PROB",
-                   "probability that recombination will happen when div-sex is used");
-  repro_group->Add(num_modules, "0", "MODULE_NUM",
-                   "number of modules in the genome");
-  repro_group->Add(cont_rec_regs, "1", "CONT_REC_REGS",
-                   "are (modular) recombination regions continuous");
-  repro_group->Add(corespond_rec_regs, "1", "CORESPOND_REC_REGS",
-                   "are (modular) recombination regions swapped at random or with corresponding ones, by location");
-  repro_group->Add(two_fold_cost_sex, "0", "TWO_FOLD_COST_SEX",
-                   "1 = only one recombined offspring is born.\n2 = both offspring are born");
-  repro_group->Add(same_length_sex, "0", "SAME_LENGTH_SEX",
-                   "0 = recombine with any genome\n1 = only recombine w/ same length");
-  
-  
-  // Divide Restrictions Group.
-  cConfigGroup * div_group = new cConfigGroup("Divide Restrictions");
-  group_list.PushRear(div_group);
-  
-  div_group->Add(child_size_range, "2.0", "CHILD_SIZE_RANGE",
-                 "Maximal differential between child and parent sizes.");
-  div_group->Add(min_copied_lines, "0.5", "MIN_COPIED_LINES",
-                 "Code fraction which must be copied before divide.");
-  div_group->Add(min_exe_lines, "0.5", "MIN_EXE_LINES",
-                 "Code fraction which must be executed before divide.");
-  div_group->Add(require_allocate, "1", "REQUIRE_ALLOCATE",
-                 "Is a an allocate required before a divide? (0/1)");
-  div_group->Add(required_task, "-1", "REQUIRED_TASK",
-                 "Task ID required for successful divide.");
-  div_group->Add(immunity_task, "-1", "IMMUNITY_TASK",
-                 "Task providing immunity from the required task.");
-  div_group->Add(required_reaction, "-1", "REQUIRED_REACTION",
-                 "Reaction ID required for successful divide.");
-  div_group->Add(die_prob, "0", "DIE_PROB",
-                 "probability of death when 'die' instruction is executed"); 
-  
-  
-  
-  // Mutations Group
-  cConfigGroup * muts_group = new cConfigGroup("Mutations");
-  group_list.PushRear(muts_group);
-  
-  muts_group->Add(point_mut_prob, "0.0", "POINT_MUT_PROB",
-                  "Mutation rate (per-location per update)");
-  muts_group->Add(copy_mut_prob, "0.0075", "COPY_MUT_PROB",
-                  "Mutation rate (per copy)");
-  muts_group->Add(ins_mut_prob, "0.0", "INS_MUT_PROB",
-                  "Insertion rate (per site, applied on divide)");
-  muts_group->Add(del_mut_prob, "0.0", "DEL_MUT_PROB",
-                  "Deletion rate (per site, applied on divide)");
-  muts_group->Add(div_mut_prob, "0.0", "DIV_MUT_PROB",
-                  "Mutation rate (per site, applied on divide)");
-  muts_group->Add(divide_mut_prob, "0.0", "DIVIDE_MUT_PROB",
-                  "Mutation rate (per divide)");
-  muts_group->Add(divide_ins_prob, "0.05", "DIVIDE_INS_PROB",
-                  "Insertion rate (per divide)");
-  muts_group->Add(divide_del_prob, "0.05", "DIVIDE_DEL_PROB",
-                  "Deletion rate (per divide)");
-  muts_group->Add(parent_mut_prob, "0.0", "PARENT_MUT_PROB",
-                  "Per-site, in parent, on divide");
-  muts_group->Add(special_mut_line, "-1", "SPECIAL_MUT_LINE",
-                  "If this is >= 0, ONLY this line is mutated");
-  
-  
-  // Mutation reversions group
-  cConfigGroup * rev_group = new cConfigGroup("Mutation Reversion");
-  rev_group->SetComment("These slow down avida a lot, and should be set to 0.0 normally.");
-  group_list.PushRear(rev_group);
-  
-  rev_group->Add(revert_fatal, "0.0", "REVERT_FATAL",
-                 "Should any mutations be reverted on birth?");
-  rev_group->Add(revert_neg, "0.0", "REVERT_DETRIMENTAL",
-                 "  0.0 to 1.0; Probability of reversion.");
-  rev_group->Add(revert_neut, "0.0", "REVERT_NEUTRAL",
-                 "");
-  rev_group->Add(revert_pos, "0.0", "REVERT_BENEFICIAL",
-                 "");
-  rev_group->Add(sterilize_fatal, "0.0", "STERILIZE_FATAL",
-                 "Should any mutations clear (kill) the organism?");
-  rev_group->Add(sterilize_neg, "0.0", "STERILIZE_DETRIMENTAL",
-                 "  0.0 to 1.0; Probability of reset.");
-  rev_group->Add(sterilize_neut, "0.0", "STERILIZE_NEUTRAL",
-                 "");
-  rev_group->Add(sterilize_pos, "0.0", "STERILIZE_BENEFICIAL",
-                 "");
-  rev_group->Add(fail_implicit, "0", "FAIL_IMPLICIT",
-                 "Should copies that failed *not* due to mutations\nbe eliminated?");
-  
-  // Time slicing group
-  cConfigGroup * time_group = new cConfigGroup("Time Slicing");
-  group_list.PushRear(time_group);
-  
-  time_group->Add(ave_time_slice, "30", "AVE_TIME_SLICE",
-                  "Ave number of insts per org per update");
-  time_group->Add(slicing_method, "2", "SLICING_METHOD",
-                  "0 = CONSTANT: all organisms get default...\n1 = PROBABILISTIC: Run _prob_ proportional to merit.\n2 = INTEGRATED: Perfectly integrated deterministic.");
-  time_group->Add(size_merit_method, "0", "SIZE_MERIT_METHOD",
-                  "0 = off (merit is independent of size)\n1 = Merit proportional to copied size\n2 = Merit prop. to executed size\n3 = Merit prop. to full size\n4 = Merit prop. to min of executed or copied size\n5 = Merit prop. to sqrt of the minimum size");
-  time_group->Add(task_merit_method, "1", "TASK_MERIT_METHOD",
-                  "0 = No task bonuses\n1 = Bonus just equals the task bonus");
-  time_group->Add(max_cpu_threads, "1", "MAX_CPU_THREADS",
-                  "Number of Threads a CPU can spawn");
-  time_group->Add(thread_slicing_method, "0", "THREAD_SLICING_METHOD",
-                  "Formula for and organism's thread slicing -> 1 + (num_organism_threads-1) * THREAD_SLICING_METHOD.\n0 = One thread executed per time slice.\n1 = All threads executed each time slice.\n");
-  time_group->Add(max_label_exe_size, "1", "MAX_LABEL_EXE_SIZE",
-                  "Max nops marked as executed when labels are used");
-  time_group->Add(base_size_merit, "100", "BASE_SIZE_MERIT",
-                  "Base merit when size is *not* used");
-  time_group->Add(default_bonus, "1", "DEFAULT_BONUS",
-                  "The bonus an organism gets before it has completed any tasks");
-  time_group->Add(merit_time, "0", "MERIT_TIME",
-                  "0 = Merit Calculated when task completed\n1 = Merit Calculated on Divide");
-  time_group->Add(merit_given, "0.0", "MERIT_GIVEN",
-                  "Fraction of merit donated with 'donate' command");
-  time_group->Add(merit_received, "0.0", "MERIT_RECEIVED",
-                  "Multiplier of merit given with 'donate' command");
-  time_group->Add(max_donate_kin_distance, "-1", "MAX_DONATE_KIN_DIST",
-                  "Limit on distance of relation for donate; -1=no max");
-  time_group->Add(max_donate_edit_distance, "-1", "MAX_DONATE_EDIT_DIST",
-                  "Limit on genetic (edit) distance for donate; -1=no max");
-  time_group->Add(max_donates, "1000000", "MAX_DONATES",
-                  "Limit on number of donates organisms are allowed.");
-  
-  
-  // Geneology group
-  cConfigGroup * gen_group = new cConfigGroup("Geneology");
-  group_list.PushRear(gen_group);
-  
-  gen_group->Add(track_main_lineage, "1", "TRACK_MAIN_LINEAGE",
-                 "Keep all ancestors of the active population?\n0=no, 1=yes, 2=yes,w/sexual population");
-  gen_group->Add(threshold, "3", "THRESHOLD",
-                 "Number of organisms in a genotype needed for it\n  to be considered viable.");
-  gen_group->Add(genotype_print, "0", "GENOTYPE_PRINT",
-                 "0/1 (off/on) Print out all threshold genotypes?");
-  gen_group->Add(genotype_print_dom, "0", "GENOTYPE_PRINT_DOM",
-                 "Print out a genotype if it stays dominant for\n  this many updates. (0 = off)");
-  gen_group->Add(species_threshold, "2", "SPECIES_THRESHOLD",
-                 "max failure count for organisms to be same species");
-  gen_group->Add(species_recording, "0", "SPECIES_RECORDING",
-                 "1 = full, 2 = limited search (parent only)");
-  gen_group->Add(species_print, "0", "SPECIES_PRINT",
-                 "0/1 (off/on) Print out all species?");
-  gen_group->Add(test_cpu_time_mod, "20", "TEST_CPU_TIME_MOD",
-                 "Time allocated in test CPUs (multiple of length)");
-  
-  
-  // Log Files group
-  cConfigGroup * log_group = new cConfigGroup("Log Files");
-  group_list.PushRear(log_group);
-  
-  log_group->Add(log_creatures, "0", "LOG_CREATURES",
-                 "0/1 (off/on) toggle to print file.");
-  log_group->Add(log_genotypes, "0", "LOG_GENOTYPES",
-                 "0 = off, 1 = print ALL, 2 = print threshold ONLY.");
-  log_group->Add(log_threshold, "0", "LOG_THRESHOLD",
-                 "0/1 (off/on) toggle to print file.");
-  log_group->Add(log_species, "0", "LOG_SPECIES",
-                 "0/1 (off/on) toggle to print file.");
-  log_group->Add(log_landscape, "0", "LOG_LANDSCAPE",
-                 "0/1 (off/on) toggle to print file.");
-  
-  
-  // Viewer group
-  cConfigGroup * view_group = new cConfigGroup("Viewer Settings");
-  group_list.PushRear(view_group);
-  
-  view_group->Add(view_mode, "0", "VIEW_MODE",
-                  "Initial viewer screen");
-  
-  // Lineages group
-  cConfigGroup * lin_group = new cConfigGroup("Lineage");
-  lin_group->SetComment("NOTE: This should probably be called \"Clade\"\nThis one can slow down avida a lot. It is used to get an idea of how\noften an advantageous mutation arises, and where it goes afterwards.\nLineage creation options are.  Works only when LOG_LINEAGES is set to 1.\n  0 = manual creation (on inject, use successive integers as lineage labels).\n  1 = when a child's (potential) fitness is higher than that of its parent.\n  2 = when a child's (potential) fitness is higher than max in population.\n  3 = when a child's (potential) fitness is higher than max in dom. lineage\n*and* the child is in the dominant lineage, or (2)\n  4 = when a child's (potential) fitness is higher than max in dom. lineage\n(and that of its own lineage)\n  5 = same as child's (potential) fitness is higher than that of the\n      currently dominant organism, and also than that of any organism\n      currently in the same lineage.\n  6 = when a child's (potential) fitness is higher th!
 an any organism\n      currently in the same lineage.\n  7 = when a child's (potential) fitness is higher than that of any\n      organism in its line of descent");
-  
-  group_list.PushRear(lin_group);
-  
-  lin_group->Add(log_lineages, "0", "LOG_LINEAGES",
-                 "");
-  lin_group->Add(lineage_creation_method, "0", "LINEAGE_CREATION_METHOD",
-                 "");
-  
-}
-
-void cConfig::Setup(cGenesis & genesis)
-{
-  rand_seed = genesis.ReadInt("RANDOM_SEED");
-  cout << "Random Seed: " << rand_seed;
-  g_random.ResetSeed(rand_seed);
-  if( rand_seed != g_random.GetSeed() ) cout << " -> " << g_random.GetSeed();
-  cout << endl;
-  
-  tListIterator<cConfigGroup> group_it(group_list);
-  cConfigGroup * cur_group;
-  while ((cur_group = group_it.Next()) != NULL) {
-    cur_group->LoadValues(genesis);
-  }
-  
-  /***
-    * Handle any special modifications to any of the variables now that
-    * they've been loaded.
-    ***/
-  
-  // The default directory should end in a '/'.
-  char dir_tail = default_dir[default_dir.GetSize() - 1];
-  if (dir_tail != '\\' && dir_tail != '/') default_dir += "/";
-  
-  // Determine if any variables were set that require test CPUs to be run
-  // at every divide.
-  test_on_divide = false;
-  if ((revert_fatal > 0.0) || (revert_neg > 0.0) || (revert_neut > 0.0) ||
-      (revert_pos > 0.0) || (fail_implicit > 0)) {
-    test_on_divide = true;
-  }
-  
-  test_sterilize = false;
-  if ((sterilize_fatal > 0.0) || (sterilize_neg > 0.0) ||
-      (sterilize_neut > 0.0) || (sterilize_pos > 0.0)) {
-    test_sterilize = true;
-  }
-  
-  // Determine if we are only logging threshold genotypes...
-  log_threshold_only = false;
-  if (log_genotypes > 1) log_threshold_only = true;
-  
-  // Warn if there are settings in the genesis file that have not been read.
-  genesis.WarnUnused();
-  
-  // Test printing... @CAO
-  //  PrintGenesis("genesis.test");
-}
-
-void cConfig::Setup(int argc, char * argv[])
-{
-  /***
-  * Load all of the variables from genesis.
-  ***/
-  
-  default_dir = DEFAULT_DIR;
-  
-  cGenesis genesis;
-  genesis.SetVerbose();
-  ProcessConfiguration(argc, argv, genesis);
-  
-  Setup(genesis);
-}
-
-void cConfig::SetupMS()
-{
-#ifdef PLATFORM_WINDOWS
-  OSVERSIONINFO	osVersion;
-  
-  SetFileApisToOEM();             // use console character set for files
-  memset (&osVersion, 0, sizeof (osVersion));
-  osVersion.dwOSVersionInfoSize = sizeof (osVersion);
-  GetVersionEx (&osVersion);
-  if (osVersion.dwPlatformId == VER_PLATFORM_WIN32_NT) {
-    // Only need to set Code Pages for NT. Default console on Win95 is OEM.
-    // In fact, these APIs fail on Win95 w/ rc = 120 (API only works in NT
-    //  mode).
-    if (!SetConsoleCP (GetOEMCP()))        // and for Console input
-      cerr << "Warning: Unable to set input character set, rc="
-        << GetLastError() << endl;
-    if (!SetConsoleOutputCP (GetOEMCP()))  // and for Console output
-      cerr << "Warning: Unable to set output character set, rc="
-        << GetLastError() << endl;
-  }
-#endif
-}
-
-void cConfig::PrintGenesis(const cString & filename)
-{
-  ofstream fp(filename);
-  
-  // Print out the generic header, including the version ID.
-  fp << "#############################################################################" << endl
-    << "# This file includes all the basic run-time defines for avida." << endl
-    << "# For more information, see doc/genesis.html" << endl
-    << "#############################################################################" << endl
-    << endl
-    << "VERSION_ID " << VERSION << "   # Do not change this value."
-    << endl;
-  
-  // Loop through the groups, and print out all of the variables.
-  
-  tListIterator<cConfigGroup> group_it(group_list);
-  cConfigGroup * cur_group;
-  while ((cur_group = group_it.Next()) != NULL) {
-    // Print out the group name...
-    fp << endl;
-    fp << "### " << cur_group->GetName() << " ###" << endl;
-    
-    // If we have a comment about the current group, include it.
-    for (int i = 0; i < cur_group->GetComment().GetSize(); i++) {
-      fp << "# " << cur_group->GetComment().GetLine(i) << endl;
-    }
-    
-    // Print out everything for this group...
-    tListIterator<cConfigEntryBase> entry_it(cur_group->GetEntries());
-    cConfigEntryBase * cur_entry;
-    
-    // First, figure out the widest entry so we know where to put comments.
-    int max_width = 0;
-    while ((cur_entry = entry_it.Next()) != NULL) {
-      int cur_width = cur_entry->GetTag().GetSize() +
-      cur_entry->GetDefault().GetSize() + 1;
-      if (cur_width > max_width) max_width = cur_width;
-    }
-    
-    // Now, make a second pass printing everything.
-    entry_it.Reset();
-    while ((cur_entry = entry_it.Next()) != NULL) {
-      int cur_width = cur_entry->GetTag().GetSize() +
-      cur_entry->GetDefault().GetSize() + 1;
-      // Print the variable and its setting...
-      fp << cur_entry->GetTag() << " " << cur_entry->GetDefault();
-      
-      // Print some spaces before the description.
-      for (int i = cur_width; i < max_width; i++) fp << " ";
-      
-      // Print the first line of the description.
-      if (cur_entry->GetDesc().GetSize() == 0) {
-        fp << "  # " << endl;
-      } else {
-        fp << "  # " << cur_entry->GetDesc().GetLine(0) << endl;
-      }
-      
-      // Print the remaining lines of a description.
-      for (int i = 1; i < cur_entry->GetDesc().GetSize(); i++) {
-        for (int j = 0; j < max_width; j++) fp << " ";
-        fp << "  # " << cur_entry->GetDesc().GetLine(i) << endl;
-      }
-    }
-  }
-}
-
-//  void cConfig::PerturbTaskSet(double max_factor)
-//  {
-//    default_task_lib->Perturb(max_factor);
-//  }
-
-//  void cConfig::ChangeTaskSet(double prob_change, double min_bonus,
-//  			    double max_bonus)
-//  {
-//    default_task_lib->Change(prob_change, min_bonus, max_bonus);
-//  }
-
-
-// This function takes in the genesis file and the input arguments, and puts
-// out a pointer to a built-up cGenesis object.
-
-// @COW This function depends on the inclusion of the file
-// 'vent/cPopulation_descr.ci' for the automatic event documentation.
-// If you move the function away from here, move this include as well.
-
-
-void cConfig::ProcessConfiguration(int argc, char * argv[], cGenesis & genesis)
-{
-  const cString default_filename = "genesis";
-  genesis_filename = default_filename;
-  
-  int arg_num = 1;              // Argument number being looked at.
-  analyze_mode = false;         // Initialize analyze_mode tp be off.
-  primitive_mode = false;       // Initialize primitive_mode tp be off.
-  interactive_analyze = false;  // Don't start analyze interactively either.
-  
-  // Load all of the args into string objects for ease of access.
-  cString * args = new cString[argc];
-  for (int i = 0; i < argc; i++) args[i] = argv[i];
-  
-  
-  // -genesis option
-  
-  if (argc > 1 && (args[1] == "-g" || args[1] == "-genesis")) {
-    if (argc < 3) {
-      cerr << "Need filename for genesis file used." << endl;
-      exit(0);
-    }
-    genesis_filename = args[2];
-    arg_num += 2;
-  }
-  
-  
-  // Open and verify the genesis file.
-  
-  genesis.Open(genesis_filename);
-  
-  // If we failed to open the genesis file, and we are using the default,
-  // try creating it.
-  if (genesis.IsOpen() == false && genesis_filename == default_filename) {
-    cerr << "Warning: Unable to find file '" << genesis_filename
-    << "'.  Creating." << endl;
-    PrintGenesis(genesis_filename);
-    genesis.Open(genesis_filename);
-  }
-  
-  cString version_id = genesis.ReadString("VERSION_ID", "Unknown");
-  if (genesis.IsOpen() == true && version_id != VERSION) {
-    cerr << "/  WARNING   WARNING   WARNING   WARNING   WARNING  \\" << endl
-    << "|   Using incorrect genesis file.                   |" << endl
-    << "|   Version needed = \"" << VERSION
-    << "\".  Version used = \"" << version_id() << "\"   |" << endl
-    << "\\  WARNING   WARNING   WARNING   WARNING   WARNING  /" << endl
-    << endl;
-  }
-  
-  // Then scan through and process the rest of the args.
-  
-  while (arg_num < argc || genesis.IsOpen() == false) {
-    cString cur_arg = genesis.IsOpen() ? static_cast<cString>( args[arg_num] ) : static_cast<cString>( "--help" );
-    
-    // Test against the possible inputs.
-    if (cur_arg == "-events" || cur_arg == "-e") {
-      cout << "Known events:" << endl;
-      // @DMB - A cleaner way of constructing the cEventFactoryManager should be created
-      cEventFactoryManager event_manager;
-      event_manager.AddFactory(new cPopulationEventFactory(NULL));
-      event_manager.PrintAllEventDescriptions();
-      exit(0);
-    }
-    else if (cur_arg == "--help" || cur_arg == "-help" ||
-             cur_arg == "-h"     || genesis.IsOpen() == false) {
-      cout << "Options:"<<endl
-      << "  -g[enesis] <filename> Set genesis file to be <filename>"<<endl
-      << "  -h[elp]               Help on options (this listing)"<<endl
-      << "  -e[vents]             Print a list of all known events"<< endl
-      << "  -s[eed] <value>       Set random seed to <value>"<<endl
-      << "  -viewer <value>       Sets Viewer to <value>"<<endl
-      << "  -v[ersion]            Prints the version number"<<endl
-      << "  -set <name> <value>   Overide the genesis file"<<endl
-      << "  -l[oad] <filename>    Load a clone file"<<endl
-      << "  -loadpop <filename>   Load a saved population file (precedence over load)"<<endl
-      << "  -a[nalyze]            Process analyze.cfg instead of normal run."<<endl
-      << "  -i[nteractive]        Run analyze mode interactively."
-      // << "  -p[rimitive]          Overide viewer to be primitive."<<endl
-      << endl;
-      
-      exit(0);
-    }
-    else if (cur_arg == "-seed" || cur_arg == "-s") {
-      int in_seed = 0;
-      if (arg_num + 1 == argc || args[arg_num + 1][0] == '-') {
-        cerr<<"Must include a number as the random seed!"<<endl;
-        exit(0);
-      } else {
-        arg_num++;  if (arg_num < argc) cur_arg = args[arg_num];
-        in_seed = cur_arg.AsInt();
-      }
-      genesis.AddInput("RANDOM_SEED", in_seed);
-    } else if (cur_arg == "-analyze" || cur_arg == "-a") {
-      analyze_mode = true;
-    } else if (cur_arg == "-interactive" || cur_arg == "-i") {
-      analyze_mode = true;
-      interactive_analyze = true;
-    } else if (cur_arg == "-primitive" || cur_arg == "-p") {
-      primitive_mode = true;
-    } else if (cur_arg == "-load" || cur_arg == "-l") {
-      if (arg_num + 1 == argc || args[arg_num + 1][0] == '-') {
-        cerr<<"Must include a filename to load from"<<endl;
-        exit(0);
-      } else {
-        arg_num++;  if (arg_num < argc) cur_arg = args[arg_num];
-        clone_filename = cur_arg;
-      }
-    } else if (cur_arg == "-loadpop" || cur_arg == "-lp") {
-      if (arg_num + 1 == argc || args[arg_num + 1][0] == '-') {
-        cerr<<"Must include a filename to load from"<<endl;
-        exit(0);
-      } else {
-        arg_num++;  if (arg_num < argc) cur_arg = args[arg_num];
-        load_pop_filename = cur_arg;
-      }
-    } else if (cur_arg == "-version" || cur_arg == "-v") {
-      cout << " by Charles Ofria" << endl;
-      cout << " designed by Charles Ofria, Chris Adami, Travis Collier, C. Titus Brown, and Claus Wilke" << endl;
-      cout << " For more information, see: http://devolab.cse.msu.edu/software/avida/" << endl;
-      exit(0);
-    } else if (cur_arg == "-set") {
-      if (arg_num + 1 == argc || arg_num + 2 == argc) {
-        cerr << "'-set' option must be followed by name and value" << endl;
-        exit(0);
-      }
-      arg_num++;  if (arg_num < argc) cur_arg = args[arg_num];
-      cString name(cur_arg);
-      arg_num++;  if (arg_num < argc) cur_arg = args[arg_num];
-      cString value(cur_arg);
-      cout << "SET " << name() << " = " << value() << endl;
-      genesis.AddInput(name(), value());
-      
-    } else if (cur_arg == "-g" || cur_arg == "-genesis") {
-      cerr << "Error: -g[enesis] option must be listed first." << endl;
-      exit(0);
-    } else {
-      cerr << "Unknown Option: " << argv[arg_num] << endl
-      << "Type: \"" << argv[0] << " -h\" for a full option list." << endl;
-      exit(0);
-    }
-    
-    arg_num++;  if (arg_num < argc) cur_arg = args[arg_num];
-  }
-  
-  delete [] args;
-}

Deleted: branches/brysonda/source/main/cConfig.h
===================================================================
--- branches/brysonda/source/main/cConfig.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cConfig.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,503 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (C) 1993 - 2003 California Institute of Technology             //
-//                                                                          //
-// Read the COPYING and README files, or contact 'avida at alife.org',         //
-// before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef CONFIG_HH
-#define CONFIG_HH
-
-#ifndef GENESIS_HH
-#include "cGenesis.h"
-#endif
-#ifndef STRING_LIST_HH
-#include "cStringList.h"
-#endif
-#ifndef TLIST_HH
-#include "tList.h"
-#endif
-#include "nGeometry.h"
-
-#define SLICE_CONSTANT         0
-#define SLICE_PROB_MERIT       1
-#define SLICE_INTEGRATED_MERIT 2
-
-#define POSITION_CHILD_RANDOM           0
-#define POSITION_CHILD_AGE              1
-#define POSITION_CHILD_MERIT            2
-#define POSITION_CHILD_EMPTY            3
-#define NUM_LOCAL_POSITION_CHILD        4
-
-#define POSITION_CHILD_FULL_SOUP_RANDOM 4
-#define POSITION_CHILD_FULL_SOUP_ELDEST 5
-#define POSITION_CHILD_DEME_RANDOM      6
-
-#define DEATH_METHOD_OFF       0
-#define DEATH_METHOD_CONST     1
-#define DEATH_METHOD_MULTIPLE  2
-
-#define ALLOC_METHOD_DEFAULT   0
-#define ALLOC_METHOD_NECRO     1
-#define ALLOC_METHOD_RANDOM    2
-
-#define DIVIDE_METHOD_OFFSPRING 0
-#define DIVIDE_METHOD_SPLIT     1
-#define DIVIDE_METHOD_BIRTH     2
-
-#define GENERATION_INC_OFFSPRING 0
-#define GENERATION_INC_BOTH      1
-
-#define TASK_MERIT_OFF         0
-#define TASK_MERIT_EXPONENTIAL 1
-#define TASK_MERIT_LINEAR      2
-
-#define SIZE_MERIT_OFF         0
-#define SIZE_MERIT_COPIED      1
-#define SIZE_MERIT_EXECUTED    2
-#define SIZE_MERIT_FULL        3
-#define SIZE_MERIT_LEAST       4
-#define SIZE_MERIT_SQRT_LEAST  5
-
-class cString; // aggregate
-class cStringList; // aggregate
-class cGenesis;
-template <class T> class tList; // aggregate
-template <class T> class tListIterator; // aggregate
-
-class cConfig {
-protected:
-  class cConfigEntryBase {
-  protected:
-    const cString genesis_tag;
-    const cString default_value;
-    const cStringList description;
-  public:
-    cConfigEntryBase(const cString & _tag, const cString & _def,
-		     const cString & _desc)
-      : genesis_tag(_tag), default_value(_def), description(_desc, '\n') { ; }
-    virtual ~cConfigEntryBase(){}
-
-    //    virtual ~cConfigEntryBase();
-    const cString & GetTag() { return genesis_tag; }
-    const cString & GetDefault() { return default_value; }
-    const cStringList & GetDesc() { return description; }
-
-    virtual bool LoadValue(cGenesis & genesis) = 0;
-  };
-
-  template <class T> class tConfigEntry : public cConfigEntryBase {
-  private:
-    T & variable;
-  public:
-    tConfigEntry(T & _var, const cString & _def, const cString & _tag,
-		 const cString _desc)
-      : cConfigEntryBase(_tag, _def, _desc), variable(_var)
-    { ; }
-
-    bool LoadValue(cGenesis & genesis) {
-      genesis.Read(variable, genesis_tag, default_value);
-      return true;
-    }
-  };
-
-  class cConfigGroup {
-  private:
-    const cString group_name;
-    cStringList comment;
-    tList<cConfigEntryBase> group_entries;
-  public:
-    cConfigGroup(const cString & _name) : group_name(_name) { ; }
-    ~cConfigGroup() {
-      while (group_entries.GetSize() > 0) delete group_entries.Pop();
-    }
-
-    void SetComment(const cString & _comment) { comment.Load(_comment, '\n'); }
-
-    const cString & GetName() { return group_name; }
-    const cStringList & GetComment() { return comment; }
-    tList<cConfigEntryBase> & GetEntries() { return group_entries; }
-
-    void LoadValues(cGenesis & genesis) {
-      tListIterator<cConfigEntryBase> group_it(group_entries);
-      cConfigEntryBase * cur_entry;
-      while ((cur_entry = group_it.Next()) != NULL) {
-	cur_entry->LoadValue(genesis);
-      }
-    };
-
-    void Add(int & _var, const cString &  _def, const cString & _tag,
-	     const cString & _desc)
-    {
-      group_entries.
-	PushRear(new cConfig::tConfigEntry<int>(_var,_def,_tag,_desc));
-    }
-
-    void Add(double & _var, const cString & _def, const cString & _tag,
-	     const cString & _desc)
-    {
-      group_entries.
-	PushRear(new cConfig::tConfigEntry<double>(_var,_def,_tag,_desc));
-    }
-
-    void Add(cString & _var, const cString & _def, const cString & _tag,
-	     const cString & _desc)
-    {
-      group_entries.
-	PushRear(new cConfig::tConfigEntry<cString>(_var,_def,_tag,_desc));
-    }
-
-    void Add(bool & _var, const cString & _def, const cString & _tag,
-	     const cString & _desc)
-    {
-      group_entries.
-	PushRear(new cConfig::tConfigEntry<bool>(_var,_def,_tag,_desc));
-    }
-  };
-
-  // Collection of genesis groups...
-  static tList<cConfigGroup> group_list;
-
-  // Major Configurations
-  static bool analyze_mode;     // Should avida do only analysis work?
-  static bool primitive_mode;   // Should avida run in primitive mode?
-  static bool interactive_analyze; // Should analyze mode be interactive?
-
-  // Config Filenames
-  static cString default_dir;
-  static cString genesis_filename;
-  static cString inst_filename;
-  static cString event_filename;
-  static cString analyze_filename;
-  static cString env_filename;
-
-  static cString start_creature;
-  static cString clone_filename;
-  static cString load_pop_filename;
-
-  // Archetecture
-  static int max_updates;
-  static int max_generations;
-  static int end_condition_mode;
-  static int world_x;
-  static int world_y;
-  static int world_geometry;
-  static int num_demes;
-  static int rand_seed;
-
-  // Mutations
-  static double point_mut_prob;
-  static double copy_mut_prob;
-  static double ins_mut_prob;
-  static double del_mut_prob;
-  static double div_mut_prob;
-  static double divide_mut_prob;
-  static double divide_ins_prob;
-  static double divide_del_prob;
-  static double parent_mut_prob;
-  static int special_mut_line;
-
-  // CPU Configutation
-  static int num_instructions;
-  static int hardware_type;
-  static int max_cpu_threads;
-  static double thread_slicing_method;
-
-  // Merit info
-  static int size_merit_method;
-  static int base_size_merit;
-  static double default_bonus;
-  static int ave_time_slice;
-
-  // Task info
-  static int num_tasks;
-  static int num_reactions;
-  static int num_resources;
-
-  // Task Merit Method
-  static int task_merit_method;
-  static int merit_time;
-
-  // Transfering merits...
-  static double merit_given;
-  static double merit_received;
-  static int max_donate_kin_distance;
-  static int max_donate_edit_distance;
-  static int max_donates;
-
-  // Methodology
-  static int slicing_method;
-  static int birth_method;
-  static int prefer_empty;
-  static int death_method;
-  static int alloc_method;
-  static int divide_method;
-  static double recomb_prob;
-  static int num_modules;
-  static int cont_rec_regs;
-  static int corespond_rec_regs;
-  static int two_fold_cost_sex;
-  static int same_length_sex;
-  static int required_task;
-  static int immunity_task;
-  static int required_reaction;
-  static int lineage_creation_method;
-  static int generation_inc_method;
-  static int age_limit;
-  static double age_deviation;
-  static double child_size_range;
-  static double min_copied_lines;
-  static double min_exe_lines;
-  static int require_allocate;
-  static int max_label_exe_size;
-
-  // For specialized experiments -- mutation reversion.
-  static bool test_on_divide;
-  static bool test_sterilize;
-  static double revert_fatal;
-  static double revert_neg;
-  static double revert_neut;
-  static double revert_pos;
-  static double sterilize_fatal;
-  static double sterilize_neg;
-  static double sterilize_neut;
-  static double sterilize_pos;
-  static int fail_implicit;
-
-  // Genealogy & Recording
-  static int species_threshold;
-  static int threshold;
-  static int genotype_print;
-  static int species_print;
-  static int species_recording;
-  static int genotype_print_dom;
-  static int test_cpu_time_mod;
-  static int track_main_lineage;
-
-  // Log files...
-  static bool log_threshold_only;
-
-  static bool log_creatures;
-  static int log_genotypes;
-  static bool log_threshold;
-  static bool log_species;
-  static bool log_landscape;
-  static bool log_mutations;
-  static bool log_lineages;
-
-  // Debugging
-  static int debug_level;
-
-  // Viewer
-  static int view_mode;
-
-  // Death
-  static double die_prob; 
-
-  // Other functions...
-  static void ProcessConfiguration(int argc, char* argv[], cGenesis & genesis);
-public:
-  static void InitGroupList();
-  static void Setup(cGenesis & genesis);
-  static void Setup(int argc, char * argv[]);
-  static void SetupMS();
-  static void PrintGenesis(const cString & filename);
-
-  // ``Get''
-  static bool GetAnalyzeMode() { return analyze_mode; }
-  static bool GetPrimitiveMode() { return primitive_mode; }
-  static bool GetInteractiveAnalyze() { return interactive_analyze; }
-
-  /*
-  addition to permit access to cConfig::default_dir for use in locating
-  preset_organisms subdirectory (accessed in godbox widget).
-  -- kaben.
-  */
-  static cString & GetDefaultDir() { return default_dir; }
-  /* -- kaben. */
-
-  static cString & GetGenesisFilename() { return genesis_filename; }
-  static cString & GetInstFilename()  { return inst_filename; }
-  static cString & GetEventFilename() { return event_filename; }
-  static cString & GetAnalyzeFilename() { return analyze_filename; }
-  static cString & GetEnvironmentFilename() { return env_filename; }
-
-  static cString & GetStartCreature() { return start_creature; }
-  static cString & GetCloneFilename() { return clone_filename; }
-  static cString & GetLoadPopFilename() { return load_pop_filename; }
-
-  static int GetMaxUpdates()     { return max_updates; }
-  static int GetMaxGenerations() { return max_generations; }
-  static int GetEndConditionMode() { return end_condition_mode; }
-  static int GetWorldX()         { return world_x; }
-  static int GetWorldY()         { return world_y; }
-  static int GetWorldGeometry()  { return world_geometry; }
-  static int GetNumDemes()       { return num_demes; }
-  static int GetRandSeed()       { return rand_seed; }
-
-  static double GetPointMutProb()  { return point_mut_prob; }
-  static double GetCopyMutProb()   { return copy_mut_prob; }
-  static double GetInsMutProb()    { return ins_mut_prob; }
-  static double GetDelMutProb()    { return del_mut_prob; }
-  static double GetDivMutProb()    { return div_mut_prob; }
-  static double GetDivideMutProb() { return divide_mut_prob; }
-  static double GetDivideInsProb() { return divide_ins_prob; }
-  static double GetDivideDelProb() { return divide_del_prob; }
-  static double GetParentMutProb() { return parent_mut_prob; }
-  static int GetSpecialMutLine() { return special_mut_line; }
-
-  static int GetNumInstructions() { return num_instructions; }
-  static int GetHardwareType() { return hardware_type; }
-  static int GetMaxCPUThreads() { return max_cpu_threads; }
-  static double GetThreadSlicingMethod() { return thread_slicing_method; }
-
-  static int GetSizeMeritMethod() { return size_merit_method; }
-  static int GetBaseSizeMerit()  { return base_size_merit; }
-  static double GetDefaultBonus() { return default_bonus; }
-  static int GetTaskMeritMethod() { return task_merit_method; }
-  static int GetMaxLabelExeSize() { return max_label_exe_size; }
-
-  static int GetMeritTime() { return merit_time; }
-
-  static double GetMeritGiven() { return merit_given; }
-  static double GetMeritReceived() { return merit_received; }
-  static int GetMaxDonateKinDistance() { return max_donate_kin_distance; }
-  static int GetMaxDonateEditDistance() { return max_donate_edit_distance; }
-  static int GetMaxDonates() { return max_donates; }
-
-  static int GetNumTasks() { return num_tasks; }
-  static int GetNumReactions() { return num_reactions; }
-  static int GetNumResources() { return num_resources; }
-
-  static int GetSlicingMethod() { return slicing_method; }
-  static int GetBirthMethod() { return birth_method; }
-  static int GetPreferEmpty() { return prefer_empty; }
-  static int GetDeathMethod() { return death_method; }
-  static int GetAllocMethod() { return alloc_method; }
-  static int GetDivideMethod() { return divide_method; }
-  static double GetRecombProb() { return recomb_prob; }
-  static int GetNumModules() { return num_modules; }
-  static int GetContRecRegs() { return cont_rec_regs; }
-  static int GetCorespondRecRegs() { return corespond_rec_regs; }
-  static int GetTwoFoldCostSex() { return two_fold_cost_sex; }
-  static int GetSameLengthSex() { return same_length_sex; }
-  static int GetRequiredTask() { return required_task; }
-  static int GetImmunityTask() { return immunity_task; }
-  static int GetRequiredReaction() { return required_reaction; }
-  static int GetLineageCreationMethod() { return lineage_creation_method; }
-  static int GetGenerationIncMethod() { return generation_inc_method; }
-  static int GetAgeLimit() { return age_limit; }
-  static double GetAgeDeviation() { return age_deviation; }
-  static double GetChildSizeRange() { return child_size_range; }
-  static double GetMinCopiedLines() { return min_copied_lines; }
-  static double GetMinExeLines() { return min_exe_lines; }
-  static int GetRequireAllocate() { return require_allocate; }
-
-  static bool GetTestOnDivide() { return test_on_divide; }
-  static bool GetTestSterilize() { return test_sterilize; }
-  static double GetRevertFatal() { return revert_fatal; }
-  static double GetRevertNeg() { return revert_neg; }
-  static double GetRevertNeut() { return revert_neut; }
-  static double GetRevertPos() { return revert_pos; }
-  static double GetSterilizeFatal() { return sterilize_fatal; }
-  static double GetSterilizeNeg() { return sterilize_neg; }
-  static double GetSterilizeNeut() { return sterilize_neut; }
-  static double GetSterilizePos() { return sterilize_pos; }
-  static int GetFailImplicit() { return fail_implicit; }
-
-
-  static int GetAveTimeslice() { return ave_time_slice; }
-  static int GetSpeciesThreshold() { return species_threshold; }
-  static int GetThreshold() { return threshold; }
-  static int GetGenotypePrint() { return genotype_print; }
-  static int GetSpeciesPrint() { return species_print; }
-  static int GetSpeciesRecording() { return species_recording; }
-  static int GetGenotypePrintDom() { return genotype_print_dom; }
-  static int GetTestCPUTimeMod() { return test_cpu_time_mod; }
-  static int GetTrackMainLineage() { return track_main_lineage; }
-
-
-  static bool GetLogThresholdOnly()  { return log_threshold_only; }
-
-  static bool GetLogCreatures() { return log_creatures; }
-  static int GetLogGenotypes() { return log_genotypes; }
-  static bool GetLogThreshold() { return log_threshold; }
-  static bool GetLogSpecies()   { return log_species; }
-  static bool GetLogLandscape() { return log_landscape; }
-  static bool GetLogLineages()  { return log_lineages; }
-
-  static int GetDebugLevel() { return debug_level; }
-
-  static int GetViewMode() { return view_mode; }
-
-  static double GetDieProb() { return die_prob; }
-
-
-  // ``Set''
-  static void SetInstFilename(const cString & in_name)
-    { inst_filename = in_name; }
-  static void SetEventFilename(const cString & in_name)
-    { event_filename = in_name; }
-  static void SetAnalyzeFilename(const cString & in_name)
-    { analyze_filename = in_name; }
-  static void SetEnvironmentFilename(const cString & in_name)
-    { env_filename = in_name; }
-
-  static void SetMaxUpdates(int in_max_updates)
-    { max_updates = in_max_updates; }
-  static void SetMaxGenerations(int _in)
-    { max_generations = _in; }
-  static void SetEndConditionMode(int _in)
-    { end_condition_mode = _in; }
-
-  static void SetCopyMutProb(double _in)  { copy_mut_prob = _in; }
-  static void SetDivMutProb(double _in)  { div_mut_prob = _in; }
-  static void SetPointMutProb(double _in) { point_mut_prob = _in; }
-
-  /*
-  addition to permit tweaking of ins_mut_prob, del_mut_prob from godbox
-  widget.
-  -- kaben.
-  */
-  static void SetInsMutProb(double _in)  { ins_mut_prob = _in; }
-  static void SetDelMutProb(double _in) { del_mut_prob = _in; }
-  /* -- kaben. */
-
-  static void SetNumInstructions(int in_num_instructions)
-    { num_instructions = in_num_instructions; }
-  static void SetHardwareType(int in_htype) { hardware_type = in_htype; }
-  static void SetMaxCPUThreads(int in_threads)
-    { max_cpu_threads = in_threads; }
-
-  static void SetSizeMeritMethod(int in_merit_method)
-    { size_merit_method = in_merit_method; }
-  static void SetBaseSizeMerit(int in_base_size_merit)
-    { base_size_merit = in_base_size_merit; }
-  static void SetDefaultBonus(int in_default_bonus)
-    { default_bonus = in_default_bonus; }
-
-  static void SetBirthMethod(int in_birth_method)
-    { birth_method = in_birth_method; }
-  static void SetPreferEmpty(int in_prefer_empty)
-    { prefer_empty = in_prefer_empty; }
-  static void SetDeathMethod(int in_death_method)
-    { death_method = in_death_method; }
-  static void SetAllocMethod(int in_alloc_method)
-    { alloc_method = in_alloc_method; }
-  static void SetDivideMethod(int in_divide_method)
-    { divide_method = in_divide_method; }
-  static void SetLineageCreationMethod( int in_lineage_creation_method )
-    { lineage_creation_method = in_lineage_creation_method; }
-  static void SetGenerationIncMethod(int in_generation_inc_method)
-    { generation_inc_method = in_generation_inc_method; }
-  static void SetAgeLimit(int in_age_limit) { age_limit = in_age_limit; }
-  static void SetAgeDeviation(double in_dev) { age_deviation = in_dev; }
-
-  static void SetAveTimeslice(int in_slice) { ave_time_slice = in_slice; }
-
-  static void SetNumTasks(int in_num) { num_tasks = in_num; }
-  static void SetNumReactions(int in_num) { num_reactions = in_num; }
-  static void SetNumResources(int in_num) { num_resources = in_num; }
-};
-
-#endif

Modified: branches/brysonda/source/main/cEnvironment.cc
===================================================================
--- branches/brysonda/source/main/cEnvironment.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cEnvironment.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -5,61 +5,25 @@
 // before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
 //////////////////////////////////////////////////////////////////////////////
 
-#ifndef ENVIRONMENT_HH
 #include "cEnvironment.h"
-#endif
 
-#ifndef INIT_FILE_HH
+#include "cHardwareManager.h"
 #include "cInitFile.h"
-#endif
-#ifndef nMutation_h
 #include "nMutation.h"
-#endif
-#ifndef cRandom_h
 #include "cRandom.h"
-#endif
-#ifndef REACTION_HH
 #include "cReaction.h"
-#endif
-#ifndef nReaction_h
 #include "nReaction.h"
-#endif
-#ifndef REACTION_PROCESS_HH
 #include "cReactionProcess.h"
-#endif
-#ifndef REACTION_REQUISITE_HH
 #include "cReactionRequisite.h"
-#endif
-#ifndef REACTION_RESULT_HH
 #include "cReactionResult.h"
-#endif
-#ifndef RESOURCE_HH
 #include "cResource.h"
-#endif
-#ifndef STRING_UTIL_HH
 #include "cStringUtil.h"
-#endif
-#ifndef TASK_ENTRY_HH
 #include "cTaskEntry.h"
-#endif
-#ifndef TOOLS_HH
 #include "cTools.h"
-#endif
+#include "cWorld.h"
 
 using namespace std;
 
-cEnvironment::cEnvironment()
-{
-}
-
-// cEnvironment::cEnvironment(const cString & filename)
-// {
-//   if (Load(filename) == false) {
-//     cerr << "Unable to load environment... aborting!" << endl;
-//     abort();
-//   }
-// }
-
 bool cEnvironment::ParseSetting(cString entry, cString & var_name,
 				cString & var_value, const cString & var_type)
 {
@@ -213,7 +177,7 @@
       new_process->SetConversion(var_value.AsDouble());
     }
     else if (var_name == "inst") {
-      new_process->SetInstID( inst_set.GetInst(var_value).GetOp() );
+      new_process->SetInstID( m_world->GetHardwareManager().GetInstSet().GetInst(var_value).GetOp() );
     }
     else if (var_name == "lethal") {
       if (!AssertInputBool(var_value, "lethal", var_type)) 
@@ -940,7 +904,7 @@
 {
   cReaction * found_reaction = reaction_lib.GetReaction(name);
   if (found_reaction == NULL) return false;
-  found_reaction->ModifyInst( inst_set.GetInst(inst_name).GetOp() );
+  found_reaction->ModifyInst( m_world->GetHardwareManager().GetInstSet().GetInst(inst_name).GetOp() );
   return true;
 }
 

Modified: branches/brysonda/source/main/cEnvironment.h
===================================================================
--- branches/brysonda/source/main/cEnvironment.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cEnvironment.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -8,7 +8,7 @@
 #ifndef ENVIRONMENT_HH
 #define ENVIRONMENT_HH
 
-#ifndef INST_SET_HH
+#ifndef cInstSet_h
 #include "cInstSet.h"
 #endif
 #ifndef MUTATION_LIB_HH
@@ -47,9 +47,12 @@
 class cReactionProcess;
 class cReactionResult;
 template <class T> class tBuffer;
+class cWorld;
 
 class cEnvironment {
 private:
+  cWorld* m_world;
+  
   // Keep libraries of resources, reactions, and tasks.
   cResourceLib resource_lib;
   cReactionLib reaction_lib;
@@ -88,8 +91,7 @@
   // disabled copy constructor.
   cEnvironment(const cEnvironment &);
 public:
-  cEnvironment();
-  // cEnvironment(const cString & filename);
+  cEnvironment(cWorld* world) : m_world(world) { ; }
   ~cEnvironment() { ; }
 
   /**
@@ -126,12 +128,10 @@
   const cReactionLib & GetReactionLib() const { return reaction_lib; }
   const cMutationLib & GetMutationLib() const { return mutation_lib; }
   const cTaskLib & GetTaskLib() const { return task_lib; }
-  const cInstSet & GetInstSet() const { return inst_set; }
   const cMutationRates & GetMutRates() const { return mut_rates; }
 
   cResourceLib & GetResourceLib() { return resource_lib; }
   cReactionLib & GetReactionLib() { return reaction_lib; }
-  cInstSet & GetInstSet() { return inst_set; }
   cMutationRates & GetMutRates() { return mut_rates; }
 
   double GetReactionValue(int & reaction_id);

Modified: branches/brysonda/source/main/cFitnessMatrix.cc
===================================================================
--- branches/brysonda/source/main/cFitnessMatrix.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cFitnessMatrix.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -9,7 +9,7 @@
 #include "cFitnessMatrix.h"
 #endif
 
-#ifndef INST_SET_HH
+#ifndef cInstSet_h
 #include "cInstSet.h"
 #endif
 

Modified: branches/brysonda/source/main/cGenebank.cc
===================================================================
--- branches/brysonda/source/main/cGenebank.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cGenebank.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -5,43 +5,27 @@
 // before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
 //////////////////////////////////////////////////////////////////////////////
 
-#ifndef GENEBANK_HH
 #include "cGenebank.h"
-#endif
 
-#ifndef CONFIG_HH
-#include "cConfig.h"
-#endif
-#ifndef GENOTYPE_HH
 #include "cGenotype.h"
-#endif
-#ifndef SPECIES_HH
 #include "cSpecies.h"
-#endif
-#ifndef STATS_HH
 #include "cStats.h"
-#endif
-#ifndef TEST_UTIL_HH
+#include "cStringList.h"
 #include "cTestUtil.h"
-#endif
+#include "cWorld.h"
 
-
 using namespace std;
 
 
-///////////////
-//  cGenebank
-///////////////
-
-cGenebank::cGenebank(cStats & _stats)
-  : stats(_stats)
+cGenebank::cGenebank(cWorld* world, cStats & _stats)
+  : m_world(world), stats(_stats)
 {
   for (int i = 0; i < MAX_CREATURE_SIZE; i++) {
     genotype_count[i] = 0;
   }
 
-  genotype_control = new cGenotypeControl(*this);
-  species_control  = new cSpeciesControl(*this);
+  genotype_control = new cGenotypeControl(world, *this);
+  species_control  = new cSpeciesControl(world, *this);
 
 }
 
@@ -65,7 +49,7 @@
   }
   else {
     genotype_dom_time++;
-    if (genotype_dom_time == cConfig::GetGenotypePrintDom()) {
+    if (genotype_dom_time == m_world->GetConfig().GENOTYPE_PRINT_DOM.Get()) {
       cString filename;
       filename.Set("genebank/%s", best_genotype->GetName()());
       cTestUtil::PrintGenome(best_genotype->GetGenome(), 
@@ -147,7 +131,7 @@
 			       parent_genotype->GetLineageLabel(), list_num);
 
   if (!found_genotype) {
-    found_genotype = new cGenotype(stats.GetUpdate());
+    found_genotype = new cGenotype(m_world, stats.GetUpdate());
     found_genotype->SetGenome(in_genome);
     found_genotype->SetParent(parent_genotype, parent2_genotype);    
     AddGenotype(found_genotype, list_num);
@@ -168,7 +152,7 @@
     FindGenotype(in_genome, lineage_label, list_num);
 
   if (!found_genotype) {
-    found_genotype = new cGenotype(stats.GetUpdate());
+    found_genotype = new cGenotype(m_world, stats.GetUpdate());
     found_genotype->SetGenome(in_genome);
     found_genotype->SetParent(NULL, NULL);
     found_genotype->SetLineageLabel(lineage_label);
@@ -240,7 +224,7 @@
     active_genotypes[list_num].Remove(&in_genotype);
     genotype_control->Remove(in_genotype);
     in_genotype.Deactivate(stats.GetUpdate());
-    if (cConfig::GetTrackMainLineage()) {
+    if (m_world->GetConfig().TRACK_MAIN_LINEAGE.Get()) {
       genotype_control->InsertHistoric(in_genotype);
     }
   }
@@ -248,7 +232,7 @@
   // If we are tracking the main lineage, we only want to delete a
   // genotype when all of its decendents have also died out.
 
-  const int lineage_type = cConfig::GetTrackMainLineage();
+  const int lineage_type = m_world->GetConfig().TRACK_MAIN_LINEAGE.Get();
   if (lineage_type > 0) {
     // If  there are more offspring genotypes, hold off on deletion...
     if (in_genotype.GetNumOffspringGenotypes() != 0) return;
@@ -351,7 +335,7 @@
   // If speciation is on, assign a species to the genotype now that it is
   // threshold.
 
-  if (cConfig::GetSpeciesRecording()) {
+  if (m_world->GetConfig().SPECIES_RECORDING.Get()) {
     // Record the old species to know if it changes.
 
     cSpecies * old_species = in_genotype.GetSpecies();
@@ -359,7 +343,7 @@
     // Determine the "proper" species.
 
     found_species = species_control->Find(in_genotype,
-					  cConfig::GetSpeciesRecording());
+					  m_world->GetConfig().SPECIES_RECORDING.Get());
 
     // If no species was found, create a new one.
 
@@ -372,7 +356,7 @@
 
       // Since this is a new species, see if we should be printing it.
 
-      if (cConfig::GetSpeciesPrint()) {
+      if (m_world->GetConfig().SPECIES_PRINT.Get()) {
 	cString filename;
 	filename.Set("genebank/spec-%04d", found_species->GetID());
 	cTestUtil::PrintGenome(in_genotype.GetGenome(), filename,
@@ -415,7 +399,7 @@
 
   // Do the relevent statistics...
 
-  if (cConfig::GetSpeciesRecording()) {
+  if (m_world->GetConfig().SPECIES_RECORDING.Get()) {
     stats.AddThreshold(in_genotype.GetID(), in_genotype.GetName()(),
 			 found_species->GetID());
   } else {
@@ -424,7 +408,7 @@
 
   // Print the genotype?
 
-  if (cConfig::GetGenotypePrint()) {
+  if (m_world->GetConfig().GENOTYPE_PRINT.Get()) {
     cString filename;
     filename.Set("genebank/%s", in_genotype.GetName()());
     cTestUtil::PrintGenome(in_genotype.GetGenome(), filename,
@@ -436,7 +420,7 @@
 {
   if (!genotype_control->Adjust(in_genotype)) return false;
 
-  if ((in_genotype.GetNumOrganisms() >= cConfig::GetThreshold() ||
+  if ((in_genotype.GetNumOrganisms() >= m_world->GetConfig().THRESHOLD.Get() ||
        &in_genotype == genotype_control->GetBest()) &&
       !(in_genotype.GetThreshold())) {
     ThresholdGenotype(in_genotype);

Modified: branches/brysonda/source/main/cGenebank.h
===================================================================
--- branches/brysonda/source/main/cGenebank.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cGenebank.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -33,9 +33,11 @@
 class cSpeciesControl; // access
 class cStats;
 class cString; // aggregate
+class cWorld;
 
 class cGenebank {
 private:
+  cWorld* m_world;
   unsigned int genotype_count[MAX_CREATURE_SIZE];
   tList<cGenotype> active_genotypes[nGenotype::HASH_SIZE];
   cGenotypeControl * genotype_control;
@@ -49,7 +51,7 @@
   // disabled copy constructor.
   cGenebank(const cGenebank &);
 public:
-  cGenebank(cStats & _stats);
+  cGenebank(cWorld* world, cStats & _stats);
   ~cGenebank();
 
   void UpdateReset();

Modified: branches/brysonda/source/main/cGenotype.cc
===================================================================
--- branches/brysonda/source/main/cGenotype.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cGenotype.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -7,7 +7,6 @@
 
 #include "cGenotype.h"
 
-#include "cConfig.h"
 #include "cCPUTestInfo.h"
 #include "cGenomeUtil.h"
 #include "cMerit.h"
@@ -15,6 +14,7 @@
 #include "cPhenotype.h"
 #include "cTestCPU.h"
 #include "cTools.h"
+#include "cWorld.h"
 
 using namespace std;
 
@@ -24,8 +24,9 @@
 //  cGenotype
 ///////////////////////////
 
-cGenotype::cGenotype(int in_update_born, int in_id)
-  : genome(1)
+cGenotype::cGenotype(cWorld* world, int in_update_born, int in_id)
+  : m_world(world)
+  , genome(1)
   , name("001-no_name")
   , flag_threshold(false)
   , is_active(true)
@@ -137,7 +138,7 @@
   birth_data.gene_depth = parent->GetDepth() + 1;
   birth_data.lineage_label = parent->GetLineageLabel();
   parent->AddOffspringGenotype();
-  if (parent2 != NULL && cConfig::GetTrackMainLineage() == 2) {
+  if (parent2 != NULL && m_world->GetConfig().TRACK_MAIN_LINEAGE.Get() == 2) {
     parent2->AddOffspringGenotype();
   }
 
@@ -156,7 +157,7 @@
 
   for (i = 0; i < genome.GetSize(); i++) {
     if (true) { // g_random.GetUInt()) {     //@CAO always true!
-      genome[i].SetOp(g_random.GetUInt(cConfig::GetNumInstructions()));
+      genome[i].SetOp(g_random.GetUInt(m_world->GetNumInstructions()));
       // Flag command as having been mutated? @CAO
     }
   }

Modified: branches/brysonda/source/main/cGenotype.h
===================================================================
--- branches/brysonda/source/main/cGenotype.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cGenotype.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -28,9 +28,11 @@
 
 class cSpecies;
 class cMerit;
+class cWorld;
 
 class cGenotype {
 private:
+  cWorld* m_world;
   cGenome genome;
   cString name;
   bool flag_threshold;
@@ -90,7 +92,7 @@
    * that in this case, cGenotype does not check if the id has already been 
    * used before.
    **/
-  cGenotype(int in_update_born = 0, int in_id = -1);
+  cGenotype(cWorld* world, int in_update_born = 0, int in_id = -1);
   ~cGenotype();
 
   bool SaveClone(std::ofstream & fp);

Modified: branches/brysonda/source/main/cGenotypeControl.cc
===================================================================
--- branches/brysonda/source/main/cGenotypeControl.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cGenotypeControl.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -5,25 +5,14 @@
 // before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
 //////////////////////////////////////////////////////////////////////////////
 
-#ifndef GENOTYPE_CONTROL_HH
 #include "cGenotypeControl.h"
-#endif
 
-#ifndef DEFS_HH
 #include "defs.h"
-#endif
-#ifndef GENEBANK_HH
 #include "cGenebank.h"
-#endif
-#ifndef GENOTYPE_HH
 #include "cGenotype.h"
-#endif
+#include "cWorld.h"
 
-///////////////////////
-//  cGenotypeControl
-///////////////////////
-
-cGenotypeControl::cGenotypeControl(cGenebank & in_gb) : genebank(in_gb)
+cGenotypeControl::cGenotypeControl(cWorld* world, cGenebank & in_gb) : m_world(world), genebank(in_gb)
 {
   size = 0;
   best = NULL;

Modified: branches/brysonda/source/main/cGenotypeControl.h
===================================================================
--- branches/brysonda/source/main/cGenotypeControl.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cGenotypeControl.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -15,13 +15,16 @@
 class cGenebank;
 class cGenome;
 class cGenotype;
+class cWorld;
+
 class cGenotypeControl {
 private:
+  cWorld* m_world;
   int size;
-  cGenotype * best;
-  cGenotype * coalescent;
-  cGenotype * threads[nGenotype::THREADS];
-  cGenebank & genebank;
+  cGenotype* best;
+  cGenotype* coalescent;
+  cGenotype* threads[nGenotype::THREADS];
+  cGenebank& genebank;
 
   cGenotype * historic_list;
   int historic_count;
@@ -29,7 +32,7 @@
   void Insert(cGenotype & in_genotype, cGenotype * prev_genotype);
   bool CheckPos(cGenotype & in_genotype);
 public:
-  cGenotypeControl(cGenebank & in_gb);
+  cGenotypeControl(cWorld* world, cGenebank& in_gb);
   ~cGenotypeControl();
 
   bool OK();

Modified: branches/brysonda/source/main/cInjectGenebank.cc
===================================================================
--- branches/brysonda/source/main/cInjectGenebank.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cInjectGenebank.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -5,28 +5,14 @@
 // before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
 //////////////////////////////////////////////////////////////////////////////
 
-#ifndef INJECT_GENEBANK_HH
 #include "cInjectGenebank.h"
-#endif
 
-#ifndef CONFIG_HH
-#include "cConfig.h"
-#endif
-#ifndef DATA_FILE_HH
 #include "cDataFile.h"
-#endif
-#ifndef GENOME_HH
 #include "cGenome.h"
-#endif
-#ifndef INJECT_GENOTYPE_HH
 #include "cInjectGenotype.h"
-#endif
-#ifndef STATS_HH
 #include "cStats.h"
-#endif
-#ifndef TEST_UTIL_HH
 #include "cTestUtil.h"
-#endif
+#include "cWorld.h"
 
 using namespace std;
 
@@ -34,8 +20,8 @@
 //  cInjectGenebank
 ////////////////////
 
-cInjectGenebank::cInjectGenebank(cStats & in_stats)
-  : stats(in_stats)
+cInjectGenebank::cInjectGenebank(cWorld* world, cStats & in_stats)
+  : m_world(world), stats(in_stats)
 {
   for (int i = 0; i < MAX_CREATURE_SIZE; i++) {
     inject_genotype_count[i] = 0;
@@ -63,7 +49,7 @@
   }
   else {
     genotype_dom_time++;
-    if (genotype_dom_time == cConfig::GetGenotypePrintDom()) {
+    if (genotype_dom_time == m_world->GetConfig().GENOTYPE_PRINT_DOM.Get()) {
       cString filename;
       filename.Set("genebank/%s", best_inject_genotype->GetName()());
       cTestUtil::PrintGenome(best_inject_genotype, best_inject_genotype->GetGenome(), 
@@ -111,7 +97,7 @@
   found_genotype = active_inject_genotypes[list_num].Find(in_genome);
 
   if (!found_genotype) {
-    found_genotype = new cInjectGenotype(stats.GetUpdate());
+    found_genotype = new cInjectGenotype(m_world, stats.GetUpdate());
     found_genotype->SetGenome(in_genome);
     found_genotype->SetParent(parent_genotype);
     if(parent_genotype!=NULL)
@@ -140,7 +126,7 @@
     active_inject_genotypes[list_num].Remove(in_inject_genotype);
     inject_genotype_control->Remove(in_inject_genotype);
     //in_inject_genotype.Deactivate(stats.GetUpdate());
-    if (cConfig::GetTrackMainLineage()) {
+    if (m_world->GetConfig().TRACK_MAIN_LINEAGE.Get()) {
       inject_genotype_control->InsertHistoric(in_inject_genotype);
     }
   }
@@ -148,7 +134,7 @@
   // If we are tracking the main lineage, we only want to delete a
   // genotype when all of its decendents have also died out.
 
-  /*if (cConfig::GetTrackMainLineage()) {
+  /*if (m_world->GetConfig().TRACK_MAIN_LINEAGE.Get()) {
     // If  there are more offspring genotypes, hold off on deletion...
     if (in_inject_genotype.GetNumOffspringGenotypes() != 0) return;
 
@@ -195,7 +181,7 @@
   
   // Print the genotype?
 
-  if (cConfig::GetGenotypePrint()) {
+  if (m_world->GetConfig().GENOTYPE_PRINT.Get()) {
     cString filename;
     filename.Set("genebank/%s", in_inject_genotype.GetName()());
     //cTestUtil::PrintGenome(in_inject_genotype.GetGenome(), filename,
@@ -207,7 +193,7 @@
 {
   if (!inject_genotype_control->Adjust(in_inject_genotype)) return false;
 
-  if ((in_inject_genotype.GetNumInjected() >= cConfig::GetThreshold() ||
+  if ((in_inject_genotype.GetNumInjected() >= m_world->GetConfig().THRESHOLD.Get() ||
        &in_inject_genotype == inject_genotype_control->GetBest()) &&
       !(in_inject_genotype.GetThreshold())) {
     ThresholdInjectGenotype(in_inject_genotype);

Modified: branches/brysonda/source/main/cInjectGenebank.h
===================================================================
--- branches/brysonda/source/main/cInjectGenebank.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cInjectGenebank.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -35,9 +35,11 @@
 class cString; // aggregate
 class cInjectGenotype;
 class cGenome;
+class cWorld;
 
 class cInjectGenebank {
 private:
+  cWorld* m_world;
   unsigned int inject_genotype_count[MAX_CREATURE_SIZE];
   cInjectGenotypeQueue active_inject_genotypes[nInjectGenotype::HASH_SIZE];
   cInjectGenotypeControl * inject_genotype_control;
@@ -47,7 +49,7 @@
   cString GetLabel(int in_size, int in_num);
 
 public:
-  cInjectGenebank(cStats & stats);
+  cInjectGenebank(cWorld* world, cStats & stats);
   ~cInjectGenebank();
 
   void UpdateReset();

Modified: branches/brysonda/source/main/cInjectGenotype.cc
===================================================================
--- branches/brysonda/source/main/cInjectGenotype.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cInjectGenotype.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -5,27 +5,16 @@
 // before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
 //////////////////////////////////////////////////////////////////////////////
 
-#ifndef INJECT_GENOTYPE_HH
 #include "cInjectGenotype.h"
-#endif
 
-#ifndef CONFIG_HH
-#include "cConfig.h"
-#endif
-#ifndef TOOLS_HH
 #include "cTools.h"
-#endif
+#include "cWorld.h"
 
 using namespace std;
 
-
-
-///////////////////////////
-//  cInjectGenotype
-///////////////////////////
-
-cInjectGenotype::cInjectGenotype(int in_update_born, int in_id)
-  : genome(1)
+cInjectGenotype::cInjectGenotype(cWorld* world, int in_update_born, int in_id)
+  : m_world(world)
+  , genome(1)
   , name("p001-no_name")
   , flag_threshold(false)
   , is_active(true)
@@ -123,7 +112,7 @@
   int i;
 
   for (i = 0; i < genome.GetSize(); i++) {
-      genome[i].SetOp(g_random.GetUInt(cConfig::GetNumInstructions()));
+      genome[i].SetOp(g_random.GetUInt(m_world->GetNumInstructions()));
     }
   
 }

Modified: branches/brysonda/source/main/cInjectGenotype.h
===================================================================
--- branches/brysonda/source/main/cInjectGenotype.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cInjectGenotype.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -39,9 +39,11 @@
 class cGenome; // aggregate
 class cString; // aggregate
 class cInjectGenotype_BirthData; // aggregate
+class cWorld;
 
 class cInjectGenotype {
 private:
+  cWorld* m_world;
   cGenome genome;
   cString name;
   bool flag_threshold;
@@ -102,7 +104,7 @@
    * that in this case, cGenotype does not check if the id has already been 
    * used before.
    **/
-  cInjectGenotype(int in_update_born = 0, int in_id = -1);
+  cInjectGenotype(cWorld* world, int in_update_born = 0, int in_id = -1);
   ~cInjectGenotype();
 
   bool SaveClone(std::ofstream & fp);

Modified: branches/brysonda/source/main/cInstSet.cc
===================================================================
--- branches/brysonda/source/main/cInstSet.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cInstSet.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -5,7 +5,7 @@
 // before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
 //////////////////////////////////////////////////////////////////////////////
 
-#ifndef INST_SET_HH
+#ifndef cInstSet_h
 #include "cInstSet.h"
 #endif
 

Modified: branches/brysonda/source/main/cInstSet.h
===================================================================
--- branches/brysonda/source/main/cInstSet.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cInstSet.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -5,8 +5,8 @@
 // before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
 //////////////////////////////////////////////////////////////////////////////
 
-#ifndef INST_SET_HH
-#define INST_SET_HH
+#ifndef cInstSet_h
+#define cInstSet_h
 
 #include <iostream>
 

Modified: branches/brysonda/source/main/cLineageControl.cc
===================================================================
--- branches/brysonda/source/main/cLineageControl.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cLineageControl.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -11,7 +11,6 @@
 
 #include "cLineage.h"
 #include "cStats.h"
-#include "cConfig.h"
 #include "cGenebank.h"
 #include "cGenotype.h"
 #include "cOrganism.h"
@@ -26,12 +25,13 @@
 //  cLineageControl
 /////////////////////
 
-cLineageControl::cLineageControl( cGenebank & genebank, cStats & stats )
-  : m_best_lineage(NULL)
+cLineageControl::cLineageControl(cWorld* world, cGenebank& genebank, cStats& stats )
+  : m_world(world)
+  , m_best_lineage(NULL)
   , m_max_fitness_lineage(NULL)
   , m_dominant_lineage(NULL)
   , m_genebank( genebank )
-  , m_stats( stats )
+  , m_stats(stats)
 {
 }
 
@@ -183,7 +183,7 @@
   }
   // otherwise, check for conditions that cause the creation of a new lineage
   else {
-    switch ( cConfig::GetLineageCreationMethod() ) {
+    switch ( m_world->GetConfig().LINEAGE_CREATION_METHOD.Get() ) {
     case 0: // manual creation only
       break;
     case 1: // new lineage whenever a parent has offspring of greater fitness

Modified: branches/brysonda/source/main/cLineageControl.h
===================================================================
--- branches/brysonda/source/main/cLineageControl.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cLineageControl.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -16,9 +16,11 @@
 class cGenotype;
 class cOrganism;
 class cString;
+class cWorld;
 
 class cLineageControl {
 private:
+  cWorld* m_world;
   std::list<cLineage *> m_lineage_list;
   cLineage * m_best_lineage;  // the lineage with the highest average fitness
   cLineage * m_max_fitness_lineage; // lineage with the single highest fitness
@@ -50,7 +52,7 @@
   cLineageControl( const cLineageControl & );
   cLineageControl & operator=( const cLineageControl & );
 public:
-  cLineageControl( cGenebank & genebank, cStats & stats );
+  cLineageControl(cWorld* world, cGenebank& genebank, cStats& stats);
   ~cLineageControl();
 
 

Modified: branches/brysonda/source/main/cMxCodeArray.cc
===================================================================
--- branches/brysonda/source/main/cMxCodeArray.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cMxCodeArray.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -18,7 +18,7 @@
 #ifndef GENOME_HH
 #include "cGenome.h"
 #endif
-#ifndef INST_SET_HH
+#ifndef cInstSet_h
 #include "cInstSet.h"
 #endif
 #ifndef MY_CODE_ARRAY_LESS_THAN_HH

Modified: branches/brysonda/source/main/cOrganism.cc
===================================================================
--- branches/brysonda/source/main/cOrganism.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cOrganism.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -7,7 +7,6 @@
 
 #include "cOrganism.h"
 
-#include "cConfig.h"
 #include "nHardware.h"
 #include "cEnvironment.h"
 #include "functions.h"
@@ -34,14 +33,13 @@
 int cOrganism::instance_count(0);
 
 
-cOrganism::cOrganism(const cGenome & in_genome,
-		     const cPopulationInterface & in_interface,
-		     const cEnvironment & in_environment)
-  : genotype(NULL)
-  , phenotype(in_environment)
+cOrganism::cOrganism(cWorld* world, const cGenome & in_genome, cEnvironment* in_env)
+  : m_world(world)
+  , genotype(NULL)
+  , phenotype(world, in_env ? *in_env : world->GetEnvironment())
   , initial_genome(in_genome)
-  , mut_info(in_environment.GetMutationLib(), in_genome.GetSize())
-  , pop_interface(in_interface)
+  , mut_info(in_env ? in_env->GetMutationLib() : world->GetEnvironment().GetMutationLib(), in_genome.GetSize())
+  , pop_interface(world)
   , input_pointer(0)
   , input_buf(INPUT_BUF_SIZE)
   , output_buf(OUTPUT_BUF_SIZE)
@@ -63,13 +61,12 @@
   instance_count++;
   pop_interface.SetCellID(-1);  // No cell at the moment...
 
-  if (cConfig::GetDeathMethod() > 0) {
-    max_executed = cConfig::GetAgeLimit();
-    if (cConfig::GetAgeDeviation() > 0.0) {
-      max_executed +=
-	(int) (g_random.GetRandNormal() * cConfig::GetAgeDeviation());
+  if (m_world->GetConfig().DEATH_METHOD.Get() > 0) {
+    max_executed = m_world->GetConfig().AGE_LIMIT.Get();
+    if (m_world->GetConfig().AGE_DEVIATION.Get() > 0.0) {
+      max_executed += (int) (g_random.GetRandNormal() * m_world->GetConfig().AGE_DEVIATION.Get());
     }
-    if (cConfig::GetDeathMethod() == DEATH_METHOD_MULTIPLE) {
+    if (m_world->GetConfig().DEATH_METHOD.Get() == DEATH_METHOD_MULTIPLE) {
       max_executed *= initial_genome.GetSize();
     }
 
@@ -82,7 +79,7 @@
 cOrganism::~cOrganism()
 {
   assert(is_running == false);
-  pop_interface.RecycleHardware(hardware);
+  delete hardware;
   instance_count--;
 }
 
@@ -216,17 +213,17 @@
 
 
 bool cOrganism::GetTestOnDivide() const { return pop_interface.TestOnDivide();}
-bool cOrganism::GetFailImplicit() const { return cConfig::GetFailImplicit(); }
+bool cOrganism::GetFailImplicit() const { return m_world->GetConfig().FAIL_IMPLICIT.Get(); }
 
-bool cOrganism::GetRevertFatal() const { return cConfig::GetRevertFatal(); }
-bool cOrganism::GetRevertNeg()   const { return cConfig::GetRevertNeg(); }
-bool cOrganism::GetRevertNeut()  const { return cConfig::GetRevertNeut(); }
-bool cOrganism::GetRevertPos()   const { return cConfig::GetRevertPos(); }
+bool cOrganism::GetRevertFatal() const { return m_world->GetConfig().REVERT_FATAL.Get(); }
+bool cOrganism::GetRevertNeg()   const { return m_world->GetConfig().REVERT_DETRIMENTAL.Get(); }
+bool cOrganism::GetRevertNeut()  const { return m_world->GetConfig().REVERT_NEUTRAL.Get(); }
+bool cOrganism::GetRevertPos()   const { return m_world->GetConfig().REVERT_BENEFICIAL.Get(); }
 
-bool cOrganism::GetSterilizeFatal() const{return cConfig::GetSterilizeFatal();}
-bool cOrganism::GetSterilizeNeg()  const { return cConfig::GetSterilizeNeg(); }
-bool cOrganism::GetSterilizeNeut() const { return cConfig::GetSterilizeNeut();}
-bool cOrganism::GetSterilizePos()  const { return cConfig::GetSterilizePos(); }
+bool cOrganism::GetSterilizeFatal() const{return m_world->GetConfig().STERILIZE_FATAL.Get();}
+bool cOrganism::GetSterilizeNeg()  const { return m_world->GetConfig().STERILIZE_DETRIMENTAL.Get(); }
+bool cOrganism::GetSterilizeNeut() const { return m_world->GetConfig().STERILIZE_NEUTRAL.Get();}
+bool cOrganism::GetSterilizePos()  const { return m_world->GetConfig().STERILIZE_BENEFICIAL.Get(); }
 
 
 void cOrganism::PrintStatus(ostream & fp, const cString & next_name)
@@ -242,27 +239,21 @@
 bool cOrganism::Divide_CheckViable()
 {
   // Make sure required task (if any) has been performed...
-  const int required_task = cConfig::GetRequiredTask();
-  const int immunity_task = cConfig::GetImmunityTask();
-//cout << "req=" << required_task << "," <<phenotype.GetCurTaskCount()[required_task]<< " "; 
-//cout << "im=" << immunity_task << "," <<phenotype.GetCurTaskCount()[immunity_task]<< endl; 
-  if (required_task != -1 &&
-      phenotype.GetCurTaskCount()[required_task] == 0) { 
-    if (immunity_task==-1 || 
-	phenotype.GetCurTaskCount()[immunity_task] == 0) {
+  const int required_task = m_world->GetConfig().REQUIRED_TASK.Get();
+  const int immunity_task = m_world->GetConfig().IMMUNITY_TASK.Get();
+
+  if (required_task != -1 && phenotype.GetCurTaskCount()[required_task] == 0) { 
+    if (immunity_task==-1 || phenotype.GetCurTaskCount()[immunity_task] == 0) {
       Fault(FAULT_LOC_DIVIDE, FAULT_TYPE_ERROR,
-	    cStringUtil::Stringf("Lacks required task (%d)",
-			         cConfig::GetRequiredTask()));
+            cStringUtil::Stringf("Lacks required task (%d)", required_task));
       return false; //  (divide fails)
     } 
   }
 
-  const int required_reaction = cConfig::GetRequiredReaction();
-  if (required_reaction != -1 &&
-      phenotype.GetCurTaskCount()[required_reaction] == 0) {
+  const int required_reaction = m_world->GetConfig().REQUIRED_REACTION.Get();
+  if (required_reaction != -1 && phenotype.GetCurTaskCount()[required_reaction] == 0) {
     Fault(FAULT_LOC_DIVIDE, FAULT_TYPE_ERROR,
-	  cStringUtil::Stringf("Lacks required reaction (%d)",
-			       cConfig::GetRequiredReaction()));
+          cStringUtil::Stringf("Lacks required reaction (%d)", required_reaction));
     return false; //  (divide fails)
   }
 

Modified: branches/brysonda/source/main/cOrganism.h
===================================================================
--- branches/brysonda/source/main/cOrganism.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cOrganism.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -60,6 +60,7 @@
 
 class cOrganism {
 protected:
+  cWorld* m_world;
   cHardwareBase * hardware;  // The actual machinary running this organism.
   cGenotype * genotype;      // Information about organisms with this genome.
   cPhenotype phenotype;      // Descriptive attributes of organism.
@@ -111,9 +112,7 @@
   void Fault(int fault_loc, int fault_type, cString fault_desc="");
 
 public:
-  cOrganism(const cGenome & in_genome,
-	    const cPopulationInterface & in_interface,
-	    const cEnvironment & in_environment);
+  cOrganism(cWorld* world, const cGenome & in_genome, cEnvironment* in_env = NULL);
   ~cOrganism();
 
   cHardwareBase & GetHardware() { return *hardware; }
@@ -206,8 +205,8 @@
   cMutationRates & MutationRates() { return mut_rates; }
   const cLocalMutations & GetLocalMutations() const { return mut_info; }
   cLocalMutations & GetLocalMutations() { return mut_info; }
-  const cPopulationInterface & PopInterface() const { return pop_interface; }
-  cPopulationInterface & PopInterface() { return pop_interface; }
+  const cPopulationInterface& PopInterface() const { return pop_interface; }
+  cPopulationInterface& PopInterface() { return pop_interface; }
   
   const cGenome & GetGenome() const { return initial_genome; }
   

Modified: branches/brysonda/source/main/cPhenotype.cc
===================================================================
--- branches/brysonda/source/main/cPhenotype.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cPhenotype.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -5,38 +5,30 @@
 // before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
 //////////////////////////////////////////////////////////////////////////////
 
-#ifndef PHENOTYPE_HH
 #include "cPhenotype.h"
-#endif
 
-#ifndef CONFIG_HH
-#include "cConfig.h"
-#endif
-#ifndef ENVIRONMENT_HH
 #include "cEnvironment.h"
-#endif
-#ifndef REACTION_RESULT_HH
+#include "cHardwareManager.h"
 #include "cReactionResult.h"
-#endif
-#ifndef TOOLS_HH
 #include "cTools.h"
-#endif
+#include "cWorld.h"
 
 #include <fstream>
 
 using namespace std;
 
 
-cPhenotype::cPhenotype(const cEnvironment & _environment)
-  : environment(_environment)
+cPhenotype::cPhenotype(cWorld* world, const cEnvironment & _environment)
+  : m_world(world)
+  , environment(_environment)
   , initialized(false)
   , cur_task_count(environment.GetTaskLib().GetSize())
   , cur_reaction_count(environment.GetReactionLib().GetSize())
-  , cur_inst_count(environment.GetInstSet().GetSize())
+  , cur_inst_count(world->GetHardwareManager().GetInstSet().GetSize())
   , sensed_resources(environment.GetResourceLib().GetSize())
   , last_task_count(environment.GetTaskLib().GetSize())
   , last_reaction_count(environment.GetReactionLib().GetSize())
-  , last_inst_count(environment.GetInstSet().GetSize())
+  , last_inst_count(world->GetHardwareManager().GetInstSet().GetSize())
 {
 }
 
@@ -100,7 +92,7 @@
   assert(div_type > 0);
 
   // Initialize current values, as neeeded.
-  cur_bonus       = cConfig::GetDefaultBonus();
+  cur_bonus       = m_world->GetConfig().DEFAULT_BONUS.Get();
   cur_num_errors  = 0;
   cur_num_donates  = 0;
   cur_task_count.SetAll(0);
@@ -123,7 +115,7 @@
   // Setup other miscellaneous values...
   num_divides     = 0;
   generation      = parent_phenotype.generation;
-  if (cConfig::GetGenerationIncMethod() != GENERATION_INC_BOTH) generation++;
+  if (m_world->GetConfig().GENERATION_INC_METHOD.Get() != GENERATION_INC_BOTH) generation++;
   time_used       = 0;
   age             = 0;
   fault_desc      = "";
@@ -182,7 +174,7 @@
   div_type	  = 1;
 
   // Initialize current values, as neeeded.
-  cur_bonus       = cConfig::GetDefaultBonus();
+  cur_bonus       = m_world->GetConfig().DEFAULT_BONUS.Get();
   cur_num_errors  = 0;
   cur_num_donates  = 0;
   cur_task_count.SetAll(0);
@@ -248,7 +240,7 @@
   assert(initialized == true);
 
   // Update these values as needed...
-  int cur_merit_base = CalcSizeMerit(genome_length,copied_size,executed_size);
+  int cur_merit_base = CalcSizeMerit();
   merit = cur_merit_base * cur_bonus;
 
   genome_length   = _length;
@@ -268,7 +260,7 @@
   last_inst_count     = cur_inst_count;
 
   // Reset cur values.
-  cur_bonus       = cConfig::GetDefaultBonus();
+  cur_bonus       = m_world->GetConfig().DEFAULT_BONUS.Get();
   cur_num_errors  = 0;
   cur_num_donates  = 0;
   cur_task_count.SetAll(0);
@@ -310,13 +302,13 @@
 
   // A few final changes if the parent was supposed to be be considered
   // a second child on the divide.
-  if (cConfig::GetDivideMethod() == DIVIDE_METHOD_SPLIT) {
+  if (m_world->GetConfig().DIVIDE_METHOD.Get() == DIVIDE_METHOD_SPLIT) {
     gestation_start = 0;
     time_used = 0;
     neutral_metric += g_random.GetRandNormal();
   }
 
-  if (cConfig::GetGenerationIncMethod() == GENERATION_INC_BOTH) generation++;
+  if (m_world->GetConfig().GENERATION_INC_METHOD.Get() == GENERATION_INC_BOTH) generation++;
 }
 
 
@@ -332,7 +324,7 @@
   assert(initialized == true);
 
   // Update these values as needed...
-  int cur_merit_base = CalcSizeMerit(genome_length,copied_size,executed_size);
+  int cur_merit_base = CalcSizeMerit();
   merit           = cur_merit_base * cur_bonus;
 
   genome_length   = _length;
@@ -353,7 +345,7 @@
   last_inst_count     = cur_inst_count;
 
   // Reset cur values.
-  cur_bonus       = cConfig::GetDefaultBonus();
+  cur_bonus       = m_world->GetConfig().DEFAULT_BONUS.Get();
   cur_num_errors  = 0;
   cur_num_donates  = 0;
   cur_task_count.SetAll(0);
@@ -425,7 +417,7 @@
   assert(div_type > 0);
 
   // Initialize current values, as neeeded.
-  cur_bonus       = cConfig::GetDefaultBonus();
+  cur_bonus       = m_world->GetConfig().DEFAULT_BONUS.Get();
   cur_num_errors  = 0;
   cur_num_donates  = 0;
   cur_task_count.SetAll(0);
@@ -448,7 +440,7 @@
   // Setup other miscellaneous values...
   num_divides     = 0;
   generation      = clone_phenotype.generation;
-  if (cConfig::GetGenerationIncMethod() != GENERATION_INC_BOTH) generation++;
+  if (m_world->GetConfig().GENERATION_INC_METHOD.Get() != GENERATION_INC_BOTH) generation++;
   time_used       = 0;
   age             = 0;
   fault_desc      = "";
@@ -710,7 +702,7 @@
 void cPhenotype::PrintStatus(ostream & fp)
 {
   fp << "  MeritBase:"
-     << CalcSizeMerit(genome_length,copied_size,executed_size)
+     << CalcSizeMerit()
      << " Bonus: " << cur_bonus
      << " Errors:" << cur_num_errors
      << " Donates:" << cur_num_donates
@@ -723,38 +715,38 @@
   fp << endl;
 }
 
-int cPhenotype::CalcSizeMerit(int full_size, int copied_size, int exe_size)
+int cPhenotype::CalcSizeMerit() const
 {
-  assert(full_size > 0);
-  assert(exe_size > 0);
+  assert(genome_length > 0);
+  assert(executed_size > 0);
   assert(copied_size > 0);
 
   int out_size;
 
-  switch (cConfig::GetSizeMeritMethod()) {
+  switch (m_world->GetConfig().SIZE_MERIT_METHOD.Get()) {
   case SIZE_MERIT_COPIED:
     out_size = copied_size;
     break;
   case SIZE_MERIT_EXECUTED:
-    out_size = exe_size;
+    out_size = executed_size;
     break;
   case SIZE_MERIT_FULL:
-    out_size = full_size;
+    out_size = genome_length;
     break;
   case SIZE_MERIT_LEAST:
-    out_size = full_size;
+    out_size = genome_length;
     if (out_size > copied_size) out_size = copied_size;
-    if (out_size > exe_size)    out_size = exe_size;
+    if (out_size > executed_size)    out_size = executed_size;
     break;
   case SIZE_MERIT_SQRT_LEAST:
-    out_size = full_size;
+    out_size = genome_length;
     if (out_size > copied_size) out_size = copied_size;
-    if (out_size > exe_size)    out_size = exe_size;
+    if (out_size > executed_size)    out_size = executed_size;
     out_size = (int) sqrt((double) out_size);
     break;
   case SIZE_MERIT_OFF:
   default:
-    out_size = cConfig::GetBaseSizeMerit();
+    out_size = m_world->GetConfig().BASE_SIZE_MERIT.Get();
     break;
   }
 

Modified: branches/brysonda/source/main/cPhenotype.h
===================================================================
--- branches/brysonda/source/main/cPhenotype.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cPhenotype.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -53,9 +53,11 @@
 class cString;                   // aggregate
 template <class T> class tBuffer;
 template <class T> class tList;
+class cWorld;
 
 class cPhenotype {
 private:
+  cWorld* m_world;
   const cEnvironment & environment;
   bool initialized;
 
@@ -125,7 +127,7 @@
   int child_copied_size; // Instruction copied into child.
 
 public:
-  cPhenotype(const cEnvironment & environment);
+  cPhenotype(cWorld* world, const cEnvironment & environment);
   ~cPhenotype();
 
   bool OK();
@@ -161,10 +163,9 @@
   void PrintStatus(std::ostream & fp);
 
   // Some useful methods...
-  static int CalcSizeMerit(int full_size, int copied_size, int exe_size);
+  int CalcSizeMerit() const;
   double CalcFitnessRatio() {
-    const int merit_base =
-      CalcSizeMerit(genome_length,copied_size,executed_size);
+    const int merit_base = CalcSizeMerit();
     const double cur_fitness = merit_base * cur_bonus / time_used;
     return cur_fitness / last_fitness;
   }
@@ -192,7 +193,7 @@
   double GetCurBonus() const
     { assert(initialized == true); return cur_bonus; }
   double GetCurMeritBase() const
-    { assert(initialized == true); return CalcSizeMerit(genome_length,copied_size,executed_size); }
+    { assert(initialized == true); return CalcSizeMerit(); }
   bool GetToDie() const
     { assert(initialized == true); return to_die; }
   bool GetToDelete() const

Modified: branches/brysonda/source/main/cPopulation.cc
===================================================================
--- branches/brysonda/source/main/cPopulation.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cPopulation.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -8,7 +8,6 @@
 #include "cPopulation.h"
 
 #include "cChangeList.h"
-#include "cConfig.h"
 #include "cConstSchedule.h"
 #include "cDataFile.h"
 #include "cEnvironment.h"
@@ -17,9 +16,8 @@
 #include "cGenomeUtil.h"
 #include "cGenotype.h"
 #include "cHardwareBase.h"
-#include "cHardwareFactory.h"
+#include "cHardwareManager.h"
 #include "cHardware4Stack.h"
-#include "cHardwareUtil.h"
 #include "cInitFile.h"
 #include "cInjectGenebank.h"
 #include "cInjectGenotype.h"
@@ -35,6 +33,7 @@
 #include "cSpecies.h"
 #include "cStats.h"
 #include "cTaskEntry.h"
+#include "cWorld.h"
 
 #include <fstream>
 #include <vector>
@@ -46,46 +45,43 @@
 using namespace std;
 
 
-cPopulation::cPopulation(const cPopulationInterface & in_interface,
-                         cEnvironment & in_environment,
-                         cChangeList * change_list)
-: schedule(NULL)
-, resource_count(in_environment.GetResourceLib().GetSize())
-, environment(in_environment)
-, default_interface(in_interface)
+cPopulation::cPopulation(cWorld* world)
+: m_world(world)
+, schedule(NULL)
+, resource_count(world->GetEnvironment().GetResourceLib().GetSize())
+, birth_chamber(world)
+, stats(world)
+, environment(world->GetEnvironment())
 , num_organisms(0)
 , sync_events(false)
 {
   // Setup the genebank.
-  genebank = new cGenebank(stats);
-  inject_genebank = new cInjectGenebank(stats);
+  genebank = new cGenebank(world, stats);
+  inject_genebank = new cInjectGenebank(world, stats);
   birth_chamber.SetGenebank(genebank);
   
   // are we logging lineages?
-  if (cConfig::GetLogLineages()) {
-    lineage_control = new cLineageControl( *genebank, stats );
+  if (world->GetConfig().LOG_LINEAGES.Get()) {
+    lineage_control = new cLineageControl(world, *genebank, stats );
   }
   else lineage_control = NULL;    // no lineage logging
   
   // Setup the default mutation rates...
-  cMutationRates & default_mut_rates = environment.GetMutRates();
-  default_mut_rates.SetCopyMutProb  ( cConfig::GetCopyMutProb()   );
-  default_mut_rates.SetInsMutProb   ( cConfig::GetInsMutProb()    );
-  default_mut_rates.SetDelMutProb   ( cConfig::GetDelMutProb()    );
-  default_mut_rates.SetDivMutProb   ( cConfig::GetDivMutProb()    );
-  default_mut_rates.SetPointMutProb ( cConfig::GetPointMutProb()  );
-  default_mut_rates.SetDivideMutProb( cConfig::GetDivideMutProb() );
-  default_mut_rates.SetDivideInsProb( cConfig::GetDivideInsProb() );
-  default_mut_rates.SetDivideDelProb( cConfig::GetDivideDelProb() );
-  default_mut_rates.SetParentMutProb( cConfig::GetParentMutProb() );
-  
-  // Setup the default population interface...
-  default_interface.SetPopulation(this);
-  
+  cMutationRates& default_mut_rates = environment.GetMutRates();
+  default_mut_rates.SetCopyMutProb  ( world->GetConfig().COPY_MUT_PROB.Get() );
+  default_mut_rates.SetInsMutProb   ( world->GetConfig().INS_MUT_PROB.Get() );
+  default_mut_rates.SetDelMutProb   ( world->GetConfig().DEL_MUT_PROB.Get() );
+  default_mut_rates.SetDivMutProb   ( world->GetConfig().DIV_MUT_PROB.Get() );
+  default_mut_rates.SetPointMutProb ( world->GetConfig().POINT_MUT_PROB.Get() );
+  default_mut_rates.SetDivideMutProb( world->GetConfig().DIVIDE_MUT_PROB.Get() );
+  default_mut_rates.SetDivideInsProb( world->GetConfig().DIVIDE_INS_PROB.Get() );
+  default_mut_rates.SetDivideDelProb( world->GetConfig().DIVIDE_DEL_PROB.Get() );
+  default_mut_rates.SetParentMutProb( world->GetConfig().PARENT_MUT_PROB.Get() );
+    
   // Avida specific information.
-  world_x = cConfig::GetWorldX();
-  world_y = cConfig::GetWorldY();
-  int geometry = cConfig::GetWorldGeometry();
+  world_x = world->GetConfig().WORLD_X.Get();
+  world_y = world->GetConfig().WORLD_Y.Get();
+  int geometry = world->GetConfig().WORLD_GEOMETRY.Get();
   const int num_cells = world_x * world_y;
   cout << "Building world " << world_x << "x" << world_y
     << " = " << num_cells << " organisms." << endl;
@@ -158,12 +154,12 @@
     }
     
     // Setup the reaper queue...
-    if (cConfig::GetBirthMethod() == POSITION_CHILD_FULL_SOUP_ELDEST) {
+    if (world->GetConfig().BIRTH_METHOD.Get() == POSITION_CHILD_FULL_SOUP_ELDEST) {
       reaper_queue.Push(&(cell_array[cell_id]));
     }
   }
   
-  BuildTimeSlicer(change_list);
+  BuildTimeSlicer(0);
   
   if (SetupDemes() == false) {
     cerr << "Error: Failed to setup demes.  Exiting..." << endl;
@@ -194,24 +190,24 @@
     stats.SetTaskName(i, cur_task.GetDesc());
   }
   
-  const cInstSet & inst_set = environment.GetInstSet();
+  const cInstSet & inst_set = world->GetHardwareManager().GetInstSet();
   for (int i = 0; i < inst_set.GetSize(); i++) {
     stats.SetInstName(i, inst_set.GetName(i));
   }
   
   // Load a clone if one is provided, otherwise setup start organism.
-  if (cConfig::GetCloneFilename() == "") {
-    cGenome start_org = cInstUtil::LoadGenome(cConfig::GetStartCreature(), environment.GetInstSet());
+  if (m_world->GetConfig().CLONE_FILE.Get() == "-" || m_world->GetConfig().CLONE_FILE.Get() == "") {
+    cGenome start_org = cInstUtil::LoadGenome(m_world->GetConfig().START_CREATURE.Get(), world->GetHardwareManager().GetInstSet());
     if (start_org.GetSize() != 0) Inject(start_org);
     else cerr << "Warning: Zero length start organism, not injecting into initial population." << endl;
   } else {
-    ifstream fp(cConfig::GetCloneFilename()());
+    ifstream fp(m_world->GetConfig().CLONE_FILE.Get());
     LoadClone(fp);
   }
   
   // Load a saved population if one is provided.
-  cString fname(cConfig::GetLoadPopFilename());
-  if (fname != "") {
+  cString fname(m_world->GetConfig().POPULATION_FILE.Get());
+  if (fname != "-" || fname != "") {
     cout << "Loading Population from " <<  fname() << endl;
     
     // If last three chars of filename are ".gz" , gunzip it first
@@ -256,11 +252,12 @@
 // organisms evolved together and used in group selection experiments.
 bool cPopulation::SetupDemes()
 {
-  num_demes = cConfig::GetNumDemes();
+  num_demes = m_world->GetConfig().NUM_DEMES.Get();
+  const int birth_method = m_world->GetConfig().BIRTH_METHOD.Get();
   
   // If we are not using demes, stop here.
   if (num_demes == 0) {
-    if (cConfig::GetBirthMethod() == POSITION_CHILD_DEME_RANDOM) {
+    if (birth_method == POSITION_CHILD_DEME_RANDOM) {
       cerr << "Using position method that requires demes, but demes are off."
       << endl;
       return false;
@@ -277,10 +274,9 @@
   }
   
   // ...make sure we are using a legal birth method.
-  if (cConfig::GetBirthMethod() == POSITION_CHILD_FULL_SOUP_ELDEST ||
-      cConfig::GetBirthMethod() == POSITION_CHILD_FULL_SOUP_RANDOM) {
-    cerr << "Illegal birth method " << cConfig::GetBirthMethod()
-    << " for use with demes." << endl;
+  if (birth_method == POSITION_CHILD_FULL_SOUP_ELDEST ||
+      birth_method == POSITION_CHILD_FULL_SOUP_RANDOM) {
+    cerr << "Illegal birth method " << birth_method << " for use with demes." << endl;
     return false;
   }
   
@@ -379,7 +375,7 @@
     schedule->Adjust(parent_cell.GetID(), parent_phenotype.GetMerit());
     
     // In a local run, face the child toward the parent. 
-    if (cConfig::GetBirthMethod() < NUM_LOCAL_POSITION_CHILD) {
+    if (m_world->GetConfig().BIRTH_METHOD.Get() < NUM_LOCAL_POSITION_CHILD) {
       for (int i = 0; i < child_array.GetSize(); i++) {
         GetCell(target_cells[i]).Rotate(parent_cell);
       }
@@ -427,7 +423,7 @@
   
   cHardware4Stack & child_cpu = (cHardware4Stack &) target_organism->GetHardware();
   
-  if(child_cpu.GetNumThreads()==cConfig::GetMaxCPUThreads())
+  if(child_cpu.GetNumThreads() == m_world->GetConfig().MAX_CPU_THREADS.Get())
     return false;
   
   cInjectGenotype * child_genotype = parent_genotype;
@@ -547,7 +543,7 @@
   schedule->Adjust(target_cell.GetID(),in_organism->GetPhenotype().GetMerit());
   
   // Special handling for certain birth methods.
-  if (cConfig::GetBirthMethod() == POSITION_CHILD_FULL_SOUP_ELDEST) {
+  if (m_world->GetConfig().BIRTH_METHOD.Get() == POSITION_CHILD_FULL_SOUP_ELDEST) {
     reaper_queue.Push(&target_cell);
   }
   
@@ -912,7 +908,7 @@
   df_donor.Write(GetUpdate(), "update");
   df_receiver.Write(GetUpdate(), "update");
   
-  const int num_inst = cConfig::GetNumInstructions();
+  const int num_inst = m_world->GetNumInstructions();
   const int num_task = environment.GetTaskLib().GetSize();
   
   for (int cur_deme = 0; cur_deme < num_demes; cur_deme++) {
@@ -1022,7 +1018,7 @@
 {
   assert(parent_cell.IsOccupied());
   
-  const int birth_method = cConfig::GetBirthMethod();
+  const int birth_method = m_world->GetConfig().BIRTH_METHOD.Get();
   
   // Try out global/full-deme birth methods first...
   
@@ -1058,7 +1054,7 @@
   // First, check if there is an empty organism to work with (always preferred)
   tList<cPopulationCell> & conn_list = parent_cell.ConnectionList();
   
-  if (cConfig::GetPreferEmpty() == false &&
+  if (m_world->GetConfig().PREFER_EMPTY.Get() == false &&
       birth_method == POSITION_CHILD_RANDOM) {
     found_list.Append(conn_list);
     if (parent_ok == true) found_list.Push(&parent_cell);
@@ -1221,7 +1217,7 @@
     
 #ifdef INSTRUCTION_COUNT
     //    for (int j=0; j < environment.GetInstSet().GetSize(); j++) {
-    for (int j=0; j < cConfig::GetNumInstructions(); j++) {
+    for (int j=0; j < m_world->GetNumInstructions(); j++) {
       stats.SumExeInst()[j].Add(organism->GetPhenotype().GetLastInstCount()[j]);
     }
 #endif
@@ -1502,8 +1498,11 @@
   int num_genotypes = 0;
   fp >> num_genotypes;
   
-  cGenotype * genotype_array = new cGenotype[num_genotypes];
-  for (int i = 0; i < num_genotypes; i++) genotype_array[i].LoadClone(fp);
+  cGenotype** genotype_array = new cGenotype*[num_genotypes];
+  for (int i = 0; i < num_genotypes; i++) {
+    genotype_array[i] = new cGenotype(m_world);
+    genotype_array[i]->LoadClone(fp);
+  }
   
   // Now load them into the organims.  @CAO make sure cell_array.GetSize() is right!
   int in_num_cells;
@@ -1516,14 +1515,14 @@
     if (genotype_id == -1) continue;
     int genotype_index = -1;
     for (int j = 0; j < num_genotypes; j++) {
-      if (genotype_array[j].GetID() == genotype_id) {
+      if (genotype_array[j]->GetID() == genotype_id) {
         genotype_index = j;
         break;
       }
     }
     
     assert(genotype_index != -1);
-    InjectGenome(i, genotype_array[genotype_index].GetGenome(), 0);
+    InjectGenome(i, genotype_array[genotype_index]->GetGenome(), 0);
   }
   
   sync_events = true;
@@ -1600,7 +1599,7 @@
       tmp.update_dead = stats.GetUpdate();
     
     tmp.genotype =
-      new cGenotype(tmp.update_born, tmp.id_num);
+      new cGenotype(m_world, tmp.update_born, tmp.id_num);
     tmp.genotype->SetGenome( genome );
     tmp.genotype->SetName( name );
     
@@ -1767,7 +1766,7 @@
 {
   // If an invalid cell was given, choose a new ID for it.
   if (cell_id < 0) {
-    switch (cConfig::GetBirthMethod()) {
+    switch (m_world->GetConfig().BIRTH_METHOD.Get()) {
       case POSITION_CHILD_FULL_SOUP_ELDEST:
         cell_id = reaper_queue.PopRear()->GetID();
       default:
@@ -1821,7 +1820,7 @@
 
 void cPopulation::BuildTimeSlicer(cChangeList * change_list)
 {
-  switch (cConfig::GetSlicingMethod()) {
+  switch (m_world->GetConfig().SLICING_METHOD.Get()) {
     case SLICE_CONSTANT:
       schedule = new cConstSchedule(cell_array.GetSize());
       break;
@@ -1915,9 +1914,7 @@
 {
   assert(cell_id >= 0 && cell_id < cell_array.GetSize());
   
-  cOrganism * new_organism = new cOrganism(new_genotype->GetGenome(),
-                                           default_interface,
-                                           environment);
+  cOrganism * new_organism = new cOrganism(m_world, new_genotype->GetGenome());
   
   // Set the genotype...
   new_organism->SetGenotype(new_genotype);
@@ -1933,7 +1930,7 @@
   phenotype.SetGestationTime( new_genotype->GetTestGestationTime() );
   
   // Prep the cell..
-  if (cConfig::GetBirthMethod() == POSITION_CHILD_FULL_SOUP_ELDEST &&
+  if (m_world->GetConfig().BIRTH_METHOD.Get() == POSITION_CHILD_FULL_SOUP_ELDEST &&
       cell_array[cell_id].IsOccupied() == true) {
     // Have to manually take this cell out of the reaper Queue.
     reaper_queue.Remove( &(cell_array[cell_id]) );
@@ -1956,8 +1953,7 @@
 {
   assert(cell_id >= 0 && cell_id < cell_array.GetSize());
   
-  cOrganism * new_organism = new cOrganism(orig_org.GetGenome(),
-                                           default_interface, environment);
+  cOrganism * new_organism = new cOrganism(m_world, orig_org.GetGenome());
   
   // Set the genotype...
   new_organism->SetGenotype(orig_org.GetGenotype());
@@ -1966,7 +1962,7 @@
   new_organism->GetPhenotype().SetupClone(orig_org.GetPhenotype());
   
   // Prep the cell..
-  if (cConfig::GetBirthMethod() == POSITION_CHILD_FULL_SOUP_ELDEST &&
+  if (m_world->GetConfig().BIRTH_METHOD.Get() == POSITION_CHILD_FULL_SOUP_ELDEST &&
       cell_array[cell_id].IsOccupied() == true) {
     // Have to manually take this cell out of the reaper Queue.
     reaper_queue.Remove( &(cell_array[cell_id]) );

Modified: branches/brysonda/source/main/cPopulation.h
===================================================================
--- branches/brysonda/source/main/cPopulation.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cPopulation.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -25,6 +25,9 @@
 #ifndef STRING_HH
 #include "cString.h"
 #endif
+#ifndef cWorld_h
+#include "cWorld.h"
+#endif
 #ifndef TARRAY_HH
 #include "tArray.h"
 #endif
@@ -57,6 +60,7 @@
   cPopulation(const cPopulation &); // not implemented
 private:
   // Components...
+  cWorld* m_world;
   cSchedule * schedule;                // Handles allocation of CPU cycles
   tArray<cPopulationCell> cell_array;  // Local cells composing the population
   cResourceCount resource_count;       // Global resources available
@@ -71,7 +75,6 @@
 
   // Default organism setups...
   cEnvironment & environment;          // Physics & Chemestry description
-  cPopulationInterface default_interface;  // Organism interface to population
 
   // Other data...
   int world_x;                         // Structured population width.
@@ -119,9 +122,7 @@
   void ActivateOrganism(cOrganism * in_organism, cPopulationCell &target_cell);
 
 public:
-  cPopulation(const cPopulationInterface & in_interface,
-	      cEnvironment & in_environment,
-	      cChangeList * change_list = 0);
+  cPopulation(cWorld* world);
   ~cPopulation();
 
   // Extra Setup...

Modified: branches/brysonda/source/main/cPopulationCell.cc
===================================================================
--- branches/brysonda/source/main/cPopulationCell.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cPopulationCell.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -5,22 +5,11 @@
 // before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
 //////////////////////////////////////////////////////////////////////////////
 
-#ifndef POPULATION_CELL_HH
 #include "cPopulationCell.h"
-#endif
 
-#ifndef CONFIG_HH
-#include "cConfig.h"
-#endif
-#ifndef nHardware_h
 #include "nHardware.h"
-#endif
-#ifndef ORGANISM_HH
 #include "cOrganism.h"
-#endif
-#ifndef TOOLS_HH
 #include "cTools.h"
-#endif
 
 using namespace std;
 

Modified: branches/brysonda/source/main/cPopulationInterface.cc
===================================================================
--- branches/brysonda/source/main/cPopulationInterface.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cPopulationInterface.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -5,205 +5,185 @@
 // before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
 //////////////////////////////////////////////////////////////////////////////
 
-#ifndef POPULATION_INTERFACE_HH
 #include "cPopulationInterface.h"
-#endif
 
+#include "cGenotype.h"
+#include "cHardwareManager.h"
+#include "cOrganism.h"
+#include "cOrgMessage.h"
+#include "cPopulation.h"
+#include "cPopulationCell.h"
+#include "cTestCPU.h"
+
 #include <assert.h>
 
 #ifndef NULL
 #define NULL 0
 #endif
 
-cPopulationInterface::cPopulationInterface()
-  : population(NULL)
-  , cell_id(-1)
-  , fun_new_hardware(NULL)
-  , fun_recycle(NULL)
-  , fun_divide(NULL)
-  , fun_test_on_divide(NULL)
-  , fun_get_neighbor(NULL)
-  , fun_birth_chamber(NULL)
-  , fun_num_neighbors(NULL)
-  , fun_rotate(NULL)
-  , fun_breakpoint(NULL)
-  , fun_test_fitness(NULL)
-  , fun_get_input(NULL)
-  , fun_get_input_at(NULL)
-  , fun_debug(NULL)
-  , fun_get_resources(NULL)
-  , fun_update_resources(NULL)
-  , fun_kill_cell(NULL)
-  , fun_kill_surround_cell(NULL)
-  , fun_send_message(NULL)
-  , fun_receive_value(NULL)
-  , fun_inject_parasite(NULL)
-  , fun_update_merit(NULL)
+cHardwareBase* cPopulationInterface::NewHardware(cOrganism * owner)
 {
+  return m_world->GetHardwareManager().Create(owner);
 }
 
-
-cPopulationInterface::~cPopulationInterface()
-{
-}
-
-void cPopulationInterface::CopyCallbacks(cPopulationInterface & in_interface)
-{
-  fun_new_hardware     = in_interface.fun_new_hardware;
-  fun_recycle          = in_interface.fun_recycle;
-  fun_divide           = in_interface.fun_divide;
-  fun_test_on_divide   = in_interface.fun_test_on_divide;
-  fun_get_neighbor     = in_interface.fun_get_neighbor;
-  fun_birth_chamber    = in_interface.fun_birth_chamber;
-  fun_num_neighbors    = in_interface.fun_num_neighbors;
-  fun_rotate           = in_interface.fun_rotate;
-  fun_breakpoint       = in_interface.fun_breakpoint;
-  fun_test_fitness     = in_interface.fun_test_fitness;
-  fun_get_input        = in_interface.fun_get_input;
-  fun_debug            = in_interface.fun_debug;
-  fun_get_resources    = in_interface.fun_get_resources;
-  fun_update_resources = in_interface.fun_update_resources;
-  fun_kill_cell        = in_interface.fun_kill_cell;
-  fun_kill_surround_cell = in_interface.fun_kill_surround_cell;
-  fun_send_message     = in_interface.fun_send_message;
-  fun_receive_value    = in_interface.fun_receive_value;
-  fun_inject_parasite  = in_interface.fun_inject_parasite;
-  fun_update_merit     = in_interface.fun_update_merit;
-}
-
-cHardwareBase * cPopulationInterface::NewHardware(cOrganism * owner)
-{
-  assert(fun_new_hardware != NULL);  // All interfaces must have a NewHardware!
-  return (*fun_new_hardware)(population, owner);
-}
-
-
-void cPopulationInterface::RecycleHardware(cHardwareBase * out_hardware)
-{
-  assert(fun_recycle != NULL);  // All interfaces must have a RecycleHArdware!
-  (*fun_recycle)(out_hardware);
-}
-
-
 bool cPopulationInterface::Divide(cOrganism * parent, cGenome & child_genome)
 {
-  assert (fun_divide != NULL);       // All interfaces must have a Divide!
-  return (*fun_divide)(population, cell_id, parent, child_genome);  
+  if (InTestPop()) {
+    parent->GetPhenotype().TestDivideReset(parent->GetGenome().GetSize());
+    // @CAO in the future, we probably want to pass this child the test_cpu!
+    return true;
+  } else {
+    assert(parent != NULL);
+    assert(m_world->GetPopulation().GetCell(cell_id).GetOrganism() == parent);
+    return m_world->GetPopulation().ActivateOffspring(child_genome, *parent);
+  }
 }
 
-bool cPopulationInterface::TestOnDivide() const
-{
-  if (population == NULL) return false;
-  assert(fun_test_on_divide != NULL);
-  return (*fun_test_on_divide)(population, cell_id);
-}
-
 cOrganism * cPopulationInterface::GetNeighbor()
 {
-  if (fun_get_neighbor == NULL) return NULL;
+  if (InTestPop()) return NULL;
 
-  assert(cell_id >= 0);
-  return (*fun_get_neighbor)(population, cell_id);
-}
-
-cBirthChamber & cPopulationInterface::GetBirthChamber()
-{
-  assert(fun_birth_chamber != NULL);
+  cPopulationCell & cell = m_world->GetPopulation().GetCell(cell_id);
+  assert(cell.IsOccupied());
   
-  return (*fun_birth_chamber)(population, cell_id);
+  return cell.ConnectionList().GetFirst()->GetOrganism();
 }
 
 int cPopulationInterface::GetNumNeighbors()
 {
-  if (fun_num_neighbors == NULL) return 0;
-
-  assert(cell_id >= 0);
-  return (*fun_num_neighbors)(population, cell_id);
+  if (InTestPop()) return 0;
+  cPopulationCell & cell = m_world->GetPopulation().GetCell(cell_id);
+  assert(cell.IsOccupied());
+  
+  return cell.ConnectionList().GetSize();
 }
 
 void cPopulationInterface::Rotate(int direction)
 {
-  if (fun_rotate == NULL) return;
+  if (InTestPop()) return;
 
-  assert(cell_id >= 0);
-  (*fun_rotate)(population, cell_id, direction);
-}
+  cPopulationCell & cell = m_world->GetPopulation().GetCell(cell_id);
+  assert(cell.IsOccupied());
 
-void cPopulationInterface::Breakpoint()
-{
-  if (fun_breakpoint == NULL) return;
-  (*fun_breakpoint)();
+  if (direction >= 0) cell.ConnectionList().CircNext();
+  else cell.ConnectionList().CircPrev();
 }
 
 double cPopulationInterface::TestFitness()
 {
-  if (fun_test_fitness == NULL) return -1.0;
-  return (*fun_test_fitness)(population, cell_id);
+  if (InTestPop()) return -1.0;
+  
+  cPopulationCell & cell = m_world->GetPopulation().GetCell(cell_id);
+  assert(cell.IsOccupied());
+  
+  return cell.GetOrganism()->GetGenotype()->GetTestFitness();
 }
 
 int cPopulationInterface::GetInput()
 {
-  assert(fun_get_input != NULL);
-  return (*fun_get_input)(population, cell_id);
+  if (InTestPop()) return cTestCPU::GetInput();
+  
+  cPopulationCell & cell = m_world->GetPopulation().GetCell(cell_id);
+  assert(cell.IsOccupied());
+  return cell.GetInput();
 }
 
-int cPopulationInterface::GetInputAt(int & input_pointer)
+int cPopulationInterface::GetInputAt(int& input_pointer)
 {
-  assert(fun_get_input_at != NULL);
-  return (*fun_get_input_at)(population, cell_id, input_pointer);
+  if (InTestPop()) return cTestCPU::GetInputAt(input_pointer);
+  
+  cPopulationCell& cell = m_world->GetPopulation().GetCell(cell_id);
+  assert(cell.IsOccupied());
+  return cell.GetInputAt(input_pointer);
 }
 
 int cPopulationInterface::Debug()
 {
-  assert(fun_debug != NULL);
-  return (*fun_debug)(population, cell_id);
+  if (InTestPop()) return -1;
+  
+  cPopulationCell & cell = m_world->GetPopulation().GetCell(cell_id);
+  assert(cell.IsOccupied());
+  return cell.GetOrganism()->GetGenotype()->GetID();
 }
 
 const tArray<double> & cPopulationInterface::GetResources()
 {
-  assert(fun_get_resources != NULL);
-  return (*fun_get_resources)(population, cell_id);
+  if (InTestPop()) return cTestCPU::GetResources();  
+  return m_world->GetPopulation().GetCellResources(cell_id);
 }
 
 void cPopulationInterface::UpdateResources(const tArray<double> & res_change)
 {
-  assert(fun_update_resources != NULL);
-  (*fun_update_resources)(population, cell_id, res_change);
+  if (InTestPop()) return cTestCPU::UpdateResources(res_change);
+  return m_world->GetPopulation().UpdateCellResources(res_change, cell_id);
 }
 
 void cPopulationInterface::Die()
 {
-  if (fun_kill_cell == NULL) return;
-  (*fun_kill_cell)(population, cell_id);
+  if (InTestPop()) return;
+  
+  cPopulationCell & cell = m_world->GetPopulation().GetCell(cell_id);
+  m_world->GetPopulation().KillOrganism(cell);
 }
 
 void cPopulationInterface::Kaboom()
 {
-	if (fun_kill_surround_cell == NULL) return;
-	(*fun_kill_surround_cell)(population, cell_id);
+  if (InTestPop()) return;
+  
+  cPopulationCell & cell = m_world->GetPopulation().GetCell(cell_id);
+	m_world->GetPopulation().Kaboom(cell);
 }
 
 bool cPopulationInterface::SendMessage(cOrgMessage & mess)
 {
-  if (fun_send_message == NULL) return false;
-  return (*fun_send_message)(population, cell_id, mess);
+  if (InTestPop()) return false;
+  
+  mess.SetSenderID(cell_id);
+  mess.SetTime(m_world->GetPopulation().GetUpdate());
+  cPopulationCell& cell = m_world->GetPopulation().GetCell(cell_id);
+  if(cell.ConnectionList().GetFirst() == NULL)
+    return false;
+  mess.SetRecipientID(cell.ConnectionList().GetFirst()->GetID());
+  return cell.ConnectionList().GetFirst()->GetOrganism()->ReceiveMessage(mess);
 }
 
 int cPopulationInterface::ReceiveValue()
 {
-  assert(fun_receive_value != NULL);
-  return (*fun_receive_value)(population, cell_id);
+  if (InTestPop()) return cTestCPU::GetReceiveValue();
+  
+  cPopulationCell & cell = m_world->GetPopulation().GetCell(cell_id);
+  assert(cell.IsOccupied());
+  
+  const int num_neighbors = cell.ConnectionList().GetSize();
+  for (int i = 0; i < num_neighbors; i++) {
+    cPopulationCell & cell = m_world->GetPopulation().GetCell(cell_id);
+    cell.ConnectionList().CircNext();
+    
+    cOrganism * cur_neighbor = cell.ConnectionList().GetFirst()->GetOrganism();
+    if (cur_neighbor == NULL || cur_neighbor->GetSentActive() == false) {
+      continue;
+    }
+    
+    return cur_neighbor->RetrieveSentValue();
+  }
+  
+  return 0;
 }
 
 bool cPopulationInterface::InjectParasite(cOrganism * parent, 
 					  const cGenome & injected_code)
 {
-  if (fun_inject_parasite == NULL) return false;
-  return (*fun_inject_parasite)(population, cell_id, parent, injected_code);
+  if (InTestPop()) return false;
+  
+  assert(parent != NULL);
+  assert(m_world->GetPopulation().GetCell(cell_id).GetOrganism() == parent);
+  
+  return m_world->GetPopulation().ActivateInject(*parent, injected_code);
 }
 
 bool cPopulationInterface::UpdateMerit(double new_merit)
 {
-  if (fun_update_merit == NULL) return false;
-  return (*fun_update_merit)(population, cell_id, new_merit);
+  if (InTestPop()) return false;
+  return m_world->GetPopulation().UpdateMerit(cell_id, new_merit);
 }
+

Modified: branches/brysonda/source/main/cPopulationInterface.h
===================================================================
--- branches/brysonda/source/main/cPopulationInterface.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cPopulationInterface.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -10,113 +10,38 @@
 #ifndef POPULATION_INTERFACE_HH
 #define POPULATION_INTERFACE_HH
 
+#include "cWorld.h"
+#include "cAvidaDriver_Base.h"
+
 class cHardwareBase;
 class cPopulation;
 class cOrganism;
 class cGenome;
 template <class T> class tArray;
 class cOrgMessage;
-class cBirthChamber;
 
-typedef cHardwareBase * (*tFunNewHardware)(cPopulation *pop, cOrganism *owner);
-typedef void (*tFunRecycle)(cHardwareBase * out_hardware);
-typedef bool (*tFunDivide)
-  (cPopulation * pop, int cell_id, cOrganism * parent, cGenome & child_genome);
-typedef bool (*tFunTestOnDivide)(cPopulation * pop, int cell_id);
-typedef cOrganism * (*tFunGetNeighbor)(cPopulation * pop, int cell_id);
-typedef cBirthChamber & (*tFunBirthChamber)(cPopulation * pop, int cell_id);
-typedef int (*tFunNumNeighbors)(cPopulation * pop, int cell_id);
-typedef void (*tFunRotate)(cPopulation * pop, int cell_id, int direction);
-typedef void (*tFunBreakpoint)();
-typedef double (*tFunTestFitness)(cPopulation * pop, int cell_id);
-typedef int (*tFunGetInput)(cPopulation * pop, int cell_id);
-typedef int (*tFunGetInputAt)(cPopulation * pop, int cell_id, int & input_pointer);
-typedef int (*tFunDebug)(cPopulation * pop, int cell_id);
-typedef const tArray<double> & (*tFunGetResources)
-  (cPopulation * pop, int cell_id);
-typedef void (*tFunUpdateResources)
-  (cPopulation * pop, int cell_id, const tArray<double> & res_change);
-typedef void (*tFunKillCell)(cPopulation * pop, int death_id);
-typedef void (*tFunKillSurroundCell)(cPopulation * pop, int commie_id);
-typedef bool (*tFunSendMessage)(cPopulation * pop, int cell_id, cOrgMessage & mess);
-typedef int (*tFunReceiveValue)(cPopulation * pop, int cell_id);
-typedef bool (*tFunInjectParasite)
-  (cPopulation * pop, int cell_id, cOrganism * parent, const cGenome & injected_code);
-typedef bool (*tFunUpdateMerit)(cPopulation * pop, int cell_id, double new_merit);
-
 class cPopulationInterface {
 private:
-  cPopulation * population;
+  cWorld* m_world;
   int cell_id;
 
-  tFunNewHardware      fun_new_hardware;
-  tFunRecycle          fun_recycle;
-  tFunDivide           fun_divide;
-  tFunTestOnDivide     fun_test_on_divide;
-  tFunGetNeighbor      fun_get_neighbor;
-  tFunBirthChamber     fun_birth_chamber;
-  tFunNumNeighbors     fun_num_neighbors;
-  tFunRotate           fun_rotate;
-  tFunBreakpoint       fun_breakpoint;
-  tFunTestFitness      fun_test_fitness;
-  tFunGetInput         fun_get_input;
-  tFunGetInputAt       fun_get_input_at;
-  tFunDebug            fun_debug;
-  tFunGetResources     fun_get_resources;
-  tFunUpdateResources  fun_update_resources;
-  tFunKillCell		   fun_kill_cell;
-  tFunKillSurroundCell fun_kill_surround_cell;
-  tFunSendMessage      fun_send_message;
-  tFunReceiveValue	   fun_receive_value;
-  tFunInjectParasite   fun_inject_parasite;
-  tFunUpdateMerit      fun_update_merit;
 public:
-  cPopulationInterface();
-  ~cPopulationInterface();
+  cPopulationInterface(cWorld* world) : m_world(world), cell_id(-1) { ; }
+  virtual ~cPopulationInterface() { ; }
 
-  cPopulation * GetPopulation() { return population; }
-  void SetPopulation(cPopulation * pop) { population = pop; }
-
   int GetCellID() { return cell_id; }
   void SetCellID(int in_id) { cell_id = in_id; }
 
-  void SetFun_NewHardware(tFunNewHardware fun) { fun_new_hardware = fun; }
-  void SetFun_Recycle(tFunRecycle fun) { fun_recycle = fun; }
-  void SetFun_Divide(tFunDivide fun) { fun_divide = fun; }
-  void SetFun_TestOnDivide(tFunTestOnDivide fun) { fun_test_on_divide = fun; }
-  void SetFun_GetNeighbor(tFunGetNeighbor fun) { fun_get_neighbor = fun; }
-  void SetFun_BirthChamber(tFunBirthChamber fun) { fun_birth_chamber = fun; }
-  void SetFun_NumNeighbors(tFunNumNeighbors fun) { fun_num_neighbors = fun; }
-  void SetFun_Rotate(tFunRotate fun) { fun_rotate = fun; }
-  void SetFun_Breakpoint(tFunBreakpoint fun) { fun_breakpoint = fun; }
-  void SetFun_TestFitness(tFunTestFitness fun) { fun_test_fitness = fun; }
-  void SetFun_GetInput(tFunGetInput fun) { fun_get_input = fun; }
-  void SetFun_GetInputAt(tFunGetInputAt fun) { fun_get_input_at = fun; }
-  void SetFun_Debug(tFunDebug fun) { fun_debug = fun; }
-  void SetFun_GetResources(tFunGetResources fun) { fun_get_resources = fun; }
-  void SetFun_UpdateResources(tFunUpdateResources fun)
-    { fun_update_resources = fun; }
-  void SetFun_KillCell(tFunKillCell fun) { fun_kill_cell = fun; }
-  void SetFun_KillSurroundCell(tFunKillSurroundCell fun) {fun_kill_surround_cell = fun; }
-  void SetFun_SendMessage(tFunSendMessage fun) { fun_send_message = fun; }
-  void SetFun_ReceiveValue(tFunReceiveValue fun) { fun_receive_value = fun; }
-  void SetFun_InjectParasite(tFunInjectParasite fun) { fun_inject_parasite = fun; }
-  void SetFun_UpdateMerit(tFunUpdateMerit fun) { fun_update_merit = fun; }
-
-  void CopyCallbacks(cPopulationInterface & in_interface);
-
   bool InTestPop() { return (cell_id == -1); }
 
   // Activate callbacks...
-  cHardwareBase * NewHardware(cOrganism * owner);
-  void RecycleHardware(cHardwareBase * out_hardware);
+  cHardwareBase* NewHardware(cOrganism * owner);
   bool Divide(cOrganism * parent, cGenome & child_genome);
-  bool TestOnDivide() const;
+  bool TestOnDivide() const { return m_world->GetTestOnDivide(); }
   cOrganism * GetNeighbor();
-  cBirthChamber & GetBirthChamber();
   int GetNumNeighbors();
   void Rotate(int direction=1);
-  void Breakpoint();
+  void Breakpoint() { cAvidaDriver_Base::main_driver->SignalBreakpoint(); }
   double TestFitness();
   int GetInput();
   int GetInputAt(int & input_pointer);

Modified: branches/brysonda/source/main/cResource.cc
===================================================================
--- branches/brysonda/source/main/cResource.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cResource.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -5,13 +5,9 @@
 // before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
 //////////////////////////////////////////////////////////////////////////////
 
-#ifndef RESOURCE_HH
 #include "cResource.h"
-#endif
 
-#ifndef CONFIG_HH
-#include "cConfig.h"
-#endif
+#include "nGeometry.h"
 
 using namespace std;
 

Modified: branches/brysonda/source/main/cResourceCount.cc
===================================================================
--- branches/brysonda/source/main/cResourceCount.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cResourceCount.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -5,13 +5,9 @@
 // before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
 //////////////////////////////////////////////////////////////////////////////
 
-#ifndef RESOURCE_COUNT_HH
 #include "cResourceCount.h"
-#endif
 
-#ifndef CONFIG_HH
-#include "cConfig.h"
-#endif
+#include "nGeometry.h"
 
 extern "C" {
 #include <math.h>

Modified: branches/brysonda/source/main/cSpatialResCount.cc
===================================================================
--- branches/brysonda/source/main/cSpatialResCount.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cSpatialResCount.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -5,16 +5,10 @@
 // before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
 //////////////////////////////////////////////////////////////////////////////
 
-#ifndef SPATIAL_RES_COUNT_HH
 #include "cSpatialResCount.h"
-#endif
 
-#ifndef CONFIG_HH
-#include "cConfig.h"
-#endif
-#ifndef FUNCTIONS_HH
 #include "functions.h"
-#endif
+#include "nGeometry.h"
 
 cSpatialResCount::cSpatialResCount(int inworld_x, int inworld_y, 
                   int ingeometry, 

Modified: branches/brysonda/source/main/cSpeciesControl.cc
===================================================================
--- branches/brysonda/source/main/cSpeciesControl.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cSpeciesControl.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -5,36 +5,18 @@
 // before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
 //////////////////////////////////////////////////////////////////////////////
 
-#ifndef SPECIES_CONTROL_HH
 #include "cSpeciesControl.h"
-#endif
 
-#ifndef CONFIG_HH
-#include "cConfig.h"
-#endif
-#ifndef DEFS_HH
 #include "defs.h"
-#endif
-#ifndef GENOTYPE_HH
 #include "cGenotype.h"
-#endif
-#ifndef nSpecies_h
 #include "nSpecies.h"
-#endif
-#ifndef SPECIES_HH
 #include "cSpecies.h"
-#endif
-#ifndef STATS_HH
 #include "cStats.h"
-#endif
+#include "cWorld.h"
 
 #include <assert.h>
 
-/////////////////////
-//  cSpeciesControl
-/////////////////////
-
-cSpeciesControl::cSpeciesControl(cGenebank & in_gb) : genebank(in_gb)
+cSpeciesControl::cSpeciesControl(cWorld* world, cGenebank & in_gb) : m_world(world), genebank(in_gb)
 {
 }
 
@@ -124,17 +106,16 @@
   cSpecies * found_species = NULL;
   int cur_count, best_count = MAX_CREATURE_SIZE;
   cSpecies * cur_species;
+  const int species_threshold = m_world->GetConfig().SPECIES_THRESHOLD.Get();
 
   if (record_level == nSpecies::RECORD_FULL) {
     cur_species = active_queue.GetFirst();
     int size = active_queue.GetSize();
     for (int i = 0; i < size; i++) {
-      cur_count = cur_species->Compare(in_genotype.GetGenome(),
-				       cConfig::GetSpeciesThreshold());
-      if (cur_count != -1 && cur_count <= cConfig::GetSpeciesThreshold() &&
-	  cur_count < best_count) {
-	found_species = cur_species;
-	best_count = cur_count;
+      cur_count = cur_species->Compare(in_genotype.GetGenome(), species_threshold);
+      if (cur_count != -1 && cur_count <= species_threshold && cur_count < best_count) {
+        found_species = cur_species;
+        best_count = cur_count;
       }
       cur_species = cur_species->GetNext();
     }
@@ -144,10 +125,9 @@
     cur_species = in_genotype.GetSpecies();
 
     if (cur_species) {
-      int num_diff = cur_species->Compare(in_genotype.GetGenome(),
-					  cConfig::GetSpeciesThreshold());
-      if (num_diff != -1 && num_diff <= cConfig::GetSpeciesThreshold()) {
-	found_species = cur_species;
+      int num_diff = cur_species->Compare(in_genotype.GetGenome(), species_threshold);
+      if (num_diff != -1 && num_diff <= species_threshold) {
+        found_species = cur_species;
       }
     }
   }

Modified: branches/brysonda/source/main/cSpeciesControl.h
===================================================================
--- branches/brysonda/source/main/cSpeciesControl.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cSpeciesControl.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -16,14 +16,17 @@
 class cGenotype;
 class cSpecies;
 class cStats;
+class cWorld;
+
 class cSpeciesControl {
 private:
+  cWorld* m_world;
   cSpeciesQueue active_queue;
   cSpeciesQueue inactive_queue;
   cSpeciesQueue garbage_queue;
   cGenebank & genebank;
 public:
-  cSpeciesControl(cGenebank & in_gb);
+  cSpeciesControl(cWorld* world, cGenebank & in_gb);
   ~cSpeciesControl();
 
   void Remove(cSpecies & in_species);

Modified: branches/brysonda/source/main/cStats.cc
===================================================================
--- branches/brysonda/source/main/cStats.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cStats.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -7,11 +7,11 @@
 
 #include "cStats.h"
 
-#include "cConfig.h"
 #include "cDataFile.h"
 #include "functions.h"
 #include "cStringUtil.h"
 #include "tDataEntry.h"
+#include "cWorld.h"
 
 #include <math.h>
 
@@ -21,8 +21,9 @@
 //  cStats
 ////////////
 
-cStats::cStats()
-  : current_update(-1)
+cStats::cStats(cWorld* world)
+  : m_world(world)
+  , current_update(-1)
   , sub_update(0)
   , avida_time(0)
   , data_manager(this, "population_data")
@@ -84,47 +85,47 @@
 {
   // Open log files.
 
-  if (cConfig::GetLogCreatures()) fp_creature_log.open("creature.log");
+  if (m_world->GetConfig().LOG_CREATURES.Get()) fp_creature_log.open("creature.log");
   else fp_creature_log.close();
 
-  if (cConfig::GetLogGenotypes()) fp_genotype_log.open("genotype.log");
+  if (m_world->GetConfig().LOG_GENOTYPES.Get()) fp_genotype_log.open("genotype.log");
   else fp_genotype_log.close();
 
-  if (cConfig::GetLogThreshold()) fp_threshold_log.open("threshold.log");
+  if (m_world->GetConfig().LOG_THRESHOLD.Get()) fp_threshold_log.open("threshold.log");
   else fp_threshold_log.close();
 
-  if (cConfig::GetLogSpecies())   fp_species_log.open("species.log");
+  if (m_world->GetConfig().LOG_SPECIES.Get())   fp_species_log.open("species.log");
   else fp_species_log.close();
 
-  if (cConfig::GetLogLineages())  fp_lineage_log.open("lineage.log");
+  if (m_world->GetConfig().LOG_LINEAGES.Get())  fp_lineage_log.open("lineage.log");
   else fp_lineage_log.close();
 
-  task_cur_count.Resize( cConfig::GetNumTasks() );
-  task_last_count.Resize( cConfig::GetNumTasks() );
-  task_exe_count.Resize( cConfig::GetNumTasks() );
+  task_cur_count.Resize( m_world->GetNumTasks() );
+  task_last_count.Resize( m_world->GetNumTasks() );
+  task_exe_count.Resize( m_world->GetNumTasks() );
   task_cur_count.SetAll(0);
   task_last_count.SetAll(0);
   task_exe_count.SetAll(0);
 
 #ifdef INSTRUCTION_COUNT
-  sum_exe_inst_array.Resize( cConfig::GetNumInstructions() );
+  sum_exe_inst_array.Resize( m_world->GetNumInstructions() );
   ZeroInst();
 #endif
-  inst_names.Resize( cConfig::GetNumInstructions() );
+  inst_names.Resize( m_world->GetNumInstructions() );
 
 
 
-  reaction_count.Resize( cConfig::GetNumReactions() );
+  reaction_count.Resize( m_world->GetNumReactions() );
   reaction_count.SetAll(0);
 
-  resource_count.Resize( cConfig::GetNumResources() );
+  resource_count.Resize( m_world->GetNumResources() );
   resource_count.SetAll(0);
 
-  task_names.Resize( cConfig::GetNumTasks() );
-  reaction_names.Resize( cConfig::GetNumReactions() );
-  resource_names.Resize( cConfig::GetNumResources() );
+  task_names.Resize( m_world->GetNumTasks() );
+  reaction_names.Resize( m_world->GetNumReactions() );
+  resource_names.Resize( m_world->GetNumResources() );
 
-  genotype_map.Resize( cConfig::GetWorldX() * cConfig::GetWorldY() );
+  genotype_map.Resize( m_world->GetConfig().WORLD_X.Get() * m_world->GetConfig().WORLD_Y.Get() );
   SetupPrintDatabase();
 }
 
@@ -266,13 +267,13 @@
   // after a mutation occurs, that it will be the original instruction again;
   // This needs to be adjusted for!
 
-  double adj = ((double) (cConfig::GetNumInstructions() - 1)) /
-    (double) cConfig::GetNumInstructions();
+  double adj = ((double) (m_world->GetNumInstructions() - 1)) /
+    (double) m_world->GetNumInstructions();
 
-  double base_fidelity = (1.0 - adj * cConfig::GetDivideMutProb()) *
-    (1.0 - cConfig::GetDivideInsProb()) * (1.0 - cConfig::GetDivideDelProb());
+  double base_fidelity = (1.0 - adj * m_world->GetConfig().DIVIDE_MUT_PROB.Get()) *
+    (1.0 - m_world->GetConfig().DIVIDE_INS_PROB.Get()) * (1.0 - m_world->GetConfig().DIVIDE_DEL_PROB.Get());
 
-  double true_cm_rate = adj * cConfig::GetCopyMutProb();
+  double true_cm_rate = adj * m_world->GetConfig().COPY_MUT_PROB.Get();
   ave_fidelity = base_fidelity * pow(1.0 - true_cm_rate, sum_size.Average());
   dom_fidelity = base_fidelity * pow(1.0 - true_cm_rate, dom_size);
 }
@@ -308,7 +309,7 @@
    int age, int length)
 {
   if (fp_genotype_log.good() &&
-      (!cConfig::GetLogThresholdOnly() || max_abundance > 2)) {
+      (!m_world->GetConfig().LOG_THRESHOLD.Get() || max_abundance > 2)) {
     const int update_born = cStats::GetUpdate() - age + 1;
     fp_genotype_log << id_num             << " "    //  1
 		    << update_born        << " "    //  2
@@ -377,7 +378,7 @@
 
     // calculate the true replication rate in this update
     rave_true_replication_rate.Add( num_births/
-	  (delta * cConfig::GetAveTimeslice() * num_creatures) );
+	  (delta * m_world->GetConfig().AVE_TIME_SLICE.Get() * num_creatures) );
   }
   last_update = current_update;
 
@@ -731,7 +732,7 @@
   df.WriteRaw(UpdateStr);
 
   int gridsize = spatial_res_count[i].GetSize();
-  int xsize = cConfig::GetWorldX();
+  int xsize = m_world->GetConfig().WORLD_X.Get();
 
   // write grid to file
 
@@ -877,7 +878,7 @@
   df.WriteRaw(UpdateStr);
 
   int gridsize = genotype_map.GetSize();
-  int xsize = cConfig::GetWorldX();
+  int xsize = m_world->GetConfig().WORLD_X.Get();
 
   // write grid to file                                        
 

Modified: branches/brysonda/source/main/cStats.h
===================================================================
--- branches/brysonda/source/main/cStats.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cStats.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -48,11 +48,14 @@
 class cString; // aggregate
 class cInjectGenotype;
 class cDataFile;
+class cWorld;
 
 class cStats {
 private:
   cStats(const cStats &); // not implemented.
 private:
+  cWorld* m_world;
+  
   // Time scales...
   int current_update;
   int sub_update;
@@ -234,7 +237,7 @@
   tArray<cString> resource_names;
 
 public:
-  cStats();
+  cStats(cWorld* world);
   ~cStats();
 
   void SetupPrintDatabase();

Modified: branches/brysonda/source/main/cWorld.cc
===================================================================
--- branches/brysonda/source/main/cWorld.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cWorld.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -9,19 +9,139 @@
 
 #include "cWorld.h"
 
+#include "avida.h"
+#include "cAvidaTriggers.h"
+#include "cEnvironment.h"
+#include "cEventManager.h"
+#include "cHardwareManager.h"
+#include "cPopulation.h"
+#include "cTestCPU.h"
+#include "cEventList.h"
+#include "cInitFile.h"
+#include "cTools.h"
+
+cWorld::~cWorld()
+{ 
+  delete m_conf;
+  delete m_pop;
+  delete m_hw_mgr;
+}
+
 void cWorld::Setup() {
   // Setup Random Number Generator
-  const int rand_seed = m_config->RANDOM_SEED.Get();
+  const int rand_seed = m_conf->RANDOM_SEED.Get();
+  /* DDD - for right now we need to still use g_random
   cout << "Random Seed: " << rand_seed;
   m_rng.ResetSeed(rand_seed);
   if (rand_seed != m_rng.GetSeed()) cout << " -> " << m_rng.GetSeed();
-  cout << endl;  
+  */
+  cout << "Random Seed: " << rand_seed;
+  g_random.ResetSeed(rand_seed);
+  if (rand_seed != g_random.GetSeed()) cout << " -> " << g_random.GetSeed();
+  cout << endl;
   
   // The default directory should end in a '/'.
-  cString default_dir = m_config->DEFAULT_DIR.Get();
+  cString default_dir = m_conf->DEFAULT_DIR.Get();
   char dir_tail = default_dir[default_dir.GetSize() - 1];
   if (dir_tail != '\\' && dir_tail != '/') {
     default_dir += "/";
-    m_config->DEFAULT_DIR.Set(default_dir);
+    m_conf->DEFAULT_DIR.Set(default_dir);
   }
+  
+  m_env = new cEnvironment(this);
+  m_hw_mgr = new cHardwareManager(this);
+  
+  // Initialize the default environment...
+  if (m_env->Load(m_conf->ENVIRONMENT_FILE.Get()) == false) {
+    cerr << "Unable to load environment... aborting!" << endl;
+    ExitAvida(-1);
+  }
+    
+  // Setup the test CPUs.
+  int rSize = m_env->GetResourceLib().GetSize();
+  cTestCPU::Setup(this, rSize);
+
+  m_pop = new cPopulation(this);
+
+  //Setup Event List
+  m_event_mgr = new cEventManager(this);
+  m_event_list = new cEventList(m_event_mgr, new cAvidaTriggers(m_pop->GetStats()) );
+  
+  ReadEventListFile(m_conf->EVENT_FILE.Get());
+  
+  // Make sure the directory 'genebank' exits!
+  cTools::MkDir("genebank", true);
 }
+
+void cWorld::ReadEventListFile(const cString & filename)
+{
+  cInitFile event_file(filename);
+  
+  // Load in the proper event list and set it up.
+  event_file.Load();
+  event_file.Compress();
+  
+  // Loop through the line_list and change the lines to events.
+  for (int line_id = 0; line_id < event_file.GetNumLines(); line_id++) {
+    m_event_list->AddEventFileFormat(event_file.GetLine(line_id));
+  }
+  
+  ////////// Adding events from the Genesis file //////////
+  // Max Updates and/or Max Generations
+  if(m_conf->END_CONDITION_MODE.Get() == 0 ){
+    if(m_conf->MAX_UPDATES.Get() >= 0 ){
+      m_event_list->AddEvent( cEventTriggers::UPDATE, m_conf->MAX_UPDATES.Get(),
+                            cEventTriggers::TRIGGER_ONCE,
+                            cEventTriggers::TRIGGER_END, "exit", "");
+    }
+    if(m_conf->MAX_GENERATIONS.Get() >= 0 ){
+      m_event_list->AddEvent( cEventTriggers::GENERATION,
+                            m_conf->MAX_GENERATIONS.Get(),
+                            cEventTriggers::TRIGGER_ONCE,
+                            cEventTriggers::TRIGGER_END, "exit", "");
+    }
+  }else{
+    if(m_conf->MAX_UPDATES.Get() >= 0 && m_conf->MAX_GENERATIONS.Get() >= 0 ){
+      cString max_gen_str;
+      max_gen_str.Set("%d", m_conf->MAX_GENERATIONS.Get());
+      cString max_update_str;
+      max_update_str.Set("%d", m_conf->MAX_UPDATES.Get());
+      m_event_list->AddEvent( cEventTriggers::UPDATE, m_conf->MAX_UPDATES.Get(),
+                            1, cEventTriggers::TRIGGER_END,
+                            "exit_if_generation_greater_than", max_gen_str);
+      m_event_list->AddEvent( cEventTriggers::GENERATION,
+                            m_conf->MAX_GENERATIONS.Get(),
+                            .01, cEventTriggers::TRIGGER_END,
+                            "exit_if_update_greater_than", max_update_str);
+    }
+  }
+}
+
+void cWorld::GetEvents()
+{  
+  if (m_pop->GetSyncEvents() == true) {
+    SyncEventList();
+    m_pop->SetSyncEvents(false);
+  }
+  m_event_list->Process();
+}
+
+int cWorld::GetNumInstructions()
+{
+  return m_hw_mgr->GetInstSet().GetSize();
+}
+
+int cWorld::GetNumTasks()
+{
+  return m_env->GetTaskLib().GetSize(); 
+}
+
+int cWorld::GetNumReactions()
+{
+  return m_env->GetReactionLib().GetSize();
+}
+
+int cWorld::GetNumResources()
+{
+  return m_env->GetResourceLib().GetSize();
+}

Modified: branches/brysonda/source/main/cWorld.h
===================================================================
--- branches/brysonda/source/main/cWorld.h	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/cWorld.h	2005-10-20 04:37:15 UTC (rev 355)
@@ -16,46 +16,67 @@
 #ifndef cRandom_h
 #include "cRandom.h"
 #endif
+#include "cEventList.h"
 
+class cEnvironment;
+class cEventManager;
+class cHardwareManager;
+class cPopulation;
+
 class cWorld
 {
 protected:
-  cAvidaConfig* m_config;
+  cAvidaConfig* m_conf;
+  cEventManager* m_event_mgr;
+  cEventList* m_event_list;
+  cEnvironment* m_env;
+  cHardwareManager* m_hw_mgr;
+  cPopulation* m_pop;
+
   cRandom m_rng;
 
-  bool m_test_on_divide;
-  bool m_test_sterilize;
-  
   void Setup();
 
 public:
-  explicit cWorld() : m_config(new cAvidaConfig()) { Setup(); }
-  cWorld(cAvidaConfig* cfg) : m_config(cfg) { Setup(); }
-  ~cWorld() { delete m_config; }
+  explicit cWorld() : m_conf(new cAvidaConfig()) { Setup(); }
+  cWorld(cAvidaConfig* cfg) : m_conf(cfg) { Setup(); }
+  ~cWorld();
   
-  void SetConfig(cAvidaConfig* cfg) { delete m_config; m_config = cfg; }
-  cAvidaConfig& GetConfig() { return *m_config; }
-  
+  void SetConfig(cAvidaConfig* cfg) { delete m_conf; m_conf = cfg; }
+  cAvidaConfig& GetConfig() { return *m_conf; }
+  cHardwareManager& GetHardwareManager() { return *m_hw_mgr; }
+  cPopulation& GetPopulation() { return *m_pop; }
+  cEnvironment& GetEnvironment() { return *m_env; }
+
   // Config Dependent Modes
   bool GetTestOnDivide() const
   {
-    const bool revert_fatal = m_config->REVERT_FATAL.Get() > 0.0;
-    const bool revert_neg = m_config->REVERT_DETRIMENTAL.Get() > 0.0;
-    const bool revert_neut = m_config->REVERT_NEUTRAL.Get() > 0.0;
-    const bool revert_pos = m_config->REVERT_BENEFICIAL.Get() > 0.0;
-    const bool fail_implicit = m_config->FAIL_IMPLICIT.Get() > 0;
+    const bool revert_fatal = m_conf->REVERT_FATAL.Get() > 0.0;
+    const bool revert_neg = m_conf->REVERT_DETRIMENTAL.Get() > 0.0;
+    const bool revert_neut = m_conf->REVERT_NEUTRAL.Get() > 0.0;
+    const bool revert_pos = m_conf->REVERT_BENEFICIAL.Get() > 0.0;
+    const bool fail_implicit = m_conf->FAIL_IMPLICIT.Get() > 0;
     return (revert_fatal || revert_neg || revert_neut || revert_pos || fail_implicit);
   }
   bool GetTestSterilize() const
   {
-    const bool sterilize_fatal = m_config->STERILIZE_FATAL.Get() > 0.0;
-    const bool sterilize_neg = m_config->STERILIZE_DETRIMENTAL.Get() > 0.0;
-    const bool sterilize_neut = m_config->STERILIZE_NEUTRAL.Get() > 0.0;
-    const bool sterilize_pos = m_config->STERILIZE_BENEFICIAL.Get() > 0.0;
+    const bool sterilize_fatal = m_conf->STERILIZE_FATAL.Get() > 0.0;
+    const bool sterilize_neg = m_conf->STERILIZE_DETRIMENTAL.Get() > 0.0;
+    const bool sterilize_neut = m_conf->STERILIZE_NEUTRAL.Get() > 0.0;
+    const bool sterilize_pos = m_conf->STERILIZE_BENEFICIAL.Get() > 0.0;
     return (sterilize_fatal || sterilize_neg || sterilize_neut || sterilize_pos);
   }
   
   cRandom& GetRandom() { return m_rng; }
+
+  void GetEvents();
+  void ReadEventListFile(const cString & filename);
+  void SyncEventList() { m_event_list->Sync(); }
+
+  int GetNumInstructions();
+  int GetNumTasks();
+  int GetNumReactions();
+  int GetNumResources();
 };
 
 #endif

Deleted: branches/brysonda/source/main/main.pro
===================================================================
--- branches/brysonda/source/main/main.pro	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/main.pro	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,14 +0,0 @@
-
-AVIDA_SRC_DIR = ..
-
-TEMPLATE    = app
-TARGET      = primitive
-DESTDIR	= ../../work
-CONFIG      *= warn-on release
-CONFIG      *= cpu event main trio tools
-CONFIG	+= console
-OBJECTS_DIR  = objs
-
-include($$AVIDA_SRC_DIR/modules.pri)
-
-SOURCES += primitive.cc

Deleted: branches/brysonda/source/main/main_sub.pri
===================================================================
--- branches/brysonda/source/main/main_sub.pri	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/main_sub.pri	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,95 +0,0 @@
-
-main {
-  HEADERS += \
-             $$MAIN_HH/cAnalyze.h \
-             $$MAIN_HH/cAnalyzeUtil.h \
-             $$MAIN_HH/avida.h \
-             $$MAIN_HH/cBirthChamber.h \
-             $$MAIN_HH/cCallbackUtil.h \
-             $$MAIN_HH/cConfig.h \
-             $$MAIN_HH/cEnvironment.h \
-             $$MAIN_HH/cFitnessMatrix.h \
-             $$MAIN_HH/cGenebank.h \
-             $$MAIN_HH/cGenome.h \
-             $$MAIN_HH/cGenomeUtil.h \
-             $$MAIN_HH/cGenotype.h \
-             $$MAIN_HH/cInjectGenotype.h \
-             $$MAIN_HH/cInjectGenebank.h \
-             $$MAIN_HH/cInstruction.h \
-             $$MAIN_HH/cInstLibBase.h \
-             $$MAIN_HH/cInstSet.h \
-             $$MAIN_HH/cInstUtil.h \
-             $$MAIN_HH/cLandscape.h \
-             $$MAIN_HH/cLineage.h \
-             $$MAIN_HH/cLineageControl.h \
-             $$MAIN_HH/cOrganism.h \
-             $$MAIN_HH/cPhenotype.h \
-             $$MAIN_HH/cPopulationInterface.h \
-             $$MAIN_HH/cPopulation.h \
-             $$MAIN_HH/cPopulationCell.h \
-             $$MAIN_HH/cReaction.h \
-             $$MAIN_HH/cReactionResult.h \
-             $$MAIN_HH/cResource.h \
-             $$MAIN_HH/cResourceCount.h \
-             $$MAIN_HH/cResourceLib.h \
-             $$MAIN_HH/cSpecies.h \
-             $$MAIN_HH/cStats.h
-
-  SOURCES += \
-             $$MAIN_CC/cAnalyze.cc \
-             $$MAIN_CC/cAnalyzeUtil.cc \
-             $$MAIN_CC/cAnalyzeGenotype.cc \
-             $$MAIN_CC/avida.cc \
-             $$MAIN_CC/cAvidaDriver_Analyze.cc \
-             $$MAIN_CC/cAvidaDriver_Base.cc \
-             $$MAIN_CC/cAvidaDriver_Population.cc \
-             $$MAIN_CC/cBirthChamber.cc \
-             $$MAIN_CC/cCallbackUtil.cc \
-             $$MAIN_CC/cConfig.cc \
-             $$MAIN_CC/cEnvironment.cc \
-             $$MAIN_CC/cFitnessMatrix.cc \
-             $$MAIN_CC/cGenebank.cc \
-             $$MAIN_CC/cGenome.cc \
-             $$MAIN_CC/cGenomeUtil.cc \
-             $$MAIN_CC/cGenotype.cc \
-             $$MAIN_CC/cGenotype_BirthData.cc \
-             $$MAIN_CC/cGenotypeControl.cc \
-             $$MAIN_CC/cGenotype_TestData.cc \
-             $$MAIN_CC/cInstruction.cc \
-             $$MAIN_CC/cInstSet.cc \
-             $$MAIN_CC/cInstUtil.cc \
-             $$MAIN_CC/cInjectGenebank.cc \
-             $$MAIN_CC/cInjectGenotype.cc \
-             $$MAIN_CC/cInjectGenotype_BirthData.cc \
-             $$MAIN_CC/cInjectGenotypeControl.cc \
-             $$MAIN_CC/cInjectGenotypeQueue.cc \
-             $$MAIN_CC/cLandscape.cc \
-             $$MAIN_CC/cLineage.cc \
-             $$MAIN_CC/cLineageControl.cc \
-             $$MAIN_CC/cLocalMutations.cc \
-             $$MAIN_CC/cMutationLib.cc \
-             $$MAIN_CC/cMutationRates.cc \
-             $$MAIN_CC/cMutation.cc \
-             $$MAIN_CC/cMxCodeArray.cc \
-             $$MAIN_CC/cOrganism.cc \
-             $$MAIN_CC/cPhenotype.cc \
-             $$MAIN_CC/cPopulationInterface.cc \
-             $$MAIN_CC/cPopulation.cc \
-             $$MAIN_CC/cPopulationCell.cc \
-             $$MAIN_CC/cReaction.cc \
-             $$MAIN_CC/cReactionLib.cc \
-             $$MAIN_CC/cReactionProcess.cc \
-             $$MAIN_CC/cReactionRequisite.cc \
-             $$MAIN_CC/cReactionResult.cc \
-             $$MAIN_CC/cResource.cc \
-             $$MAIN_CC/cResourceCount.cc \
-             $$MAIN_CC/cResourceLib.cc \
-             $$MAIN_CC/cSpatialCountElem.cc \
-             $$MAIN_CC/cSpatialResCount.cc \
-             $$MAIN_CC/cSpecies.cc \
-             $$MAIN_CC/cSpeciesControl.cc \
-             $$MAIN_CC/cSpeciesQueue.cc \
-             $$MAIN_CC/cStats.cc \
-             $$MAIN_CC/cTaskEntry.cc \
-             $$MAIN_CC/cTaskLib.cc
-}

Modified: branches/brysonda/source/main/primitive.cc
===================================================================
--- branches/brysonda/source/main/primitive.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/main/primitive.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,9 +1,8 @@
 /*
- *  nGeometry.h
+ *  primitive.cc
  *  Avida2
  *
  *  Copyright 2005 Michigan State University. All rights reserved.
- *  Copyright 1993 - 2001 California Institute of Technology.
  *
  */
 
@@ -11,21 +10,9 @@
 
 #include "avida.h"
 #include "cAvidaConfig.h"
-#include "cAvidaDriver_Analyze.h"
+//#include "cAvidaDriver_Analyze.h"
 #include "cAvidaDriver_Base.h"
 #include "cAvidaDriver_Population.h"
-#include "cCallbackUtil.h"
-#include "cConfig.h"
-#include "cEnvironment.h"
-#include "cHardware4Stack.h"
-#include "cHardwareUtil.h"
-#include "cHardwareCPU.h"
-#include "cHardwareSMT.h"
-#include "cInstLibCPU.h"
-#include "cPopulation.h"
-#include "cPopulationInterface.h"
-#include "cResourceCount.h"
-#include "cTestCPU.h"
 #include "cWorld.h"
 #include "defs.h"
 
@@ -47,25 +34,13 @@
   cout << "under certain conditions. See file COPYING for details." << endl << endl;
   
   // Initialize the configuration data...
-  //cerr << "<newconfig>" << endl;
-  //cWorld* world = new cWorld(cAvidaConfig::LoadWithCmdLineArgs(argc, argv));
-  //cerr << "</newconfig>" << endl << endl;
+  cWorld* world = new cWorld(cAvidaConfig::LoadWithCmdLineArgs(argc, argv));
   
-  cConfig::InitGroupList();
-  cConfig::Setup(argc, argv);
-  cConfig::SetupMS();
-
-  cEnvironment environment;
-  cPopulationInterface test_interface;
-
-  SetupAvida(environment, test_interface);
-
-  if (cConfig::GetAnalyzeMode() == true) {
-    cAvidaDriver_Base::main_driver =
-      new cAvidaDriver_Analyze(cConfig::GetInteractiveAnalyze(), &environment);
+  if (world->GetConfig().ANALYZE_MODE.Get() > 0) {
+    //cAvidaDriver_Base::main_driver = new cAvidaDriver_Analyze((world->GetConfig().ANALYZE_MODE.Get() == 2), world);
   }
   else {
-    cAvidaDriver_Base::main_driver = new cAvidaDriver_Population(environment);
+    cAvidaDriver_Base::main_driver = new cAvidaDriver_Population(world);
   }
 
   cout << endl;

Deleted: branches/brysonda/source/testsuites/unit_testsuites/config.t.cc
===================================================================
--- branches/brysonda/source/testsuites/unit_testsuites/config.t.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/testsuites/unit_testsuites/config.t.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,40 +0,0 @@
-#include <iostream>
-
-#ifndef CONFIG_HH
-#include "cConfig.h"
-#endif
-#ifndef TEST_CASE_H
-#include "third-party/yaktest/cTestCase.hh"
-#endif
-#ifndef TEXT_TEST_INTERPRETER_H
-#include "third-party/yaktest/cTextTestInterpreter.hh"
-#endif
-#ifndef TEST_RESULT_H
-#include "third-party/yaktest/cTestResult.hh"
-#endif
-
-using namespace std;
-namespace nTemplateTest {
-  class cTemplateTest : public cTestCase {
-  public: virtual void test() {
-      test_is_true(true);
-  } };
-  
-  class cTestSuite : public cTestCase {
-  public: cTestSuite() : cTestCase() {
-    adoptTestCase(new cTemplateTest); 
-  } };
-}
-
-using namespace nTemplateTest;
-int main(int argc, char *argv[]){
-  cout << endl << "Testing Template." << endl;
-  int successes = 0, test_count = 0;
-  cTestSuite inst_test;
-  inst_test.runTest();
-  successes += inst_test.lastResult().successCount();
-  test_count += inst_test.lastResult().totalTestCount();
-  cTextTestInterpreter interpreter;
-  cout << interpreter.interpretation(inst_test.lastResult());
-  return(successes != test_count);
-}

Modified: branches/brysonda/source/testsuites/unit_testsuites/event_factory_manager.t.cc
===================================================================
--- branches/brysonda/source/testsuites/unit_testsuites/event_factory_manager.t.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/testsuites/unit_testsuites/event_factory_manager.t.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,7 +1,7 @@
 #include <iostream>
 
 #ifndef EVENT_FACTORY_MANAGER_HH
-#include "cEventFactoryManager.h"
+#include "cEventManager.h"
 #endif
 #ifndef TEST_CASE_H
 #include "third-party/yaktest/cTestCase.hh"

Modified: branches/brysonda/source/testsuites/unit_testsuites/hardware_4stack.t.cc
===================================================================
--- branches/brysonda/source/testsuites/unit_testsuites/hardware_4stack.t.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/testsuites/unit_testsuites/hardware_4stack.t.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,6 +1,6 @@
 #include <iostream>
 
-#ifndef HARDWARE_4STACK_HH
+#ifndef cHardware4Stack_h
 #include "cHardware4Stack.h"
 #endif
 #ifndef TEST_CASE_H

Modified: branches/brysonda/source/testsuites/unit_testsuites/hardware_cpu.t.cc
===================================================================
--- branches/brysonda/source/testsuites/unit_testsuites/hardware_cpu.t.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/testsuites/unit_testsuites/hardware_cpu.t.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,6 +1,6 @@
 #include <iostream>
 
-#ifndef HARDWARE_CPU_HH
+#ifndef cHardwareCPU_h
 #include "cHardwareCPU.h"
 #endif
 #ifndef TEST_CASE_H

Modified: branches/brysonda/source/testsuites/unit_testsuites/hardware_factory.t.cc
===================================================================
--- branches/brysonda/source/testsuites/unit_testsuites/hardware_factory.t.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/testsuites/unit_testsuites/hardware_factory.t.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,7 +1,7 @@
 #include <iostream>
 
-#ifndef HARDWARE_FACTORY_HH
-#include "cHardwareFactory.h"
+#ifndef cHardwareManager_h
+#include "cHardwareManager.h"
 #endif
 #ifndef TEST_CASE_H
 #include "third-party/yaktest/cTestCase.hh"

Modified: branches/brysonda/source/testsuites/unit_testsuites/inst_set.t.cc
===================================================================
--- branches/brysonda/source/testsuites/unit_testsuites/inst_set.t.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/testsuites/unit_testsuites/inst_set.t.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,4 +1,4 @@
-#ifndef INST_SET_HH
+#ifndef cInstSet_h
 #include "cInstSet.h"
 #endif
 

Deleted: branches/brysonda/source/testsuites/unit_testsuites/population_event.t.cc
===================================================================
--- branches/brysonda/source/testsuites/unit_testsuites/population_event.t.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/testsuites/unit_testsuites/population_event.t.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,40 +0,0 @@
-#include <iostream>
-
-#ifndef POPULATION_EVENT_HH
-#include "cPopulationEvent.h"
-#endif
-#ifndef TEST_CASE_H
-#include "third-party/yaktest/cTestCase.hh"
-#endif
-#ifndef TEXT_TEST_INTERPRETER_H
-#include "third-party/yaktest/cTextTestInterpreter.hh"
-#endif
-#ifndef TEST_RESULT_H
-#include "third-party/yaktest/cTestResult.hh"
-#endif
-
-using namespace std;
-namespace nTemplateTest {
-  class cTemplateTest : public cTestCase {
-  public: virtual void test() {
-      test_is_true(true);
-  } };
-  
-  class cTestSuite : public cTestCase {
-  public: cTestSuite() : cTestCase() {
-    adoptTestCase(new cTemplateTest); 
-  } };
-}
-
-using namespace nTemplateTest;
-int main(int argc, char *argv[]){
-  cout << endl << "Testing Template." << endl;
-  int successes = 0, test_count = 0;
-  cTestSuite inst_test;
-  inst_test.runTest();
-  successes += inst_test.lastResult().successCount();
-  test_count += inst_test.lastResult().totalTestCount();
-  cTextTestInterpreter interpreter;
-  cout << interpreter.interpretation(inst_test.lastResult());
-  return(successes != test_count);
-}

Deleted: branches/brysonda/source/testsuites/unit_testsuites/population_event_factory.t.cc
===================================================================
--- branches/brysonda/source/testsuites/unit_testsuites/population_event_factory.t.cc	2005-10-18 22:55:20 UTC (rev 354)
+++ branches/brysonda/source/testsuites/unit_testsuites/population_event_factory.t.cc	2005-10-20 04:37:15 UTC (rev 355)
@@ -1,41 +0,0 @@
-
-#include <iostream>
-
-#ifndef POPULATION_EVENT_FACTORY_HH
-#include "cPopulationEventFactory.h"
-#endif
-#ifndef TEST_CASE_H
-#include "third-party/yaktest/cTestCase.hh"
-#endif
-#ifndef TEXT_TEST_INTERPRETER_H
-#include "third-party/yaktest/cTextTestInterpreter.hh"
-#endif
-#ifndef TEST_RESULT_H
-#include "third-party/yaktest/cTestResult.hh"
-#endif
-
-using namespace std;
-namespace nTemplateTest {
-  class cTemplateTest : public cTestCase {
-  public: virtual void test() {
-      test_is_true(true);
-  } };
-  
-  class cTestSuite : public cTestCase {
-  public: cTestSuite() : cTestCase() {
-    adoptTestCase(new cTemplateTest); 
-  } };
-}
-
-using namespace nTemplateTest;
-int main(int argc, char *argv[]){
-  cout << endl << "Testing Template." << endl;
-  int successes = 0, test_count = 0;
-  cTestSuite inst_test;
-  inst_test.runTest();
-  successes += inst_test.lastResult().successCount();
-  test_count += inst_test.lastResult().totalTestCount();
-  cTextTestInterpreter interpreter;
-  cout << interpreter.interpretation(inst_test.lastResult());
-  return(successes != test_count);
-}




More information about the Avida-cvs mailing list