Update script.js

Added more comments