It's no secret "Rogue One" went through a lot of changes in production, with entire scenes cut and additional footage shot. But the biggest change was to the film's ending.

At the end of "Rogue One" — spoilers ahead! — Jyn Erso (Felicity Jones), Cassian Andor (Diego Luna), and their motley crew all die after successfully completing their mission to steal the plans for the Death Star. But the very first script treatment had some of the heroes surviving.

"The original instinct was that they should all die," screenwriter Gary Whitta told Entertainment Weekly. "It's worth it. If you're going to give your life for anything, give your life for this, to destroy a weapon that going to kill you all anyway. That's what we always wanted to do. But we never explored it because we were afraid that Disney might not let us do it, that Disney might think it's too dark for a 'Star Wars' movie or for their brand."

In those first drafts, Jyn was a Rebel soldier teamed up with a Cassian-type character and security droid K2-SO. Bodhi Rook, Chirrut Imwe, or Baze Malbus did not exist. Jyn and "Cassian" escape with the plans Scarif via a Rebel ship. Darth Vader attacks their ship and it seems all is lost, but the heroes survive thanks to an escape pod.

"The fact that we had to jump through so many hoops to keep them alive was the writing gods telling us that if they were meant to live it wouldn't be this difficult," Whitta said.

"We decided they should die on the surface [of Scarif,] and that was the way it ended. We were constantly trying to make all the pieces fit together. We tried every single idea. Eventually, through endless development you get through an evolutionary process where the best version rises to the top."

Want more stuff like this? Like us on Facebook.