Added JS and minor fixes