         
     }
     
-    public func snoozeMinutes(minutes : Int) {
+    public func snooze(forMiutes minutes : Int) {
         
         AlarmRule.snooze(minutes)
         

    }
    
    public func playAlarmFor(url: NSURL, urgent: Bool = false) {
        let assetName = urgent ? "alarm2" : "alarm"
        let audioUrl = url.URLByAppendingPathComponent("/audio/\(assetName).mp3")
        
        var downloadTask:NSURLSessionDownloadTask
        downloadTask = NSURLSession.sharedSession().downloadTaskWithURL(audioUrl, completionHandler: { (URL, response, error) -> Void in
            
            do {
                self.audioPlayer = try AVAudioPlayer(contentsOfURL: URL!)
                self.play()
            } catch let error as NSError {
                print(error.localizedDescription)
            } catch {
                print("AVAudioPlayer init failed")
            }
        })
        
        downloadTask.resume()
    }
    
    public func updateSnoozeButtonText() {
        // var snoozeText: String = "Snooze"
        if AlarmRule.isSnoozed() {
            snoozeText = "Snoozed for " + String(AlarmRule.getRemainingSnoozeMinutes()) + "min"
            print(snoozeText)
        }
    }

    
    public func play() {
        do {
            //try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback)
            try AVAudioSession.sharedInstance().setActive(true)
            
            // Play endless loops
