more tweaks to js snippets