Refactor JSON hooks to separate modules