Improved smoothing functionality.

better control over the checks (i.e. smooth check is disabled if average is disabled).