Added some functions in JavaScript utils file.