More rejigging of JS