Update script.js

More refactoring. Added object to store all constants. Add any new constants to this object.