making minor tweaks to optimize instancesimple.js