anchor.diff:          torrent_id=TorrentID,
           torrent_pid=TorrentPid,
           chunk_size=ChunkSize,
  +        %% All Valid pieces stay Valid
           pieces_valid=PiecesValid,
  -        %% All valid pieces are also begun, assigned and stored
  -        pieces_begun=PiecesValid,
  -        pieces_assigned=PiecesValid,
  -        pieces_stored=PiecesValid,
  +        %% All Invalid pieces are Unassigned
  +        pieces_unassigned=PiecesInvalid,
  +        %% No pieces have are yet Begun, Assigned or Stored
  +        pieces_begun=PiecesNone,
  +        pieces_assigned=PiecesNone,
  +        pieces_stored=PiecesNone,
           %% Initially, the sets of assigned and stored chunks are equal
           chunks_assigned=ChunkSets,
           chunks_stored=ChunkSets,
  
positive.code: 
  handle_call({request_chunks, PeerPid, Peerset, Numchunks}, _, State) ->
      #state{
          pieces_begun=Begun,
          pieces_assigned=Assigned,
          pieces_stored=Stored,
          chunks_assigned=AssignedChunks,
          peer_monitors=Peers} = State,
  
      %% Consider pieces that has an empty chunkset 
      
      %% If this peer has no pieces that we are already downloading, begin
      %% downloading a new piece if this peer has any interesting pieces.
      Optimal = etorrent_pieceset:intersection(Peerset,
                etorrent_pieceset:difference(Begun, Assigned)),
      HasOptimal = not etorrent_pieceset:is_empty(Optimal),
      {SubOptimal, HasSubOptimal} = case HasOptimal of
          true ->
              {false, false};
          false ->
              ISubOptimal = etorrent_pieceset:difference(Peerset, Assigned),
              IHasSubOptimal = not etorrent_pieceset:is_empty(ISubOptimal),
              {ISubOptimal, IHasSubOptimal}
      end,
  
      PieceIndex = case {HasOptimal, HasSubOptimal} of
          %% None that we are not already downloading
          %% and none that we would want to download
          {false, false} ->
              Interesting = etorrent_pieceset:difference(Peerset, Stored),
              case etorrent_pieceset:is_empty(Interesting) of
                  true  -> not_interested;
                  false -> assigned
              end;
          %% None that we are not already downloading
          %% but one ore more that we would want to download
          {false, _} ->
              etorrent_pieceset:min(SubOptimal);
          %% One or more that we are already downloading
          {_, _} ->
              etorrent_pieceset:min(Optimal)
      end,
  
      case PieceIndex of
  
negative.code:     true = register_chunk_server(TorrentID),
  
      NumPieces = length(PieceSizes),
      PiecesValid = etorrent_pieceset:from_list(FetchedPieces, NumPieces),
      PiecesNone = etorrent_pieceset:from_list([], NumPieces),
  
      %% Initialize a full chunkset for all pieces that are left to download
      %% but don't mark them as begun before a chunk has been deleted from
  