             if components.count > 1 {
                 issuer = components[0]
                 name = name.substringFromIndex(issuer.utf16count + 1).stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceCharacterSet())
-
             }
         }
 

            period = NSTimeInterval(periodInt)
        }

        let token = Token(type:type, secret:secretForToken, name:name, issuer:issuer, algorithm:algorithm, digits:digits, period:period)

        if let counterString = queryDictionary[kQueryCounterKey] {
            errno = 0

        if let issuerString = queryDictionary[kQueryIssuerKey] {
            issuer = issuerString
            // If the name is prefixed by the issuer string, trim the name
            let prefixRange = name.rangeOfString(issuer)
            if (prefixRange.startIndex == issuer.startIndex) && (name[prefixRange.endIndex] == ":") {
                name = name.substringFromIndex(issuer.utf16count + 1).stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceCharacterSet())
            }
        } else {
            // If there is no issuer string, try to extract one from the name
