A capitalist egomaniac from contemporary America. A patriotic soldier from World War II. A demigod from another planet. Those are simply a few of the characters that come together to form the Avengers.
It was never going to be easy to craft a story that brings such disparate personalities together to fight a common threat. Although this alliance was foreshadowed in many of the earlier Marvel movies, Whedon - like Agent Coulson in the film - had to bring them together.
But Whedon's script did more than that. It tied the story together nicely and addressed some loose ends - and missing characters - from the previous films.