cleaned up script.js