more tweaks to JS file