ENH: changes into the structure of the code for smoothing
and adding downsmapling