Rework Sim to have a better world model.  Added initial test code for checking that the model works.