ok when I hit the brakes, the is all over the place but its not the brake

My check engine light has been on for awhile now, and we can't figure out why. It's also had trouble in the past starting after being filled up at the gas station. Recently, this took a dangerous turn when my car completely turned off (battery indicator flashing and all) while I was pulling out of the gas station. Thankfully, there was no traffic at the time, but I hate to think of what could happen next time. We just replaced the battery, so I know that's not the issue. And just the other day, the brake signal flashed and beeped once (just enough to alarm me), then turned off and hasn't turned on since. I have had no issues with my brakes, but my car issues are becoming more alarming than annoying.

motor oil leak appears between trans and engine. no trans fluid leaking

it did not have a manual with it

What do i deed to do to fix the problem?

The problem started with when Engine mgmt light on dashboard lit. The car was running absolutely fine. Took to dealer he told to change air mass flow sensor, spark plugs and purge valve. The light came on again in 10minutes after the repair. The key was reprogrammed at the same time. Even though car was absolutely fine the light was still on. Ignored the warning light as mechanic told there is no problem until the light starts flashes. But just from two days the car is not at all starting. My mechanic friend suggested to reset the key code. Neither the VW dealer nor my mechanic friend knows proper solution to my problem. Please someone help me to get my car repaired. I have spent almost $1000 on this entire repair. Now dealer asks for another $300 just to inspect the car and no guarantee that car will work fine. Please someone guide me.

Is fly wheel and release bearing replaced when clutch is replaced??

Working on checking relays, compressor works fine. any ideas