many JSON format change and fixes to previous untested patches