Minor tweaks to js