         navigationController.preferredContentSize = CGSize(width: 300, height: 300)
         navigationController.modalPresentationStyle = .popover
         navigationController.popoverPresentationController!.delegate = self
-        self.present(navigationController, animated: true, completion: nil)
+        present(navigationController, animated: true, completion: nil)
     }
-
 }
 
 // MARK: - UIPopoverPresentationControllerDelegate
 
 extension ViewController: UIPopoverPresentationControllerDelegate {
-
     func adaptivePresentationStyle(for controller: UIPresentationController) -> UIModalPresentationStyle {
         return .none
     }

// MARK: - InputDeviceDelegate

extension ViewController: InputDeviceDelegate {

    func didSelectInputDevice(_ device: AKDevice) {
        do {
            try mic.setDevice(device)

    override func viewDidLoad() {
        super.viewDidLoad()

        // Kludge to align sample rates of the graph with the current input sample rate
        AKSettings.sampleRate = AKManager.engine.inputNode.inputFormat(forBus: 0).sampleRate

        AKSettings.audioInputEnabled = true
        mic = AKMicrophone()
        tracker = AKFrequencyTracker(mic)
