Adjusted smoothing and timing
Added clear function