also when it shuts off i can hear the fuses/relays clicking in the fuse box under the hood.
Which relay is clicking in the underhood fuse box? there should be no clicking when it dies. I know that when the IDM fuse is pulled, the relay will click non stop when the key is turned on. An IDM power supply issue perhaps? The way that you describe the failures can be many different issues, but I would be curious if you could run a buzz test when it acts up (dying and relay clicking). If you can, its likely not the IDM...
Stop just changing parts-- you've spent enough money on swaps to buy an Aeroforce scan gauge. You might get lucky with a parts change, but you will not be successful fixing these engines without OBD data. You could run buzz test, contribution, watch ICP during cranking, get codes, etc. Get this on your christmas list...