Girls is not a show that shies away from the late-season plot twist. Think of Jessa's surprise marriage in the first-season finale, Hannah's flare-up of obsessive-compulsive disorder in season two, or her out-of-nowhere acceptance to the University of Iowa last year. Even by those standards, Girls' fourth-season bombshell—Hannah's father Tad (Peter Scolari) coming out of the closet—is quite the seismic reveal. But what really distinguished this moment is that the show has actually been building up to it slowly with the kind of patience it never mastered until now. Four years in, Girls is still attracting the kind of tiresome questions that unnecessarily require Lena Dunham to "defend" its sex scenes. But the even more noteworthy development is how much better the comedy has gotten at long-form storytelling since it debuted in 2012.

The early episodes of Girls were forgivably scattershot: The show was, after all, essaying the lives of confused twenty-somethings just out of college, the hardest time of all to try and distinguish any particular arc to one's life. Its first season had a couple of major through lines—Hannah's burgeoning relationship with Adam (Adam Driver), which showed signs of life before stalling out; and the disintegration of her relationship with best friend Marnie (Allison Williams), which exploded into a massive fight at the end of the season. Because Girls so frequently features episodes in which its central characters don't really interact, the brewing disillusion came off as forced, and the fight never landed with the weight the show intended.

Hannah's OCD in season two was clearly a very personal story that Dunham wanted to tell, and small hints had been dropped in earlier episodes, but the immediate severity with which her disorder surfaced was blindsiding. The abruptness made a certain sort of sense—especially to friends and family, mental illness can sometimes feel like it's appearing out of nowhere—but it was clumsily paired with Hannah's sudden reconciliation with Adam. His transformation from brooding and scary oddball (one sex scene with a girlfriend played by Shiri Appleby felt like a borderline assault) to Hannah's tender protector had no logic to it, and gave the subsequent season, in which their relationship grew increasingly tedious, a listless feel.

More so than any other plotline, Tad's closeted homosexuality had been hinted at from the first season when, in the third episode, Hannah's ex-boyfriend Elijah (Andrew Rannells) theorized that Hannah’s father was gay. Over the next few seasons, Tad had always seemed somewhat uncomfortable in his own skin and dissatisfied with where he had ended up in life, and more encouraging of Hannah's aimlessness as a result. His secret fits into his parenting style and relationship with his daughter, then, as opposed to being just a twist for the sake of a twist. Usually Scolari appeared alongside the wonderful Becky Ann Baker as Hannah's more pragmatic mother, Loreen, but this season Tad visited his daughter at Iowa alone, telling her to quit graduate school if she found it unfulfilling. It nicely played into one of the show's better arcs—Hannah leaving Brooklyn yet failing to achieve any spiritual wholeness as a result—and it was terrifically performed by Scolari, who lent Tad an even more haunted quality than usual.

As Scolari told Vulture in an interview published after the episode aired, he was abreast of Tad's plotline from the start of the season, and according to showrunner Jenni Konner, the twist had been discussed from the beginning of the series. This sense of anticipation shows, and Tad’s reveal wasn’t the only part of the story the writers had clearly laid groundwork for much more carefully this season. The Iowa arc, Ray's (Alex Karpovsky) entering local politics, Marnie's trainwreck relationship with musician Desi (Ebon Moss-Bachrach), and Adam's floundering relationship with artist Mimi-Rose (Gillian Jacobs) all felt like rational progressions from the characters' plotlines last year, signaling perhaps a newfound sense of maturity.

Though the internal machinations of a show's writers room are always hard to puzzle out, it's clear that Dunham has taken a bit of a step back in her overall control of the show. She had a writing credit on every episode of the show's first season, and on all but three in the second and third seasons. This year, she is credited to only four out of 10 episodes, and doesn't have a single solo credit, instead writing alongside Konner and executive producer Judd Apatow, whose influence is much more apparent. Apatow has a long and distinguished career in TV writing, and the best shows he worked on (The Larry Sanders Show, Freaks and Geeks, Undeclared) were exemplars of slow-burn plotting and characterization. While Dunham is obviously the most crucial member of the writing staff, and her voice is never far from the script, her reduced role might help explain why the fourth season has felt like more traditional television—and has been all the better for it.

Apatow’s fellow Larry Sanders scribe Paul Simms, who also created the brilliant sitcom NewsRadio, has worked on Girls for the last two years and co-scripted the fourth season's best episode, "Sit-In," in which Hannah returned to her apartment to find Adam living there with Mimi-Rose, and subsequently barricaded herself in her old room. The episode's plot had a very sitcommy structure to it—Hannah's occupation becomes more and more implausible as she's visited by all of her friends, one by one—and ended with a touching, sad, and dramatically necessary official break-up. It was the lynchpin to a season that has finally embraced the formula of television to its great advantage. Now, with Hannah plausibly navigating single life and Tad's big revelation, the show has proven it can stick the landing for the first time.