Removed redundant code from script.js