anchor.diff:      Data = get_stream(State),
         case Data of
           ok -> ok;
  -        _ ->
  +        {error, Name, R} ->
  +          lager:warning("Unknown data ~p:~p!",[Name, R]),
  +          ok;
  +        Other when is_map(Other)->
             {ok, DeviceId} = maps:find(<<"coreid">>, Data),
             location_store:register_location(DeviceId, Data)
         end,
       erlang:send_after(?TIMEDIFF, self(), request, []),
       {noreply, State}
  -  catch Err:R ->
  -    lager:error("Error during sending request ~p", [{Err, R}]),
  -      {stop, {Err, R}, State}
  +  catch Err:Reason ->
  +    lager:error("Error during sending request ~p", [{Err, Reason}]),
  +    {stop, {Err, Reason}, State}
     end.
   
   terminate(Reason, State) ->
  
positive.code: get_stream(State) ->
    D = accessed_request(?EVENTS, "GET", [], [], State),
    {ok, {_, _, Body, _ , _}} = D,
    case Body of
      <<":ok\n\n\n">> ->
        ok;
      _ ->
        get_response_body_raw(D)
    end.
  
  %% internals: encoding x-www-form-urlencoded type
  url_encode(Data) ->
  
negative.code:   {ok, AccessToken} = maps:find(<<"access_token">>, TokenMap),
    AccessedPath = list_to_binary(binary_to_list(Path) ++ "?access_token=" ++ binary_to_list(AccessToken)),
    request(AccessedPath, Method, Headers, Body).
  