Added some minor javascript tweaks