Refactored run() in Simulation.java

- added some helper methods and javadoc to InstanceOfPeriodicTask
- still room for refactoring ("check whatever" comment)