Simulation:  minor improvements
Refactoring....lots of it.....