After a decade away from the big screen, they’re back to protect the Earth from the scum of the universe.

Men in Black was a breath of fresh air in a climate of po-faced blockbusters, it was weird and funny and packed with the same sense of discovery, fun and imagination that made Ghostbusters such a defining moment in genre film. It’s not as funny as Ghostbusters, which would work even without the visual effects, but it worked and still holds up incredibly well.

Revisiting Men in Black II, however, is like accidentally digging through a sewage pipe in your garden and the surge of effluence unearths the bones of a beloved pet. You can see hints of something you used to cherish but it’s drowning in a flood of awful, awful things.

It would not take a great deal for Men in Black 3 (weird that they switched from roman numerals to regular numbers between films) to improve on the last one, but it would require more time and forethought than this troubled production could muster to top the first. Somewhere between the two extremes would be welcome although something closer to the second was expected.

To sincere surprise and delight, Men in Black 3 is actually good.

The script to the first movie was no ground-breaker. It was simple, to the point and most importantly it remembered to maintain a distinct vision and was supported with a backbone of some good chemistry. Men in Black II lacked everything required to make a good screenplay. All three movies are short, which is almost a miracle in this age of the 120 minute blockbuster, but Men in Black II (the shortest) still managed to drag with its charmless, uneventful story and awful jokes, stitched together with truly inept editing.

Despite starting production without a completed script (if rumours are to be believed the script only had a first act), Men in Black 3′s script is a huge improvement on the previous sequel. The plot is messy and weirdly paced, with things beginning to drag in the same disjointed fashion which ruined the second movie, but once Jay arrives in the ’60s things start to pick up. It’s still a rough, cobbled together plot that struggles to coalesce until late in the third but IT HAS A PLOT which gives it a leg up over its predecessor.

Through good and bad, Men in Black has been defined by the chemistry of its leads. A major portion of the original film’s success is down to the chemistry between Will Smith and Tommy Lee Jones and, even at its worst, there were glimmers of chemistry between the pair in Men in Black II.

Sadly, it’s almost non-existent in Men in Black 3 on Jones’ part, Smith is doing all the work in these scenes. It may just be Jones no longer caring about the franchise and doing what almost classifies as an extended cameo purely out of obligation, but that weariness and lack of interest actually benefits the character’s story.

When Jay meets Josh Brolin’s young Kay things really start to improve. Brolin is just great, his transformation into Tommy Lee Jones is just uncanny to the point where a remake of Rolling Thunder co-starring Brolin would get an automatic free pass from me. This is not a simple impersonation of Jones, either. This is a real performance. He has all the subtle mannerisms and inflections down (he even grunts and sighs the right way) but he makes it feel natural and he provides added layers to the character that are uniquely his. This is a performance that is likely too good for a movie of Men in Black 3′s stature but the fact he really goes for it shows Brolin’s intense commitment to being an actor.

What’s more, the introduction of Brolin has given the buddy cop dynamic a much-needed shot in the arm. There’s a lively, fun chemistry between the pair that recalls the work between Smith and Jones in the original movie. Simply put, without Brolin this film would probably collapse entirely.

Another crucial element that helped Men in Black but sank Men in Black II is the villain. Vincent D’Onofrio’s performance in the first movie is manic and weird, a law unto himself in a blockbuster movie, as tent pole movies rarely go so big and so strange with their performances but it’s always a joy to see. Lara Flynn Boyle lacked all personality in the sequel, all she had was her looks and a dash of snark, but that is a massive step down for the franchise.

Jemaine Clement’s Boris The Animal is a major course correction for the series. They hired a comedian to play the role of a menacing psychopath, this may seem like a weird idea on paper but it really pays off in the film. Buried under a lot of make-up and creepy character concepts, Clement manages to bring a mix of weirdness and brutality to the role that manages to be funny, without actually having any jokes, but always feels dangerous.

Michael Stuhlbarg has a fairly crucial role (as what is essentially the galaxies most powerful autistic) which could have been a disposable plot point but he brings enough energy to the role that it’s one of the more enjoyable turns in the film. Emma Thompson and Alice Eve (playing the same character) are equally charming and engaging but both regrettably underused and Bill Hader gets the biggest laughs in the film as a certain Factory-based artiste.

The movie works. It defies belief (and logic) but it works. A script that clicks better than it has any right to, performed by an enthusiastic and talented cast, it lacks the neatness of the original movie but Men in Black 3 does a great job of wiping away the memory of the second movie.