minor JS tweaks