updated some js and corrected some glitches