Added some previously removed utility JS functions. This should fix JS script errors from the code.