Intermittent spark

My first guess would be the ecu , they can go bad and act just like the problem you described