 
     public func remoteControlEvent(event: UIEvent)
     {
-        if let delegate = self.delegate {
-            if (event.type == UIEventType.RemoteControl) {
-                switch event.subtype {
-                case UIEventSubtype.RemoteControlPlay:
-                    delegate.audioPlayer?(self, didReceiveRemoteControlPlayEvent: event.subtype)
-                case UIEventSubtype.RemoteControlPause:
-                    delegate.audioPlayer?(self, didReceiveRemoteControlPauseEvent: event.subtype)
-                case UIEventSubtype.RemoteControlPreviousTrack:
-                    delegate.audioPlayer?(self, didReceiveRemoteControlPreviousTrackEvent: event.subtype)
-                case UIEventSubtype.RemoteControlNextTrack:
-                    delegate.audioPlayer?(self, didReceiveRemoteControlNextTrackEvent: event.subtype)
-                case UIEventSubtype.RemoteControlBeginSeekingBackward:
-                    delegate.audioPlayer?(self, didReceiveRemoteControlBeginSeekingBackwardEvent: event.subtype)
-                case UIEventSubtype.RemoteControlEndSeekingBackward:
-                    delegate.audioPlayer?(self, didReceiveRemoteControlEndSeekingBackwardEvent: event.subtype)
-                case UIEventSubtype.RemoteControlBeginSeekingForward:
-                    delegate.audioPlayer?(self, didReceiveRemoteControlBeginSeekingForwardEvent: event.subtype)
-                case UIEventSubtype.RemoteControlEndSeekingForward:
-                    delegate.audioPlayer?(self, didReceiveRemoteControlEndSeekingForwardEvent: event.subtype)
-                default: break
-                }
+        if let delegate = self.delegate where event.type == UIEventType.RemoteControl {
+            switch event.subtype {
+            case UIEventSubtype.RemoteControlPlay:
+                delegate.audioPlayer?(self, didReceiveRemoteControlPlayEvent: event.subtype)
+            case UIEventSubtype.RemoteControlPause:
+                delegate.audioPlayer?(self, didReceiveRemoteControlPauseEvent: event.subtype)
+            case UIEventSubtype.RemoteControlPreviousTrack:
+                delegate.audioPlayer?(self, didReceiveRemoteControlPreviousTrackEvent: event.subtype)
+            case UIEventSubtype.RemoteControlNextTrack:
+                delegate.audioPlayer?(self, didReceiveRemoteControlNextTrackEvent: event.subtype)
+            case UIEventSubtype.RemoteControlBeginSeekingBackward:
+                delegate.audioPlayer?(self, didReceiveRemoteControlBeginSeekingBackwardEvent: event.subtype)
+            case UIEventSubtype.RemoteControlEndSeekingBackward:
+                delegate.audioPlayer?(self, didReceiveRemoteControlEndSeekingBackwardEvent: event.subtype)
+            case UIEventSubtype.RemoteControlBeginSeekingForward:
+                delegate.audioPlayer?(self, didReceiveRemoteControlBeginSeekingForwardEvent: event.subtype)
+            case UIEventSubtype.RemoteControlEndSeekingForward:
+                delegate.audioPlayer?(self, didReceiveRemoteControlEndSeekingForwardEvent: event.subtype)
+            default: break
             }
         }
     }

        if self.songsList == nil || self.songsList!.count == 0 {
            return false
        }
        else {
            return true
        }
    }

    // MARK: Commands

    public func playSong(index: Int, songsList: [AudioFile])
    {
        self.songsList = songsList
        if let dataSource = self.dataSource where dataSource.audioWillShuffleInAudioPlayer(self) {
            self.songsList?.shuffle()
        }
        // Prepare core audio
        prepareAudio(index)
