reformulated a lot of the previous files, added supporting functions to ...

...enable sim to run and all math to be done properly. 

This version is the first with a fully working simulation, as well as working Monte Carlo driver as well.