 private let QMQueriesKey  = DefaultsKey<[AnyObject]?>("QMQueriesKey")
 private let QMSelectedKey = DefaultsKey<Int>("QMSelectedKey")
 
-// TODO: Male/Female, age ranges (as profile queries).
-private let defaultQueries : Queries = [
-    ("Weight <50",     Query.ConjunctiveQuery(nil, nil, nil,
-        [MCQueryPredicate(.AggAvg, (HKObjectType.quantityTypeForIdentifier(HKQuantityTypeIdentifierBodyMass)!, nil), nil, "50")])),
-
-    ("Weight 50-100",  Query.ConjunctiveQuery(nil, nil, nil,
-        [MCQueryPredicate(.AggAvg, (HKObjectType.quantityTypeForIdentifier(HKQuantityTypeIdentifierBodyMass)!, nil), "50", "100")])),
-
-    ("Weight 100-150", Query.ConjunctiveQuery(nil, nil, nil,
-        [MCQueryPredicate(.AggAvg, (HKObjectType.quantityTypeForIdentifier(HKQuantityTypeIdentifierBodyMass)!, nil), "100", "150")])),
-
-    ("Weight 150-200", Query.ConjunctiveQuery(nil, nil, nil,
-        [MCQueryPredicate(.AggAvg, (HKObjectType.quantityTypeForIdentifier(HKQuantityTypeIdentifierBodyMass)!, nil), "150", "200")])),
-
-    ("Weight >200",    Query.ConjunctiveQuery(nil, nil, nil,
-        [MCQueryPredicate(.AggAvg, (HKObjectType.quantityTypeForIdentifier(HKQuantityTypeIdentifierBodyMass)!, nil), "200", nil)]))
-]
-
 /**
  This class manages queries to enable more meaningful comparisons against population data.  For example, to limit the population column on the first page or the densities shown on the radar plot to individuals within a particular weight range or to a particular gender, this query filter would be used.
 

public class QueryManager {
    public static let sharedManager = QueryManager()

    var queries: Queries = defaultQueries
    var querySelected : Int = -1

    init() { load() }

    func load() {
        let qs = Defaults[QMQueriesKey] as? [[String:AnyObject]] ?? []
        let dsQueries = deserializeQueries(qs)
        queries = dsQueries.isEmpty ? [] : dsQueries
        querySelected = dsQueries.isEmpty ? -1 : Defaults[QMSelectedKey]
    }

