javascript tweaks