Blend thresholds

Mostly adaptation to local filepaths, but also some generalization by moving variables out of the logic section.