As others have said, the X5 will get under your skin if your not carefull. We've already put thousands into ours but we still love it.
Your sunroof leak is probably clogged drain lines. I believe they run down the A pillars. I'm not sure of the cleaning procedure but someone on here probably does.
You've come to right place. I've only been on here since last February and I've learned a shitload. It helps that I have two other Bimmers in the family like you do. You already know what yer in for