json_decref consumes ref
formatting
move libcfjson into a separate directory