Bug fix: out-of-range indices in residuals()
Started implementing Kalman filter on mean waveforms