Add fixes to javascript
building json