Tidy filtfilt code