updated web.js
fixed a slew of bugs