         case .Code: handleURLForCodeResponseType(URL, completion: completion)
         }
     }
-    
-    private func visit(URL URL: NSURL) {
+}
+
+// MARK: - Visit URL
+
+private extension Provider {
+    func visit(URL URL: NSURL) {
         if #available(iOS 9.0, *) {
             safariVC = SFSafariViewController(URL: URL, delegate: self)
             Application.presentViewController(safariVC)

        requestToken(.AuthorizationCode(code), completion: completion)
    }
    
    internal func requestToken(grantType: GrantType, completion: Result<Token, Error> -> Void) {
        var params = [
            "client_id": clientID,
            "client_secret": clientSecret,

        
        Queue.main { completion(result) }
    }
    
    func handleURLForCodeResponseType(URL: NSURL, completion: Result<Token, Error> -> Void) {
        guard let code = URL.queries["code"] else {
            let error = Error(URL.queries)
