Slight tweaks to JS