Kirk Honeycutt is the author of the forthcoming book John Hughes: A Life in Film, to be published March 25. Below is an expanded excerpt from his book, which goes behind the scenes of the production of the classic comedy, turning 30 this year.

Just as politicians have their stump speeches, filmmakers develop favorite quotes and sound bites to fall back on when talking to journalists. The late John Hughes, known for films about teenage angst and high-school life, loved to mock how studio executives usually approached teen pictures.

It was certainly true that Universal’s front office couldn’t understand the concept behind what became his most famous film, The Breakfast Club. All they understood, he would insist in interviews, was that it was five kids in detention talking for 90 minutes.

“Worse,” he once declared in a 1992 interview with Mirabella magazine, “there were no bare breasts, no party scene, no guys drinking beer—the things they thought a teenage picture needed.”

After that film, Hughes built an astonishing career encompassing more than 40 film titles, almost entirely comedies aimed at teen or family audiences. Yet what got omitted from his funny digs at sex- and booze-obsessed executives anxious to make typical teen pictures is that those were his original instincts, too.

Remember, his background was National Lampoon. In the late 1970s, National Lampoon was ground zero in America for irreverent, angry, smart—and smart-assed—comedy. Off-color humor, bare-breasted maidens, and a takeoff on pornographic books were par for the course. Hughes, who began as a freelancer but was eventually put on staff, wrote his share of snarky, risqué material.

When he, like many Lampoon staffers, graduated to writing movies, he continued in this mode for a while. Indeed his first screenwriting credit, National Lampoon’s Class Reunion, an attempt to parody both the teen sex comedy and slasher horror films, fell well within the Lampoon tradition.

The first true John Hughes comedy was National Lampoon's Vacation, which Harold Ramis directed. Starring Chevy Chase and Beverly D’Angelo, the movie was in fact R-rated, unusual for a comedy in those days. Kids smoked pot, f-words were frequent, an adolescent chugged a beer, and Mom displayed her breasts.

Even in Hughes’s first outing as a director, the delightful Sixteen Candles, the studio had to frantically edit out f-bombs to avoid an R rating. Binge drinking and a girl’s nude shower scene remained, however.

So when Hughes came to shoot The Breakfast Club, the ex-Lampooner was still searching for the right tone for his own brand of teen film. During rehearsals in Chicago, his two young actresses, Molly Ringwald and Ally Sheedy, joined swiftly by co-producer Michelle Manning, ganged up on him. They strongly objected to the gratuitous female nudity in the screenplay.

To break up a highly claustrophobic talkathon, Hughes had written a sequence in which the school's synchronized-swimming team came by to practice with its extremely sexy P.E. teacher. The youngsters would sneak out of the library and find a peephole into the women’s locker room. There, they would spy the well-endowed P.E. teacher topless. Karen Leigh Hopkins, who would later find success as an actress and screenwriter, was cast in the role.

This is really sexist and misogynistic, they told Hughes. Why would you do this?

Hughes listened. That night he sat down to rewrite. The next morning Hughes came in with a new version, where a janitor replaced the P.E. teacher.