As bad as things may get, things are still good for Agent Phil Coulson - when you consider that he's become as much a face of the Marvel Cinematic Universe as some of Marvel's longest-serving superheroes. Having delivered a weird but memorable introduction to S.H.I.E.L.D. in the first Iron Man, flexing his muscles in both Thor and Iron Man 2, he - or, more specifically, his death - turned out to be just what was needed to unite Marvel's big screen Avengers, kicking the team-up franchises into the stratosphere.

But as well-crafted and strategic as Coulson's role may seem in hindsight, his true origin was nowhere near as clear. Thanks to some recent insights from one of the writers responsible for Coulson's rise, the agent's fame - and Agents of S.H.I.E.L.D.'s entire existence - can be chalked up to necessity and luck, as much as actor Clark Gregg's ability to create something out of next to nothing.

Fans may not even recall Coulson's introduction to the MCU, pestering Pepper Potts (Gwyneth Paltrow) for a debriefing with Tony Stark (Robert Downey, Jr.) before helping her uncover the true plans of Obadiah Stane (Jeff Bridges). Gregg's 'Agent Coulson' was played mainly for laughs, with Nick Fury (Samuel L. Jackson) showing up in a post-credits scene to confirm that the meek, submissive agent really was working for the same all-powerful secret organization from Marvel Comics. But with Fury emerging as the face of the organization, Coulson's role could have been largely concluded - if not for writers Ashley Miller and Zack Stentz.

Agent Coulson in Iron Man

During his recent appearance on Kevin Smith's "Fatman on Batman" podcast, Stentz filled fans in on one of his breakthrough jobs in screenwriting - constructing Marvel's Thor in a matter of weeks. A previous script had been scrapped, since the burgeoning MCU really was happening, demanding the film be set on Earth, plant seeds for The Avengers, and be written fast. And above all else, the god of thunder needed someone, or something to oppose his efforts aside from his Asgardian brother, Loki:

"This was a page one re-write, based very loosely on story beats that they gave us... there were beats that they had, and beats that they didn't have, and we were kind of working them together. At one point it was like 'Okay we want S.H.I.E.L.D. to be in there' and they're like 'We can't have S.H.I.E.L.D. as the bad guys!' 'No, not the bad guys, just the people opposing Thor; they'll be the good guys by the end, trust us.'

"And then they're like 'Well, you can have S.H.I.E.L.D., but Sam Jackson's holding us up in negotiations so we don't know if we can have Nick Fury. And we're like 'Well, how about that Clark Gregg guy from the first Iron Man, he was great and he popped! Can we have Coulson?' And they're like 'Coulson, Coulson, Coulson... oh him! Yeah, you can have him.'... They ended up giving him a bigger role in Iron Man 2 because they liked how he was popping in Thor. Clark Gregg actually sent us t-shirts as a thank you."

It's unclear if Sam Jackson knows that his delays over contracts with Marvel are largely to thank for Agent Coulson becoming something of a fan-favorite poster boy for the studio as a whole, but every fan should be aware. And it's always nice to hear of a blockbuster role that grew specifically because the original filmmakers nailed the casting (since Coulson's success is a testament to what Gregg did with such a small part).

But those thinking that it was just Agent Coulson whose future was cemented by Stentz and Miller's script are in for another surprise. After all, Thor included another future Avengers cast member - under even stranger circumstances.

Hawkeye aims his bow in Thor

It was a moment that stands out in Marvel's brand of world-building: as Thor (Chris Hemsworth) fights his way through S.H.I.E.L.D. security to recover his lost hammer, one sniper is called into the field, selecting not a rifle, but a bow from a weapons rack.With his face concealed from the audience, he runs across the S.H.I.E.L.D. installation, and using a crane to rise above the action for a perfect shot. Even before Coulson identified the shooter as 'Barton,' Marvel fans knew this was Hawkeye, a future Avenger being introduced.

According to Stentz, the story behind Jeremy Renner's cameo prior to his Avengers introduction was just as serendipitous, with some clever editing to thank for the appearance:

"You want to know who owes us and hasn't said ANYTHING? Part way through [the script] there's 'the SHIELD Sniper takes aim' and we identify 'Barton'. And [the producers said] 'But if we get Hawkeye, we'll have to get a real actor.' And then they realized we can just shoot the A-Side, and then when we cast for The Avengers we'll just go back and shoot a thing with that actor. So, Jeremy Renner: You're welcome!"

As movie universes get more and more expansive and formulaic, it's easy to forget that sometimes old-fashioned ingenuity, risk-taking and simply necessity are often to thank for some of our favorite films' best moments. Thankfully, there are stories like these to remind us that no matter how big the movies get, it's the people behind the scenes who help shape them one idea at a time.

Is your mind blown to hear how free-flowing and spontaneous the MCU was in its early stages? Did you suspect the ulterior motives behind the introduction of Coulson as something on a Fury stand-in? Let us know in the comments, and we'll keep you up to date on any and all glimpses at the inner workings of Marvel's universe.

NEXT: Is Captain America: Civil War The Ultimate Comic Book Movie?

Captain America: Civil War is in theaters now. Doctor Strange opens November 4, 2016; Guardians of the Galaxy Vol. 2 – May 5, 2017; Spider-Man: Homecoming– July 7, 2017; Thor: Ragnarok – November 3, 2017; Black Panther – February 16, 2018; Avengers: Infinity War Part 1 – May 4, 2018; Ant-Man and the Wasp – July 6, 2018; Captain Marvel– March 8, 2019; Avengers: Infinity War Part 2– May 3, 2019; and as-yet untitled Marvel movies on July 12, 2019, and on May 1, July 10, and November 6 in 2020.

Source: Fatman on Batman