Fixes to JSON, Set Gateway String helper function