Someone on here has links to FSM of your year and that will have a wiring diagram.
I know on my 98 4.0 the CPS on the bellhousing and flywheel controlled fueling not spark. The cam position sensor took care of the spark.
You may want a new coil, cam pos sensor and check the wiring that your buddy horsed with. Also check the crank pos sensor on the bell housing and make sure it is working and plugged in.