Added some javascript helpers