Car keeps cutting off while driving

Hey er'body. I'm having a problem with my wagon, and I am clueless as to the reason.
The Car: 91 2WD Wagon, D16Y7 swap with D16Z6 Intake Manifold, OBD0 SI ECU, DX Cable Tranny
Here's the problem:
While driving, my check engine light comes on, then my car starts coasting. The car is on,
but when I press the gas, it just grunts a little, but nothing. Then my battery light comes on, and my car cuts off.
Then I coast off to the side of the road... while I wait for a few minutes. When I try to turn back on, it just acts like
it's spinning to turn the motor, but it never turns over. After a few minutes, it'll turn over.
I checked the codes, and I am throwing codes: 17, 7, 15, and 16 in that order.
My speedometer isn't working, so I know that is why I am throwing code 17.
This happened a few days ago, and my car now cuts off at random while driving.
My car is running fine while it's driving. It accelerates properly. It stops, idles, goes, everything fine.
Before this happened, the only code I'd throw was 17.
I thought it might be a faulty main relay, but when I changed it, there was no success.
Also, if it means anything, when I first crank my car, I smell a little gas. I live in SC, so I do not have catalytic converter.
Please.... help me.
The Car: 91 2WD Wagon, D16Y7 swap with D16Z6 Intake Manifold, OBD0 SI ECU, DX Cable Tranny
Here's the problem:
While driving, my check engine light comes on, then my car starts coasting. The car is on,
but when I press the gas, it just grunts a little, but nothing. Then my battery light comes on, and my car cuts off.
Then I coast off to the side of the road... while I wait for a few minutes. When I try to turn back on, it just acts like
it's spinning to turn the motor, but it never turns over. After a few minutes, it'll turn over.
I checked the codes, and I am throwing codes: 17, 7, 15, and 16 in that order.
My speedometer isn't working, so I know that is why I am throwing code 17.
This happened a few days ago, and my car now cuts off at random while driving.
My car is running fine while it's driving. It accelerates properly. It stops, idles, goes, everything fine.
Before this happened, the only code I'd throw was 17.
I thought it might be a faulty main relay, but when I changed it, there was no success.
Also, if it means anything, when I first crank my car, I smell a little gas. I live in SC, so I do not have catalytic converter.
Please.... help me.

Comments
Does it seem like the car runs when its cooler, but once the engine heats up, it dies out? I have had this scenario several times. Its usually the Ignition Control Module inside the distributor. They go bad sometimes and when they get hot, they won't work at all. Then they cool a bit and it will run fine.
Code 7 - Throttle Position/Angle Sensor
TPS sensor input is used to determine when the throttle is:
Idle
Wide Open Throttle (WOT)
Rapid Movement
During these conditions the ECU makes changes to the injector Pulse Width (PW).
The PW is widen slightly when the throttle initially goes to idle. Within a few seconds the O2 sensor will correct the mixture.
Closed Throttle Input (under .5V), engine RPM is above 1100, engine is warm. The fuel injectors will be shut-off (used to conserve fuel). Peeps with A/F Ratio Meters will see this happen, when the gauge drops to full lean, or no reading at all.
When Wide Open Throttle is detected the PW is increased above normal fuel delivery. This is also known as "Open Loop" operation, when the ECU ignores the output from the O2 sensor.
With Rapid Throttle Opening the ECU is watching the TPS input voltage for rapid changes. A sudden rise in the voltage would mean the throttle was opened quickly. So the ECU would increase the PW momentarily. As soon as the MAP sensor senses the drop in vacuum, it will take over.
Testing - With the Key On, Engine Off hook up a voltmeter to the TPS. @ idle (closed throttle), voltage should be close to .5V and @ WOT (Wide Open Throttle) voltage should be 4.5V.
The best way to adjust the TPS voltage is @ idle (closed throttle). While Key On, Engine Off, hook up voltmeter between the yel/wht & grn/wht and observe reading. If it needs to be adjusted, loosen the TPS mounting and move the TPS until voltmeter reads close to .5V. The check engine light will let you know immediately whether you missed up or not.
TPS Sensor Wires:
1 Red/Blue
1 Green/White
1 Yellow/White
Code 15 - Ignition Output Signal
Something is wrong with the referance voltage, the ECU is receiving from the igniter.
The only way to check this, is with a Volt Meter of some kind, or ocs-scope. The latter being the most accurate. Sooo, that means a trip to a shop, that has this kind of equip...
Most peeps just end-up replacing the dist.. However, you can DYI if you have the tools and manual...
Code 16 - Fuel Injector
Code 16 is probably the Main Relay, however it could still mean a bad Injector, Resistor Box tho.
Most failures occur, when the weather starts heating-up for the summer...
If the car refuses to start, but "turns over" on a hot day, try opening the doors/windows, and let the interior cool down. "Then try starting again". May not work all the time, but worth a try anyway. Also, would help in troubleshooting the prob, if it does start. Another place to look is the ECT sensor, refer to the above
+++ SiWagon Freebie:Honda Ignition Upgrade:D
Well, here is a video of what happens shortly after my car cuts off while driving. Hope it'll lead to an answer
http://www.youtube.com/watch?v=OoG40MBMIQE
And, here is a video of when my car finally decides to come back on, and then me driving.
Notice there is no issues in responsiveness or problems while driving.
http://www.youtube.com/watch?v=MD3-3K2ICYs
Don't know what the Ignition Control Moduleis?
Swapped out my distributor for a D16A6 one, then repinned it work with my square plug on my harness. Works flawless now.
Thanks everyone for your help and for getting me through this horrendous occasion. Man it sucked.