Modify script.js, revise declarations