Lots of changes

Several changes introduced, bug fixes, etc..

Still just a sketch of the simulator environment!