Moved code out of Sim.js into wiretap.js