Our brief quality cable programming nightmare is over: days after negotiations looked ready to collapse over "revenue enhancements" (read: budget cuts and more commercial breaks), AMC and Lionsgate struck a deal with Mad Men creator Matthew Weiner agreed last night to a new three-year, $30 million contract for the showrunner, and all-around creative svengali. The deal all but guarantees that the critically acclaimed, marginally profitable drama will run for seven seasons, assuming AMC is able to reach extensions with principal cast members, whose contracts expire after season six.

Here's a breakdown of how the three most contentious issues were resolved.

Cast cuts

Rumors circulated that AMC asked Weiner to cut anywhere from two to six regulars from the show's cast. In an interview with Mad Men fan blog Basket of Kisses, Weiner confirmed The Wrap's report that the request was actually for him to "cut six cast members from the Emmy-winning show over three seasons," which is to say, two per season. Based on the cast list included on AMC's press release yesterday, every regular--even Sally Draper--is safe. While that number might not shrink, it is highly unlikely to grow. Weiner told The Washingrton Post's Lisa de Moraes that “cast decisions will be made based on creative decisions, not financial decisions,”but The Wrap also notes AMC has "asked [Weiner] to be judicious about signing actors who may only deliver only a couple of lines per season."

Cutting two minutes

Weiner's major concession was to cut the show's running time by two minutes so AMC could sell more commercials to offset higher carriage fees and production costs. The network made a similar request before season three, but Weiner refused to budge. The two sides eventually compromised on an extra two minutes of ads but no reduction to the show's 48-minute approximate run time. Under the new contract, Weiner agreed to shave that figure down to 45 minutes for all episodes except the season premiere and season finale, although Entertainment Weekly's James Hibberd notes the deal also includes "an option for Weiner to turn in 47-minute episodes for other platforms like VOD and DVD."

Product placement

Perhaps the most misunderstood part of the negotiations was AMC's request for more "product integration"--i.e., product placement--in episodes. While companies like Utz, Kodak, and John Deere (obviously) did not pay to have their products serve as major plot points on the show, paid campaigns fill out the edges of the program. Heineken paid for the privilege of being the beer that ruined the Drapers' dinner party, as did Hilton hotels. AMC wanted sponsors to be able to tout the product placement as soon as an episode aired. Weiner wanted to preserve the current policy preventing sponsors from speaking up until the end of the season. According to The Wall Street Journal, Weiner won out on this point. "Product integration remains the same," he confirmed to The Washington Post.