Changed curl opts and json_decode for more intuitive return values