     // MARK: Reading speed
 
     func setRate(rate: Int) {
-        if player != nil {
+        if let player = player {
             switch rate {
             case 0:
                 player.rate = 0.5

            readCurrentSentence()
        }
        
        UIApplication.sharedApplication().idleTimerDisabled = true
    }
    
    func isPlaying() -> Bool {

    func stop(immediate immediate: Bool = false) {
        playing = false
		if !isTextToSpeech {
            if let player = player where player.playing {
				player.stop()
			}
		} else {
            stopSynthesizer(immediate: immediate, completion: nil)
		}
        
//        UIApplication.sharedApplication().idleTimerDisabled = false
    }
    
    func stopSynthesizer(immediate immediate: Bool = false, completion: (() -> Void)? = nil) {
