The following contains spoilers for Ghosts Season 2, Episode 17, "Weekend From Hell," which aired March 9 on CBS.

After a couple of stumbles, Ghosts finds itself back on track with "Weekend From Hell." There was a real concern that after a season and a half, the show was slipping into generic sitcom territory, but "Weekend From Hell" tightens the reins. With a bit of help from comedy stalwart Matt Walsh, Ghosts is once again putting its delightful spin on the comfort food sitcom.

Walsh's Elias returns from Hell to throw a wrench into everyone's lives. Walsh is once again pitch-perfect as Hetty's cad of a husband. He is back from Hell to beg Hetty's forgiveness so that he may extricate himself from eternal damnation. His pleas to Hetty and the other ghosts as well as Sam seem almost sincere, but luckily for the audience, he is still the garbage human being he always was. This also brings Hetty back to form, with actor Rebecca Wisocky's terrific timing, both in dialogue and gesture, once again punctuating scenes.

RELATED: Ghosts' Comedic Tone Makes Heavy Subjects More Accessible

Ghosts' 'Weekend From Hell' Is a Satisfying Standalone Episode

Samantha and Jay greet a guest on CBS' Ghosts

The show itself is back to taking down-the-middle sitcom storylines, like Jay trying to recreate a meal he made while intoxicated for a television host who spotlights foodie locations, and making them feel fresh. The episode marks a return to form in many ways, not the least of which are the characters being back to their more defined personalities, instead of being whatever they need to be to serve the story. It almost feels as though the network shuffled the episode order around, as "Weekend From Hell" seems like it skips over the events and relationships of the previous two, be it Thor and Flower, Nigel and Isaac, or Hetty and Trevor -- and that's a good thing. The episode doesn't even address Hetty and Trevor being caught intertwined in the previous outing.

The quips come fast, and the cuteness of the series returns, as opposed to the more cloying notes of the prior two episodes. One major thing "Weekend From Hell" did was consolidate the plot into an A-story and a B-story, in contrast with the unwieldy amount of subplots in Episodes 15 and 16. The B-story, Jay walking through Flower and getting very high, is a subversive twist on a classic sitcom plot: a character creates something that someone loves but has no recollection of how they did it and is asked to recreate it for some sort of authority. Most surprising of all was simply being able to say "tripping balls" on a CBS family sitcom.

RELATED: Ghosts Finds an Unpredictable Way to Tackle the Most Predictable Subject

How 'Weekend From Hell' Ended Ghosts' Season 2 Slump

Ghosts' Jay, Trevor, Sasappis and Flower in Weekend From Hell

Knowing that securing Walsh, a multiple Emmy nominee in constant demand, for a regular role would likely be too expensive, the series wraps his storyline nicely while still leaving the possibility for a return. The conceit of his return is that he received a 48-hour furlough from Hell to plead his case to Hetty. While perhaps not a laugh-out-loud episode, this is the type of half-hour that brings smiles and the occasional audible giggle that is the hallmark of comfort food TV. It's fun, it's pleasant, it's a little naughty, and it engenders a desire to watch more. A welcome return to form.

A big piece of why "Weekend From Hell" works where previous episodes didn't is because the characters are once again in the driver's seat. "A Date To Remember" and "Isaac's Book" both felt like the story drove the characters, which made them feel less like themselves. Story may be key, but in sitcoms, it's the characters who matter most. People don't tune in to sitcoms for overly complicated storylines, they tune in to forget the weight of the day and hang out with their friends. It may seem counterintuitive to put character over story, but decades of sitcoms have taught the audience that the story is the vehicle, but the driver and the journey are the characters and the bits and jokes.

Ghosts debuts new episodes Thursdays on CBS.