Memory issue unresolved. Have to free up strings using ref_dec JSON
Added Heartbeat code