anchor.diff:  -export([handle_info/2, code_change/3]).
   -export([start_torrent/2, stop_torrent/1]).
   
  -%% Callbacks
  +%% API
   start_link() ->
       gen_server:start_link({local, torrent_manager}, torrent_manager, [], []).
   
  +start_torrent(File, Torrent) ->
  +    gen_server:cast(torrent_manager, {start_torrent, File, Torrent}).
  +
  +stop_torrent(File) ->
  +    gen_server:cast(torrent_manager, {stop_torrent, File}).
  +
  +%% Callbacks
   init(_Args) ->
       io:format("Spawning torrent manager~n"),
       {ok, {ets:new(torrent_tracking_table, [named_table]), generate_peer_id()}}.
  
positive.code:     {ok, State}.
  
  handle_info({'EXIT', Pid, Reason}, {TrackingMap, PeerId}) ->
      error_logger:error_report([{'Torrent EXIT', Reason}, {'State', {TrackingMap, PeerId}}]),
      [{File, Torrent}] = ets:match(TrackingMap, {Pid, '$1', '$2'}),
      ets:delete(TrackingMap, Pid),
      spawn_new_torrent(File, Torrent, PeerId, TrackingMap),
  
negative.code: handle_info(Info, State) ->
      error_logger:info_report([{'INFO', Info}, {'State', State}]),
      {noreply, State}.
  
  terminate(shutdown, _State) ->
      ok.
  