Code now all in a module.  SimulationType does not work yet.