Recently purchased 1998 Yukon with 5.7 vortec. I've had a few before that had the p0300 and it always turned out to be the weak distributor gear but on those they just died and wouldn't run. Current truck will run fine and then misfire a little, then run fine and then misfire. It will throw p0300 when running bad but will clear itself without deleting it with scanner when the engine is idling fine. Also when running rough the headlights and gauges tend to flicker with the engine. Tried plug and wires, cap and rotor has very little corrosion seems to be newer, new pcv valve and cleaned egr. Seems to be electrical or maybe a sensor like maf ?recent mods were shorty headers, crappy cold air intake, and throttle body spacer. Could any of those be messing with the idle and any sensors? Any input would be appreciated.