Switched the json format used to pass data into JS lib
Merged in bug fix from master
Js currently broken