Added new code

Flux smoothing, and subsequent use for variance generation.