Yeah, you're going to have to remove the headliner and cassette to do the sunshade repairs -so you might as well repair it all at once. BTW, the torx bits on the rear head airbags are T-27, which are best removed on one side by a torx socket, since they have a pretty high torque applied.
I'd probably hook up the roof and see what actually works on it prior to removal. There should be 3 plugs that need to be connected, shown here:
1 & 2 are for the controller itself, and 3 is for the motor. I wouldn't be surprised if when you hook it up, it might not work. In order to initialize the roof, the headliner has to be closed, as well as the glass being flush. When I first hooked up my roof and plugged everything in, I was a bit freaked out because my headliner was installed retracted, and I didn't manually crank it closed before trying to initialize. It didn't work. After I unplugged the motor (IMPORTANT WHEN MANUALLY CRANKING!!), and cranked it closed, then it initialized.
The TAB fix that Howard described is what we're trying to avoid having to do - but if you're good with just the main window venting, then I'd have at the repair described by him! It's also a matter of cost since you can just do the Headliner portion for about $160 (plus shipping), whereas all 3 sets are ~$600. But, the cassette will come out to do the headliner.
Hints before you remove the cassette:
1) Mark the location/orientation of the cassette against the body with a scribe/paint, etc.
2) On the "D" column, when removing go ahead and also mark and then remove the anchor points for the tailgate locks (held by 2 12MM bolts). Makes it much easier to unhook the top portion of the panel from the rear of the headliner
3) Remove the main glass to make the cassette easier to handle. If your roof doesn't open/close, unhook the motor connector and manually crank to the vent position to make the removal of the 6 screws holding it in easier to reach (after removing the gaiters, of course)
4) Removing the cassette can't be done by yourself !!
5) Replace the sunroof seal for another $35 while you're at it. Easy to do while everything is out - and I've been told that once the seal has taken the shape of an installed roof glass, it's prone to leaking upon re-install.