 
 private extension Permission {
     var statusEvents: PermissionStatus {
-        switch EKEventStore.authorizationStatusForEntityType(.Event) {
-        case .Authorized: return .Authorized
+        let status = EKEventStore.authorizationStatusForEntityType(.Event)
+        
+        switch status {
+        case .Authorized:          return .Authorized
         case .Restricted, .Denied: return .Denied
-        case .NotDetermined: return .NotDetermined
+        case .NotDetermined:       return .NotDetermined
         }
     }
     

    var statusLocationWhenInUse: PermissionStatus {
        guard CLLocationManager.locationServicesEnabled() else { return .Disabled }
        
        switch CLLocationManager.authorizationStatus() {
        case .AuthorizedWhenInUse, .AuthorizedAlways: return .Authorized
        case .Restricted, .Denied: return .Denied
        case .NotDetermined: return .NotDetermined
        }
    }
    

    /// The permission status.
    public var status: PermissionStatus {
        switch type {
        case .Contacts:          return statusContacts
        case .LocationAlways:    return statusLocationAlways
        case .LocationWhenInUse: return statusLocationWhenInUse
        case .Notifications:     return statusNotifications
        case .Microphone:        return statusMicrophone
        case .Camera:            return statusCamera
        case .Photos:            return statusPhotos
        case .Reminders:         return statusReminders
        case .Events:            return statusEvents
        }
    }
    
