Added simulator, tweaked code. Optimized EVE required for espruino.