Adding objects to handle API object calls. Adding some error handling to the API call function. Returning data decoded from JSON as an associative array.