Some JS tweaks