a good film but I thought it fell in places

Rating: 8/10 (13 April 2018)

I thought this was a typical film ending for the 80's, the good guy always wins.
But I thought the beginning seemed rather badly written if I'm honest.
Here Luke and Leia plan to rescue Han from Jabba on Tatooine.
Despite freeing Han the plan fails and is Leia captured, and when Luke appears he too is captured (and dropped into the Rancor pit to die) predictably Luke survives and kills the Rancor, then they are all sentenced to death at the Sarlac pit.
This however was all part of their plan as Lando, Chewbacca, C-3PO and R2-D2 were already in place to help them and turn their execution into an escape.
What kind of a rescue plan is expected to fail from the start?
I can understand having a plan b just in case, but everything about this shows they knew exactly how events would unfold, why else would they place Lando, Chewbacca, C-3PO and R2-D2 in Jabba's palace. How would they get them out if Han's rescue had been successful?
Now a little controvential opinion, Ewoks.
Han and his team go to destroy the shield generator on Endor in order to destroy the second Death Star, however before they can set charges to destroy the base an Imperial army then ambushed them and fight against the Rebels.
The fight soon turns to the Imperials advantage however the Ewoks then join the fight; using primitive catapults, trip ropes and stones they somehow defeat the Imperials and enable Han to destroy the shield generator.
The Ewoks seem like they were only placed in the film as a means of ensuring victory for the Rebels, the Imperials would have defeated the outnumbered Rebels were it not for them, and the idea that such primitive weapons could defeat the Imperial troops seemed a stretch anyway.
Prior to this Luke left Hans team and allowed himself to be captured and taken to the Death Star to confront Palpatine and Vader where he is forced to fight Vader, Luke bests the Sith Lord however his compassion for Vader (after he revealed himself as his father) stops Luke from killing him. Instead he throws down his weapon and faces Palpatine unarmed.
Palpatine attacks Luke with his Force lightning however before he can kill Luke, Vader switchesd allegiance.
Driven by love for his son Vader lifts Palpatine and throws him down a chute into space and kills him, this act however damages his life support suit and soon after he too dies.
Vader seems like a very selfish man and an unreliable ally, having already turned on the Jedi in Episode III when he saw an opportunity to help himself (to save Padme) he again switches sides to save Luke.
The Death Star is then destroyed, typically just as Luke escapes with Vaders body.
Luke then holds a private Jedi funeral on Endor attended by ghost Obi-Wan and ghost Yoda (the ghost of an old man then appears and is presumably Anakin) meanwhile everyone else has a pre-fight party in the Ewok village.
The remastered version is good how the head of the old man ghost is replaced with the head of Hayden Christiensen (who playes Anakin in the Prequel series, as this presumably depicts Anakin the last time he was a Jedi) But where is Qui-Gon who was hinted at being able to appear as a ghost to Obi-Wan while in hiding on Tatooine between the two trilogies?
In the remastered version they also show clips of worlds across the universe celebrating the destruction of the Emperor, which is odd since word cannot have spread that fast?