Added JS code to set up table