Deglobalize default threshold value, and fix initialization of threshold variable

This global manifest constant was private, and only used within one function.

However the initialization code didn't actually use it anyway, since a self-assignment was made (maybe what was meant to be used was `threshold = .threshold`).