Tweaked some JavaScript