     }
     
     func save(gitHubClientSecret: String) throws {
-        let encodedGitHubClientSecret = gitHubClientSecret.data(using: String.Encoding.utf8)!
+        let encodedGitHubClientSecret = gitHubClientSecret.data(using: .utf8)!
         
         do {
-            try _ = readGitHubClientSecret()
-            
-            var attributesToUpdate = [String : AnyObject]()
-            attributesToUpdate[kSecValueData as String] = encodedGitHubClientSecret as AnyObject?
+            try readGitHubClientSecret()
+            
+            var attributesToUpdate = QueryDictionary()
+            attributesToUpdate[kSecValueData] = encodedGitHubClientSecret as AnyObject
             
             let query = KeychainConfiguration.GitHub.Gist.Account.clientSecret.query()
             let status = SecItemUpdate(query as CFDictionary, attributesToUpdate as CFDictionary)

                case clientId
                case clientSecret
                
                func query() -> [String:AnyObject] {
                    let query = KeychainConfiguration.keychainQuery(withService: KeychainConfiguration.GitHub.serviceName,
                                                             account: self.rawValue,
                                                             accessGroup: KeychainConfiguration.accessGroup)
                    return query
                }
            }
        }
        
        static func query() -> [String:AnyObject] {
            let query = KeychainConfiguration.keychainQuery(withService: KeychainConfiguration.GitHub.serviceName,
                                                     account: KeychainConfiguration.GitHub.account,
                                                     accessGroup: KeychainConfiguration.accessGroup)
            return query
        }
    }
    
    static func query() -> [String:AnyObject] {
        let query = KeychainConfiguration.keychainQuery(withService: KeychainConfiguration.serviceName,
                                                        account: KeychainConfiguration.account,
                                                        accessGroup: KeychainConfiguration.accessGroup)
        return query
    }
    
    private static func keychainQuery(withService service: String? = nil, account: String? = nil, accessGroup: String? = nil) -> [String : AnyObject] {
        var query = [String : AnyObject]()
        query[kSecClass as String] = kSecClassGenericPassword
        
        if let service = service {
            query[kSecAttrService as String] = service as AnyObject?
        }
        
        if let account = account {
            query[kSecAttrAccount as String] = account as AnyObject?
        }
        
        if let accessGroup = accessGroup {
            query[kSecAttrAccessGroup as String] = accessGroup as AnyObject?
        }
        
        return query

    }
    
    func save(gitHubClientId: String) throws {
        let encodedGitHubClientId = gitHubClientId.data(using: .utf8)!
        
        do {
            try readGitHubClientId()
            
            var attributesToUpdate = QueryDictionary()
            attributesToUpdate[kSecValueData] = encodedGitHubClientId as AnyObject
            
            let query = KeychainConfiguration.GitHub.Gist.Account.clientId.query()
            let status = SecItemUpdate(query as CFDictionary, attributesToUpdate as CFDictionary)
