Spider-Man: Far From Home has been playing in theaters for more than a week, which means we know precisely how the Infinity Saga ends and we can focus on what’s coming next in Marvel’s fourth phase of MCU films. But as always with a new Marvel movie, we’ve learned plenty of extra things about Far From Home now that it’s out in cinemas, including the fact that the movie initially had a safer, more boring ending. Beware, major spoilers follow below, so bookmark this post for later if you haven’t already watched Far From Home.

Far From Home delivers a couple of massive twists with the help of credits scenes, setting the tone for what might be coming in MCU Phase 4, and giving Spider-Man a mind-blowing twist for what might happen in the third film in the revived franchise.

The first credits scene reveals the identity of Spider-Man to the world with the help of a glorious cameo, while simultaneously making Peter Parker sound like the bad guy of the most recent adventure. This is the first time in Marvel movies that Spider-Man’s identity is revealed, which means Spider-Man 3 will deliver a brand new version of Spider-Man. Marvel Studios boss Kevin Feige already teased that the next film might bring over Spider-Man adventures unlike anything seen before.

The second scene is even more critical for Phase 4, as it sets up the Secret Invasion storyline. We find out Nick Fury wasn’t on Earth the entire time. Talos and his wife, the Skrulls from Captain Marvel, were impersonating Nick Fury and Maria Hill. The former was taking a sort of a working vacation in space.

Speaking to The New York Times, Far From Home screenwriters Chris McKenna and Erik Sommers revealed the thought process that went into these pivotal credits scenes, explaining that the initial choices were a lot safer.

In the mid-credits tag, a posthumous video from Mysterio exposes Spider-Man’s secret identity to the world. That’s a pretty major shake-up for this character. Why introduce it now?

McKENNA We were challenged by the producers to come up with something that Peter sacrifices by the end of this movie, and when we hit upon that as a group, it became a very scary idea: “Oh, no, we can’t do that! Then it’s not a Spider-Man movie anymore!”

SOMMERS Ultimately, we realized that because it scared us, you have to run toward it.

McKENNA It’s such a bold maneuver that it became inevitable, particularly with a tricky character like Mysterio, who’s this dark father figure. From the grave, is he trying to give Peter his “I’m Iron Man” moment? It’s thrust upon him, but is this a lesson or a punishment?

Ultimately, the duo chose to both reveal the identity of Peter to the world and make him seem as if he were the bad guy all along.

Mysterio also frames Spider-Man for the crimes he’s been committing, which would start the next movie in a very different place.

McKENNA We were wondering, “Are we going as deep as we need to at the end of the movie?” We played with the idea that Peter is the one who sacrifices his identity out of necessity during the final battle, then it seemed more interesting if Mysterio tricks him into doing it, but any time we wrote a version where he was being revealed to the world in that battle, it felt like it diminished the victory. So before it became a tag, it was really just the end of the movie: Right as he feels he’s stepping up as Spider-Man, he has the rug pulled out from under him again.

SOMMERS We were definitely debating, should we just reveal who Spider-Man is, or should we frame him for something and turn him into a pariah? Ultimately, we decided that both was the way to go. It’s such a triumph at the end because he’s got the girl and finally earned a big swing through the city, so we want to knock him down as far as possible.

The writers also revealed that it became pretty clear that the Daily Bugle should be the entity that reveals Spider-Man’s identity, and that J.K. Simmons should reprise his J Jonah Jameson role from Sam Raimi’s Spider-Man, becoming a sort of “Alex Jones of the MCU.”