Adding all the json creation stuff