reflow the Js bits a bit