In Skyfall, Judi Dench appears on screen longer than in all her previous Bond films combined since GoldenEye. Sam Mendes wanted M to be almost as central as Bond. Writer John Logan said the script was built to give her a powerful, emotional farewell.