Resolved the Memory Corruption Bug
Add code to return json objects and make strings, explicitly free-decref the json objects