Added further tests in add_spikes.
Fixed bug in add_spikes.