Updated JS code for comments