Move memory allocation into static function (all succeeds or fails).
Add a unique id field to GH decoder. More refactoring, source file organization.
More refactoring, flesh out cfg_file functions.
Remove jansson memory leaks- add reference-counting logic.