Work towards a functional program

Next: work on Simulation