In his attempt to smooth things over with Martinez, Hanlon offers the young cop a bribe to keep quiet. James feels out of his depth with the whole situation, and goes to Kelly for advice. John warns him that if he goes to Internal Affairs about Hanlon, he could wind up spending the rest of his career there, because cops don't trust guys who rat on other cops, dirty or not. James agrees to try to work it out privately with Hanlon.
But when James returns to the building, he finds out that Mr. Mack, a neighbor who often kept an eye on Roberto, just fell to his death through a loose hallway railing. Kelly and Sipowicz get the case, and while James tells John about another suspicious tenant death from a few months back, Andy finds fresh screwdriver marks where the railing came loose. James knows that Hanlon did this, but John asks him to cool off, promising that he'll take care of it himself.
Because Hanlon is working a 4 to 12 shift at his precinct at the time, John and Andy wait until the next morning so they can interview him on their own turf. Hanlon recognizes John's name, and says that he was buddies with John's dad, John Kelly Sr., who died in the line of duty when John was 11. He admits that the landlord wants the tenants out, but claims to keep things running at "a basic level," and denies any complicity in the "accidental" death of Mr. Mack. Before leaving, he invites John to have a drink with him sometime so he can tell him stories about his old man. John, disgusted, tells Andy that there's no way his father would have been friends with such a slimeball, whom he's sure killed Mr. Mack.
James' father, Hector Martinez, comes to the precinct to ask where Roberto is. James tries to assure his father that he's doing a good job looking after him, but his "Papi" doesn't believe him, and threatens to smack James around for making him and his mother so worried. Fortunately, John interrupts things to call James into Fancy's office, and a disgruntled Hector leaves.
Fancy tells James that with no witnesses or physical evidence, they can't charge Hanlon with murder, even if they think he did it. James decides to go forward with the bribery charge, despite the warnings from Fancy and John about what it'll do to his career. John mentions that he has a friend in Internal Affairs, and offers to bring James' case to him personally.
John finds Kevin Sullivan, whom he hasn't seen since their early days on the force together, playing the bagpipes in a Queens cemetary. Kevin and John start to get into their old argument about what caused him to get stuck in Internal Affairs all those years ago, but John changes the subject to Jack Hanlon. Kevin says that the best he could do if James decided to testify is to keep his name out of the papers, but that wouldn't stop Hanlon from smearing James' name to every cop he knows -- just like what happened to Kevin after he reported on a dirty cop as a rookie.
After finding out that James and Roberto are the only two who heard the criminal solicitation, and that Roberto is currently missing and unavailable to give a statment, Kevin says that the only way to bust Hanlon is for James to wear a wire and get him to repeat the bribe. James doesn't want to, but can't get over the fact that Hanlon likely caused the deaths of two innocent people, and agrees to go along with the plan.
John spots James getting equipped, and decides he can't let the kid have his career ruined like this. He offers to approach Hanlon himself and try to get a confession about the murder from him, but refuses to wear a wire.
He finds Hanlon in his apartment, and says that he's decided to take him up on the offer for drinks and stories about his dad. Hanlon starts reminiscing about the days when the department was run by the Irish and the streets were supposedly safer, but eventually admits that he only knew John Sr. from a professional distance. John switches gears and brings up Mack's death, and asks what he should do about his suspicion that Jack did it. Hanlon figures that Kelly's shaking him down, and offers him a thousand dollars to keep quiet. John says that what he really wants is to hear Hanlon say that he did it, and Hanlon finally confesses that he did loosen screws and take out nails in the railing. John declines further offers of money, reluctantly shakes Hanlon's hand, and heads out to his car, where Andy's been waiting the whole time. He pulls a tape recorder out of his pocket, confirms that it recorded the whole conversation, and tells his partner, "Got him. Now take me home before I puke."
When the Internal Affairs cops bring Hanlon in for booking, he raises a loud stink about what a rat Kelly is, which leads several other detectives in the squad, led by Greg Medavoy, to approach John and ask him to explain why he turned in another cop. Andy loudly defends his partner, pointing out that Hanlon killed two people for money, but it's John's offer to take the squad out for pizza and beer to talk things over that quiets everyone down.
James, who's already thanked John for taking all the heat on this for him, gets word that Roberto got arrested by a narcotics unit, and arranges for Sgt. Agostini to release his brother into his care, and finally gets him checked into the Chemical Dependency Unit at Manhattan State Hospital. He brings his Papi, who knew nothing about Roberto's addiction, to the hospital to see him, but when Hector finds out that his son is a junkie, he refuses to see him. James decides to go in himself, but Hector eventually relents and decides it would be better if they went in together.
Meanwhile, John pays another visit to Kevin at the cemetary. Kevin wishes that someone had stuck up for him way back when like John stuck up for Martinez, but there's nothing either of them can do to change the past. Kevin's biggest regret is that his outcast status has kept him, the best bagpiper in the department, from getting invited to join the elite Emerald Society pipers' band. Figuring that he'd like at least one other cop to know how good he is, Kevin plays John a beautiful Irish lullaby as the two stare at the sun setting over the Manhattan skyline.
John, realizing that Stillwell's pranks have been getting weirder and weirder lately, takes him out to lunch, and drags a relucant Andy with him. They manage to convince him to stop the lunch order gag out of respect for the sarge, and he admits that he's been a little stressed lately because of financial problems stemming from his gambling habit and a confidence scheme that cost him his entire pension fund. But just when he starts acting normal, the waiters at the restaurant start singing "Happy Birthday" to Andy, and Stillwell starts laughing hysterically at what he thinks is a brilliant gag. Mercifully, John and Andy are saved by their beepers, but Fancy, who's having lunch several tables down, witneses the whole thing and looks concerned.
The next day, Stillwell apologizes to Sgt. Agostini, and seems to be straightening out, until he asks John and Andy to listen in on the statement of a 60-year-old man who claims to have been abducted by two beautiful young women and forced to perform sexual favors on them. The situation becomes extremely awkward, and Stillwell starts berating the man for wasting his time with a made-up story. The humiliated witness storms out of the precinct, with Stillwell yelling at him all the way. The scene catches the attention of the entire detective's squad, and as Stillwell looks at his colleagues' jaws drop, he bursts out laughing, explaining that the whole thing was an elaborate joke he set up. Unfortunately, he's the only one laughing, and Fancy quietly asks Stillwell for his gun, and suggests that they go to department Psych Services together so that he can get the help he obviously needs. Stillwell resists, but eventually hands over his weapon and walks out with the boss, sighing, "We're off the see the wizard."
After much negotiating for the services of The Roach, whose time is in heavy demand, Jimmy and Laura get permission to use him for their case. As it turns out, The Roach is none other than Alfonse Giardella, who's back in his suite at the Seville after a stay in Washington. Alfonse takes an instant shine to the lovely Laura, whom he doesn't realize is the ex-wife of John Kelly, and after confirming that he can help in the prosecution of Reyes, suggests that he might like for Jimmy and Laura to prosecute all the cases he's involved in. Laura cringes at Giardella's lear, but Jimmy seems excited by the possibilities.