Various changes to better support GJSON and a few other fixes