First working implementation of sparking.