anchor.diff:  show(_) ->
       io:format("Item supplied is not an integer~n").
   
  -%%--------------------------------------------------------------------
  -%% Function: check(Item) -> io()
  -%% Description: Check a torrents contents. For debugging.
  -%%--------------------------------------------------------------------
  +%% @doc Check a torrents contents. For debugging.
  +%% @end
   check(Id) ->
       etorrent_mgr:check(Id).
   
  -%%--------------------------------------------------------------------
  -%% Function: help() -> io()
  -%% Description: Provide a simple help message for the commands supported.
  -%%--------------------------------------------------------------------
  +%% @doc Provide a simple help message for the commands supported.
  +%% <p>This function will output a simple help message for the usage of the
  +%% CLI to etorrent.</p>
  +%% @end
   help() ->
       io:format("Available commands:~n", []),
   
  
positive.code:     %% Etorrent
      application:start(etorrent, permanent).
  
  start(_Type, _Args) ->
      PeerId = generate_peer_id(),
      {ok, Pid} = etorrent_sup:start_link(PeerId),
      {ok, Pid}.
  
  stop() ->
      ok = application:stop(etorrent).
  
  prep_stop(_S) ->
      io:format("Shutting down etorrent~n"),
      ok.
  
  stop(_State) ->
      ok.
  
  %%--------------------------------------------------------------------
  %% Function: list() -> io()
  %% Description: List currently active torrents.
  %%--------------------------------------------------------------------
  list() ->
      A = etorrent_torrent:all(),
      {DownloadRate, UploadRate} = etorrent_rate_mgr:global_rate(),
  
negative.code:     ok.
  
  %%--------------------------------------------------------------------
  h() -> help().
  l() -> list().
  s() -> show().
  s(Item) -> show(Item).
  
  %%=====================================================================
  percent_complete(R) ->
      %% left / complete * 100 = % done
      (R#torrent.total - R#torrent.left) / R#torrent.total * 100.
  
  %% @doc Generate a random peer id for use
  %% @end
  generate_peer_id() ->
      Number = crypto:rand_uniform(0, ?RANDOM_MAX_SIZE),
      Rand = io_lib:fwrite("~B----------", [Number]),
  