Fixed a bug in smoothing

Rather than the first element in the window, the previous
element was being removed

y_axis_sum was not being set ('-' instead of '=')