Made some changes in js.