Immediately after "Spider-Man 2"s release, Ivan Raimi wrote a treatment over two months, with Sam Raimi deciding to use the film to explore Peter learning that he is not a sinless vigilante, and that there also can be humanity in those he considers criminals. Harry Osborn was brought back as Raimi wanted to conclude his storyline. Raimi felt that Harry would not follow his father's legacy, but be instead "somewhere between." Sandman was introduced as an antagonist, as Raimi found him a visually fascinating character. While Sandman is a petty criminal in the comics, the screenwriters created a background of the character being Uncle Ben's killer to increase Peter's guilt over his death and challenge his simplistic perception of the event. Overall, Raimi described the film as being about Peter, Mary Jane, Harry, and the Sandman, with Peter's journey being one of forgiveness.