Split reusable json parse functions into a separate file.  Formatting cleanup and add TODOs.