Updated script.js to use options object