Various changes

Implementing smoothing