         info[MPMediaItemPropertyAlbumTitle] = album ?? ""
         info[MPMediaItemPropertyArtist] = artist ?? ""
         if let artwork = artwork {
-            info[MPMediaItemPropertyArtwork] = MPMediaItemArtwork(boundsSize: artwork.size) { _ in artwork }
+            info[MPMediaItemPropertyArtwork] = MPMediaItemArtwork(boundsSize: artwork.size) { (size) in artwork }
         }
         update()
     }
 
-    func update() {
+    private func update() {
         info[MPMediaItemPropertyPlaybackDuration] = player?.duration ?? 0
         info[MPNowPlayingInfoPropertyElapsedPlaybackTime] = player?.currentTime ?? 0
         MPNowPlayingInfoCenter.default().nowPlayingInfo = info
     }
 
-    func callout() {
-        callback?(player)
-    }
-
-    private func registerControlEvents() {
+    private func handleControlEvents() {
         let center = MPRemoteCommandCenter.shared()
         center.pauseCommand.isEnabled = true
         center.playCommand.isEnabled = true

        center.likeCommand.isEnabled = false
        center.dislikeCommand.isEnabled = false
        center.bookmarkCommand.isEnabled = false
        commands.append(contentsOf: [
            center.pauseCommand.addTarget { [unowned self] _ in
                guard let player = self.player else { return .noActionableNowPlayingItem }
                player.pause()
                self.update()
                return .success
            },
            center.playCommand.addTarget { [unowned self] _ in
                guard let player = self.player else { return .noActionableNowPlayingItem }
                player.play()
                self.update()
                return .success
            }
        ])
    }

    private func deregisterControlEvents() {
        let center = MPRemoteCommandCenter.shared()
        center.playCommand.removeTarget(nil)
        center.pauseCommand.removeTarget(nil)
        commands.removeAll()
    }

    private func scheduleTimer() {

        timer = nil
    }

    func callout() {
        callback?(player)
    }

    func audioPlayerDidFinishPlaying(_ player: AVAudioPlayer, successfully flag: Bool) {
