Added helper functions
Format the data more cleanly
The JSON data to be sent should be formatted correctly.