Minor updates on Javascript