Spike catalog test finds arbitrary number of spikes

Numerous bugs fixed