anchor.diff:      {ok, State}.
   
   handle_info({'EXIT', Pid, Reason}, {TrackingMap, PeerId}) ->
  -    error_logger:error_report([{'Torrent EXIT', Reason}, {'State', {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),
  
positive.code: handle_cast({start_torrent, F, Torrent}, {TrackingMap, PeerId}) ->
      spawn_new_torrent(F, Torrent, PeerId, TrackingMap),
      {noreply, {TrackingMap, PeerId}};
  handle_cast({stop_torrent, F}, {TrackingMap, PeerId}) ->
      TorrentPid = ets:lookup(TrackingMap, F),
      torrent:stop(TorrentPid),
      ets:delete(TrackingMap, F),
      {noreply, {TrackingMap, PeerId}}.
  
  %% Operations
  start_torrent(File, Torrent) ->
      gen_server:cast(torrent_manager, {start_torrent, File, Torrent}).
  
  stop_torrent(File) ->
      gen_server:cast(torrent_manager, {stop_torrent, File}).
  
  %% Utility
  generate_peer_id() ->
      "Setme".
  
  
negative.code: -export([handle_info/2, code_change/3]).
  -export([start_torrent/2, stop_torrent/1]).
  
  %% 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()}}.
  