[Spoiler alert: The following piece contains spoilers for The Knick season finale, "Crutchfield." Stop here if you haven't seen it. You've been warned.]

There were about a bajillion "Oh, crap!" moments on The Knick finale last night. (OK, like, five.) Of those, the two most intense draw on actual medical procedures even more tragic than what went down on the show. Removing teeth to treat insanity? That actually happened. Using heroin to treat cocaine addiction? That's not far from the truth.

The first, and more ghastly, was the "treatment" for madness administered to Dr. Everett Gallinger's wife, Eleanor (Maya Kazan). In the episode, her doctor—played by John Hodgman—removes her teeth because he believes "all mental disorders stem from disease and infection polluting the brain" and those infections are carried in the teeth.

That practice, and its practitioner, are based on the treatments of Dr. Henry Cotton, who ran the Trenton State Hospital mental asylum in New Jersey in the early 20th century. When Stanley Burns, The Knick's technical adviser, told the show's creators about Cotton, they "fell in love with the story" and wrote it into the finale. "You see that very well illustrated and portrayed when he removes the teeth of Gallinger's wife," Burns says. "Then, of course, they mention my favorite part of the story which is quite sad and pathetic, which is that he removed the teeth of his children."

Oh, yeah. That. Hodgman's character mentions in the show that he "removed my own children's teeth as a preventative measure." This also is true; Cotton extracted the teeth of two of his sons. The thing that makes it even more tragic, according to Burns, is that both later committed suicide as adults.

Cotton's practices were later investigated by Dr. Phyllis Greenacre, who found that—as a Telegraph piece noted—"the chief clinical effect of his operations was the death of his patients." Her report was suppressed by his mentor, Johns Hopkins psychiatrist Dr. Adolf Meyer, even though he'd requested the evaluation. Cotton was diagnosed with a heart condition and angina in 1928 and had several teeth removed as a treatment. He died of a heart attack in 1933.

Treating Cocaine Addiction With Heroin

Later in the episode, Dr. John Thackery (Clive Owen), who has been a cocaine addict almost from the start of the season, is sent away for treatment—which, ominously, involves dosing him with heroin. To understand what's happening to Thackery, it might help to remember his character's addiction is loosely based on the life of Johns Hopkins physician William Halsted—one of the founders of modern surgery, and a doctor who became an "accidental addict" after trying the newly-discovered anethetic. "Doctors practiced on themselves," Burns says, explaining why so many doctors became drug users. "In those days when cocaine came out, for instance, doctors experimented with it."

Those who have been watching The Knick all season may recognize Halsted, or at least his name. He's a character on the show, and the guy who introduced Thackery's mentor Dr. J.M. Christiansen (Matt Frewer) to the performance benefits of cocaine. Similar to Thackery's arc this season, the real Halstead developed a habit so bad that at one point he published a medical paper full of so much nonsense it largely ended his career as a doctor in New York. His addiction was treated with morphine and, as a New York Times review of Halsted's biography noted, he found himself "in the grips of a double-barreled addiction."

Does that mean Thackery faces same fate in Season 2? Only The Knick's showrunners know. But it may not be all bad. Evan as Halsted battled dueling addictions, he enjoyed a successful run as one of four founding physicians at Johns Hopkins, where he eventually became chief of surgery.

And because you're wondering, yes, the assurances Thackery received that his heroin came from Bayer are true. The drug manufacturer offered heroin commercially starting in 1898 and, as Burns notes, the show wouldn't name-drop Bayer without fact-checking. "Of course," he says. "You wouldn't want to use a drug company's name in vain."