 
 // MARK: Parsing Helpers
 
-func parsed<P, T>(item: P?, with parser: (P -> T?), defaultTo def: T? = nil, preferDefault: Bool = false) -> T? {
+func parse<P, T>(item: P?, with parser: (P -> T?), defaultTo def: T? = nil, preferDefault: Bool = false) -> T? {
     if preferDefault {
         if let concreteDefault = def {
             return concreteDefault

    return nil
}

func factorParser(parsedCounter: UInt64?, parsedPeriod: NSTimeInterval?) -> (string: String) -> Generator.Factor? {
    return { string in
        if string == FactorCounterString {
            if let counter = parsedCounter {

        }
    }

    let factorParser = generateFactorParser(parse(queryDictionary[kQueryCounterKey], with: counterParser, defaultTo: 0), parse(queryDictionary[kQueryPeriodKey], with: periodParser, defaultTo: 30))
    if let factor = parse(url.host, with: factorParser, defaultTo: nil) {
        if let secret = parse(queryDictionary[kQuerySecretKey], with: { MF_Base32Codec.dataFromBase32String($0) }, defaultTo: externalSecret, preferDefault: true) {
            if let algorithm = parse(queryDictionary[kQueryAlgorithmKey], with: algorithmFromString, defaultTo: .SHA1) {
                if let digits = parse(queryDictionary[kQueryDigitsKey], with: { $0.toInt() }, defaultTo: 6) {
                    let core = Generator(factor: factor, secret: secret, algorithm: algorithm, digits: digits)

                    if core.isValid {
