In my opinion, it could have been better if the twist was revealed earlier, when Viper was talking to Wolverine and Silver Samurai stood up and show his face to Wolverine. After that the intentions of SS and Viper were explained.

Then SS will ask Wolverine to give his healing powers or else, Mariko will die from Viper's poison. Then Wolverine agreed to offer and while SS is about to chop Wolverine's claws, somewhere in the facility, Yukio destroyed the source of electricty and then helped Wolverine to escape. Then after that Wolverine fights SS, while Yukio fights Viper.