pack/unpack methods for simulator
Basic simulator works
Clean logging
Expose simulation data in JS console
Simulator code cleanup