Small tidying to scripts.js