Numerous JSON type fixes and expansion of file pointers