I love the first 6-8 episodes of a TV show in its first season, because it always seems like the process is at its most transparent there. The first script order is when a show is figuring out what it is and how it’s going to work, actors and writers alike throwing things at the wall and gradually learning their way through the rhythms of their work. Some shows skip this step—Leverage in particular arrived fully formed and smiling as it quietly lifted the wallets of very bad men—but for most there’s a learning curve,

The Orville has followed that curve. What started out looking a lot like a weirdly elaborate and staggeringly unnecessary Star Trek: The Next Generation parody is rapidly becoming something interesting and new. That’s because The Orville hasn’t just spent this first run of episodes learning what it is, it’s spent it trying to balance two equally demanding requirements at the same: it has to be funny while also providing convincing drama.

The comedy side of things is still, often, pretty shaky. Recent episodes “Majority Rule” and “Krill” were designed to shine a spotlight on the ship’s navigator and helmsman, John Lamarr and Gordon Molloy, respectively. Neither worked, with the entire script of “Majority Rule” turning on the idea that John, a highly trained naval officer, would think that dry-humping a statue in public on an alien world is somehow a consequence-less action. Likewise, “Krill,” which in many ways is the darkest episode of the show so far, was hampered by Gordon’s continual carrying of the idiot ball. There’s a thin line between using humour as a means of spiking or cutting tension, on one hand, and using humour to completely destroy it, on the other. Despite the best efforts of J. Lee and Scott Grimes as John and Gordon, those episodes cross that line—or, more to the point, they trip over it and come crashing down the stairs at the worst possible moment.

When the comedy works, though—and it’s working more and more—it’s because it’s unforced. The show takes off in the first episode, “Old Wounds,” when former married couple turned senior officers Ed and Kelly stop bickering and verbally bouncea scientist around between them for making what seems to be an anti-banana ray (It isn’t, and they know that, but that’s the point). The rapid-fire dialogue, the easy chemistry between Adrianne Palicki and Seth MacFarlane, and the charm in seeing two Navy brats really having fun for the first time lands the joke good and hard, and the show has had repeated success ploughing that particular furrow. The closing moments of “If The Stars Should Appear” are another example: as the crew help the descendants of a generation ship crew realise their destiny, Doctor Finn (Penny Johnson Jerald) quotes Ralph Waldo Emerson. Captain Mercer tries, and EPICALLY fails, to indicate that he knows both the quote and the author. It’s fun—a self-deprecating moment that gently parodies the tendency for all Starfleet captains to be polymath fans of highbrow literature (with occasional forays into such areas of expertise as gourmet coffee, Earl Grey tea, baseball, and water polo).

Time and again, this is where the show’s comedy works: in balancing the utopian ideal of its Starfleet-like central organization with the endearing rubbishness of its staff. In “Command Performance,” when Alara realizes she’s now in charge, her first action is to sprint to a food vendor, order a tequila and slam it. In the opening scenes of “Cupid’s Dagger,” Bortus gets one of the biggest laughs of the season through his choice of karaoke song. The Orville as a show, and the Orville as a crew, are at their best when they’re at their most honest—normal, flawed, good people doing an impossible job to the best of their abilities.

The dramatic side of things has been smoother sailing, for the most part. A big part of that is down to how remarkably evenhanded MacFarlane and the show’s writers’ room have been with the spotlight. It’s especially impressive given that MacFarlane is basically pulling a Matt Albie/Aaron Sorkin here, having written all but three episodes to date. It would be massively easy for him to put his character, Captain Ed Mercer, front and centre all the time. Instead, Ed is frequently the butt of jokes, and in some episodes he’s barely present. In fact, in “Into The Fold” and “Majority Rule,” Ed essentially provides dramatic punctuation. He shows up at the beginning and end of the episodes to bring the plots in for a landing—for the rest of the time, the stage belongs to everyone else.

This evenhanded approach has led to most of the characters having opportunities to grow throughout the season. Gordon and John’s aforementioned moments in the spotlight didn’t go so well, but the others have been handled very well. Halston Sage, as Security Chief Alara Kitan, has become a mainstay of the show and her spotlight episode, “Command Performance,” is an early highlight. There’s a definite hint of Next Gen classic “The Lower Decks” to the story as Alara struggles with her first command when Ed and Kelly are kidnapped. Likewise, Peter Macon as Bortus, the ship’s second officer, has benefitted hugely from the extra room allowed his character. A Moclan, a single gender species who reproduce via eggs, Bortus started as the obvious Worf analog but is already diverging from that. The struggle to maintain his life as a parent, a partner, and an officer is a repeated C plot that seems to be building towards something later in the season, and the show has a refreshing lack of easy answers for his problems. Plus, Macon’s endlessly stoic presence has been the delivery system for some of the show’s best jokes to date. (And we all know Bortus’ version of “My Heart Will Go On” would be EPIC.)

The remarkable Penny Johnson Jerald has also been given great stuff to do as ship’s Doctor Claire Finn. A veteran officer and mother of two boys, Claire is the responsible adult in every room she’s in. She’s also an informal, relaxed counsellor for several of the ship’s officers, and her friendship with Alara in particular is one of the show’s best strands. Jerald’s spotlight episode, “Into The Fold,” gives her a chance to balance that warmth with a core of steel. Separated from her kids and crewmate Isaac in a shuttle crash, Claire has to escape her captor and help keep the others alive long enough for rescue. There’s a moment towards the end of the episode where she’s instructing her older son in how to use a sidearm that’s one of the best character moments in the show to date. Her last command is “Set on stun. They may not respect life, but we do.” Doctors McCoy, Crusher, Bashir, EMH, and Phlox would be proud.

But perhaps the biggest surprise of the show so far is how successfully it has turned around its original central premise. The first episode spends much of its running time with Ed endlessly busting on his new XO/ex-wife Kelly for her infidelity. For a good half hour, the show looked horribly like it was going to boil down to “Take my wife, please!” in space. Even the promo photos portrayed Ed as a grumpy man-child, slumped as far away from Kelly as possible on the bridge.

Now, on the one hand, this is understandable as a plot point in that infidelity and divorce are awful, complex things that cause plenty of damage in the short term. On the other, in practice, this dynamic felt very much like MacFarlane clinging to his established brand like a dinosaur roaring defiance at the asteroid that’s about to land on it. Worst of all, it looked for a while like this toxic relationship was all the show was ever going to be—the ship saves a planet, Ed reminds Kelly that she slept with someone else. The ship is thrown back in time, Ed jokes about how they could stop Kelly from eventually ruining his life while they’re in the past.

Thankfully, The Orville has moved past this unpleasant rut very, very quickly. Adrianne Palicki’s Kelly is one of the best characters on the show: skilled, tough, principled, a great First Officer. Her plot line in “If The Stars Should Appear” is surprisingly hard-hitting and Palicki carries it off with the bloody-knuckled strength and intensity she’s become known for as an actress. Better still, she’s central to many of the show’s core friendships, especially in relation to Alara and Doctor Finn. Instead of being the villain of the piece—or worse still, an eternal punchline—Kelly has become a complex, interesting, and mature character. Who’s female. ON A SETH MACFARLANE SHOW.

And finally, there’s Ed himself. MacFarlane placing himself front and centre in a show he created, produces, and writes most of could seem egotistical. Hell, it probably is—but for the fact that Ed is consistently the butt of the joke, more than any other character. Starting out the season as walking wounded, he moves from being a constantly panicking Arnold Rimmer-like figure to something, again, far more interesting. Ed isn’t well-read, he isn’t a scholar of anything, or a veteran of something impressive and plot convenient. He’s a career military officer who is clearly not sure if he’s good enough for his job and, slowly, is learning to be the person the crew needs him to be. Like everyone else on the ship, Ed is a fundamentally a good person and his biggest challenge is getting out of his own way. The way the show explores that process is often surprising, too. Last week’s episode, “Cupid’s Dagger,” all but states out loud that Ed’s bisexual, and does so with a truly endearing lack of fanfare. “Krill,” for all its countless faults, puts Ed in the impossible position of saving a human colony at the expense of thousands of Krill lives. His solution is far from perfect, and the episode’s punchline destroys almost all of the good will it earns, but the attempt is there, if not the success. Yet.

The Orville is entering the home stretch of its first season with only four episodes to go and it’s still never met a cheap joke it didn’t like. But it’s also developing a clearer and clearer idea of just what it is: a series about a crew of decent, flawed people doing their best to help others. They, and the show, don’t often manage it. But what they have managed to do is create a fundamentally kind, hopeful piece of science fiction just when it’s needed most. The Orville and her crew are far from perfect, but that’s the point—and, more and more, the show’s biggest strength.

Alasdair Stuart is a freelancer writer, RPG writer and podcaster. He owns Escape Artists, who publish the short fiction podcasts Escape Pod, Pseudopod, Podcastle, Cast of Wonders, and the magazine Mothership Zeta. He blogs enthusiastically about pop culture, cooking and exercise at Alasdairstuart.com, and tweets @AlasdairStuart.