Update script.js

Cleaning the unnecessary parts of code.