Improved Savitzky-Golay smoothing and moving average filtering (using
convolution). Function to undo changes and a log stream.