Relations between the DA's office and the police, especially between Gordon and Harvey Dent, remains tense throughout most of the film, with corruption in the rank and file; and even within Gordon's unit, being a key source of this conflict in "The Dark Knight", with Dent suspecting that Ramirez and Wuertz are corrupt (based on his investigations while working in Internal Affairs, immediately before his election to District Attorney). In response to Dent's "attacks" on the police department and the actions of the League of Shadows from the first film, Loeb set up the Major Crimes Unit within the GPD to counter possible terrorist attacks as well as rid the city of its organized crime. In the Major Crimes Unit, acceptance of the Batman, though reluctant, is growing. By the end of the film, Batman is framed for the violent actions of Harvey Dent and the police force turns against him.