JSON code removals and cleanups
Not sure this code ever did anything - seems to be optimized out. Still more to be done but this works for a first pass

As far as the functions go, adding `static` is a best practice for functions that aren't meant to be exported from a shared library (C defaults functions to extern visibility, which you could argue is unfortunate)
Thanks @WillAyd 