Brian De Palma’s 1976 film offers many visual touchstones as Easter eggs.

[Editor’s Note: The following contains spoilers from “Riverdale” Episode 18, “Chapter Thirty-One: A Night to Remember.”]

Well, the Riverdale High musical went about as well as could be expected, and by that we mean that someone got murdered.

For the special episode airing Wednesday, the students of “Riverdale” staged a production of “Carrie: The Musical,” a Broadway musical adapted from Stephen King’s 1974 novel. Kevin Keller (Casey Cott) directed the play with Cheryl (Madelaine Petsch) in the title role and Alice Cooper (Madchen Amick) as her religious mother Margaret. Or at least, that was the plan until Kevin continued to receive cut-and-paste death threats from the Black Hood (but didn’t he die?) demanding that Cheryl be replaced as the lead or else a very heavy sandbag would take her out of commission.

Even though Cheryl refuses to bow to thespian terrorism, her mother Penelope (Nathalie Boltt) refuses to let her participate, forcing Kevin to replace Cheryl with Midge Klump (Emilija Baranac), who unfortunately falls victim to the Black Hood. On opening night, Midge’s body is found crucified on stage during a key scene.

Although “Riverdale” uses the songs and plot of “Carrie: The Musical,” the episode and the staged musical take a lot of visual and thematic cues from Brian DePalma’s 1976 film adaptation of King’s novel. After all, as Kevin tells Jughead (Cole Sprouse), “We’re going period, ‘70s glamour, like the Sissy Spacek movie.”

Here are all the Easter eggs we caught that directly reference DePalma’s film:

Carrie White Burns in Hell

Actually, before even getting to the episode, we wanted to point out the helpful comment on the casting sheet that was tweeted out by Casey Cott long before the episode aired. While all the character names are listed with handwritten initials, the “Carrie White Burns in Hell” note along with the arrow is a nice callback to one of the final scenes in the film, where those words are written on the For Sale sign in front of the White home.

A Night to Remember. pic.twitter.com/J3pRa5xEXs — Casey Cott (@CaseyCott) January 24, 2018

Carrie’s Prom Dress

Even though Cheryl never gets a chance to play Carrie on stage, that doesn’t mean she doesn’t get to channel her in two specific scenes. In the first, she performs the song “Carrie” (photo above) to prove that she’s worthy of the role, even if she didn’t audition. During the number, a fantasy sequence shows Cheryl on stage in full Carrie prom ensemble, complete with the homemade slip dress, crown, and flowers. No pig’s blood… yet.

Norma’s Red Baseball Cap

In the 1976 film, Carrie’s classmate Norma (P.J. Soles) wears a distinct red baseball cap in every scene, even at the prom. For Riverdale High’s production, it looks like Toni (Vanessa Morgan) inherited that role along with the cap and pigtails.

Cheryl Goes Full-On Carrie

This isn’t a very subtle reference, but Cheryl wears the full, bloody Carrie prom ensemble to terrify her mom. She even somehow got her hands on a silver bucket. Cheryl’s mother sending her to the Sisters of Quiet Mercy for gay conversion therapy parallels Margaret White’s religious fanaticism.

As a side note, Penelope had been conspiring with her dead husband’s twin brother Claudius, which is a very Shakespearean name that puts Cheryl in the Hamlet role. When she confronts her mother, she brings up the pig motif again, “You and Uncle Claudius are pig people and should live among the pigs.”

Margaret’s Cape

During rehearsals, Alice wears a dark brown cape very similar to the one Margaret wore early in the film. Later on opening night, we see her wearing a white nightgown that looks a lot like the one Piper Laurie wore in the film.

Amy Irving’s Tight Spiral ‘Do

Although Betty (Lili Reinhart) portrays Sue Snell, she unfortunately doesn’t get the same hairdo as Amy Irving did in the good girl role. Instead, we later see that Alice Cooper sporting the tight spiral perm for opening night.

The CW

The Crucifixion

Midge getting crucified with various knives and household tools mimics how Margaret was crucified in the film (in the original novel, Carrie stops her mother’s heart).

Chaos Reigns

Although it’s only a few seconds, the way that Jughead’s camera captures the chaos in the auditorium after Midge’s death is realized is reminiscent of the way DePalma shot the gym scene after Carrie unleashes hell on her classmates and teachers.

Did we miss any references that are specific to the film?

”Riverdale” airs Wednesdays at 8 p.m. ET on The CW.

Sign Up: Stay on top of the latest breaking film and TV news! Sign up for our Email Newsletters here.