Better smoothing and cleanup