Added reference and minor adjustment to js