Fix smoothing, still need to fix ends of the x axis