Added JSON Data and some other fixes to javascript.