Added JS formatting settings. Reformatted JS code accordingly