     
     var detailItem: AnyObject? {
         didSet {
-            self.configureView()
+            configureView()
         }
     }
     
     func configureView() {
-        if let detail: AnyObject = self.detailItem {
-            self.navigationItem.title = detail.description
+        if let detail: AnyObject = detailItem {
+            navigationItem.title = detail.description
         }
     }
     
     override func viewDidLoad() {
         super.viewDidLoad()
-        self.configureView()
+        configureView()
         UIApplication.sharedApplication().beginReceivingRemoteControlEvents()
-        self.becomeFirstResponder()
+        becomeFirstResponder()
 
         // Configure audio session
         let sess = AVAudioSession.sharedInstance()
+        sess.addObserver(self,
+            forKeyPath: "outputVolume",
+            options: NSKeyValueObservingOptions.allZeros,
+            context: nil)
         sess.setCategory(AVAudioSessionCategoryPlayback, withOptions: nil, error: nil)
         sess.setActive(true, withOptions: nil, error: nil)
         

        }
        alertController.addAction(OKAction)
        
        self.presentViewController(alertController, animated: true, completion: nil)
    }
    
    @IBAction func pausePlayback(sender: AnyObject) {

        // This is required to get remote control events…
        let path = NSBundle.mainBundle().pathForResource("silence", ofType: "m4a")!
        let fileURL = NSURL(fileURLWithPath: path)
        player = AVAudioPlayer(contentsOfURL: fileURL, error: nil)
        // Play forever, at a very low volume
        player.numberOfLoops = -1
        player.volume = currentVolume
        player.play()
        
        let mpic = MPNowPlayingInfoCenter.defaultCenter()
        mpic.nowPlayingInfo = [
            MPMediaItemPropertyTitle: currentMovieName,
            MPMediaItemPropertyArtist: "Raspberry Pi"
        ]
    }
    
    override func viewDidDisappear(animated: Bool) {
        super.viewDidDisappear(animated)
        AVAudioSession.sharedInstance().removeObserver(self, forKeyPath: "outputVolume")
    }
    
    override func observeValueForKeyPath(keyPath: String,
        ofObject object: AnyObject,
        change: [NSObject : AnyObject],
        context: UnsafeMutablePointer<Void>) {
            let newVolume = (object.valueForKey("outputVolume") as! NSNumber).floatValue
            if newVolume > currentVolume {
                APIConnector.sharedInstance.sendCommand(.VolumeUp)
            }
            else {
                APIConnector.sharedInstance.sendCommand(.VolumeDown)
            }
            currentVolume = newVolume
            println("New volume: \(currentVolume)")
    }
    
    override func canBecomeFirstResponder() -> Bool {
