The electronic speedo is driven from a signal off the back of the differential so start looking there for bad connections etc, maybe even check for a signal by turning the rear axle with a meter hooked up. As for the sunroof, it is more similiar than you might think to your 320i, it is basically the same except it has a little motor up there in the headliner instead of the crank. Problems can include bad cables a stripped gear misalignment of cables a loose clutch nut and more, but mechanically it is actually just about the same.