To all the people telling him to get a 335, etc, etc... MOVE ON.
it's a waste of space here. Who cares how he found out he car drove differently. Who cares if it putts around town at 20 mph in an M3 to drive .4 miles to work. Thats not the issue at hand.
OP: Part of my post was not directed at you. I know you are just trying to understand what happened earlier. Part of it was geared toward those who said "You're luckly they didn't find your tune" - It's expected that they will not find your tune.
The CEL was certainly caused by the malfunctioning sensor.
You car is definitely back to stock now. The fact that they programmed CAS means they programmed every other control unit, erasing anything you had in your DME (engine control unit), and the other modules.