Moved api credentials out into xml file, updated functions to use xml,
updated prediction json body, proper closing of curl connections