The other thing to add is you'll need to cut off the ring terminals and strip a short section to use the set-screw arrangement of the new switch. I tinned the very ends of my wires, I find this gives you a good place to set the set-screw, and prevent fraying.
Don't use too much solder, you don't want it to wick up under the insulation.
And put a towel down for when the solder drips and splatters, it doesn't come out of carpet.