script.js cleanups as per JSHint