Refactor to allow threshold option (threshold.domain, threshold.tld)