Added some javascript for json processing