Updated mergeTemplates to low-rank representation of waveforms
Updated fit() and pruneWaveforms()