more tweaks to the js...fixing errors