anchor.diff:          SizeParam ->
               Size = SizeParam
       end,
  -    case wrq:get_qs_value("sort",ReqData) of
  +	case wrq:get_qs_value("sort",ReqData) of
           undefined ->
               Sort = "user_ranking.average";
           SortParam ->
  
positive.code:     parse_datapoints(Rest, lib_json:add_value(FinalJson,"data",Datapoint)).
  
  
  %% @doc
  %% Function: filter_json/1
  %% Purpose: Used to add private filters to the json query
  %% Returns: JSON string that is updated with filter
  %% @end
  filter_json(Json) ->
          NewJson = string:sub_string(Json,1,string:len(Json)-1),
          "{\"query\":{\"filtered\":"++NewJson++",\"filter\":{\"bool\":{\"must_not\":{\"term\":{\"private\":\"true\"}}}}}}}".
  
  
  %% @doc
  
negative.code:     end,
      get_history(Rest, NrValues, lib_json:add_value(Acc,"history",IdAndDataJson)).
  
  
  %% @doc
  %% Function: parse_datapoints/2
  