         return nil
     }
     
-    private func resetConfig() {
-        UserDefaults.standard.set(nil, forKey: Const.UserDefaults.repo.rawValue)
-        UserDefaults.standard.set(nil, forKey: Const.UserDefaults.githubToken.rawValue)
-        UserDefaults.standard.set(nil, forKey: Const.UserDefaults.githubAPIUrl.rawValue)
-    }
-    
-    private func showCurrentConfig() {
-        let myPopup: NSAlert = NSAlert()
-        myPopup.messageText = "Current Config"
-        myPopup.informativeText = "Repo: \(self.repo)\nGithub API Url: \(self.githubAPIUrl)\nGithub Token: \(self.githubToken)"
-        myPopup.alertStyle = NSAlert.Style.warning
-        myPopup.addButton(withTitle: "OK")
-        myPopup.runModal()
+    @objc
+    func showConfig(sender: AnyObject) {
+        showConfigPrompt()
     }
     
     private func startingToSync() {

    @objc func sync(sender: AnyObject) {
        if isSyncing { return }
        
        self.startingToSync()
        let url = URL(string: "\(githubAPIUrl)/pulls")!
        let engine = SniPositoryCore(githubAPIPullUrl: url, githubToken: self.githubToken, snippetPath: self.snippetPath())
        DispatchQueue.global().async {
            engine.initGit(with: self.repo)
            engine.sync(with: self.environment, verbose: true)
            self.completedSyncing()
        }
    }
    
    @objc
    func showRepoConfig(sender: AnyObject) {
        if let repo = self.showConfig(with: "Enter repo:", and: "git@github.com:ivanfoong/xcode-swift-snippets.git") {
            self.repo = repo
        }
    }
    
    @objc
    func showGithubAPIUrlConfig(sender: AnyObject) {
        if let githubAPIUrl = self.showConfig(with: "Enter Github API Url:", and: "https://api.github.com/repos/ivanfoong/xcode-swift-snippets") {
            self.githubAPIUrl = githubAPIUrl
        }
    }
    
    @objc
    func showGithubTokenConfig(sender: AnyObject) {
        if let githubToken = self.showConfig(with: "Enter Github Token:", and: "Token") {
            self.githubToken = githubToken
        }
    }
    
    @objc
    func resetConfig(sender: AnyObject) {
        self.resetConfig()
    }
    
    @objc
    func showCurrentConfig(sender: AnyObject) {
        self.showCurrentConfig()
    }
    
    private func showConfig(with message: String, and placeholder: String) -> String? {

        // Insert code here to tear down your application
    }
    
    func showConfigPrompt() {
        let a = NSAlert()
        a.messageText = "Configs"
        a.addButton(withTitle: "Save")
        a.addButton(withTitle: "Cancel")
        
        let repoInputTextField = NSTextField(frame: NSRect(x: 0, y: 56, width: 300, height: 24))
        repoInputTextField.placeholderString = "git@github.com:ivanfoong/xcode-swift-snippets.git"
        repoInputTextField.stringValue = self.repo ?? ""
        let githubAPIUrlInputTextField = NSTextField(frame: NSRect(x: 0, y: 28, width: 300, height: 24))
        githubAPIUrlInputTextField.placeholderString = "http://github.com/api/v3/repos/ivanfoong/xcode-swift-snippets"
        githubAPIUrlInputTextField.stringValue = self.githubAPIUrl ?? ""
        let githubTokenInputTextField = NSTextField(frame: NSRect(x: 0, y: 0, width: 300, height: 24))
        githubTokenInputTextField.placeholderString = "<Github Personal API Token>"
        githubTokenInputTextField.stringValue = self.githubToken ?? ""
        
        let containerView = NSView(frame: NSRect(x: 0, y: 0, width: 300, height: 90))
        containerView.addSubview(repoInputTextField)
