Fixing expected format (jsonp -> json) and de-hardcoding api url

+ indentation