Uses multi_json, fixes content-type & removes deprecation warnings.