   
   private var registeredGlobalEvents = Set<String>()
   
-  public final func registerFor(name: GlobalEventName) {
-    registeredGlobalEvents.insert(name.rawValue)
-  }
-  
-  public final func unregisterFrom(name: GlobalEventName) {
-    registeredGlobalEvents.remove(name.rawValue)
-  }
-  
-  public final func isRegisteredFor(name: GlobalEventName) -> Bool {
-    return registeredGlobalEvents.contains(name.rawValue)
+  public final func registerFor(globalEvent: GlobalEventName) {
+    registeredGlobalEvents.insert(globalEvent.rawValue)
+  }
+  
+  public final func unregisterFrom(globalEvent: GlobalEventName) {
+    registeredGlobalEvents.remove(globalEvent.rawValue)
+  }
+  
+  public final func isRegisteredFor(globalEvent: GlobalEventName) -> Bool {
+    return registeredGlobalEvents.contains(globalEvent.rawValue)
   }
   
   public final func raise(
-    name: GlobalEventName,
+    globalEvent: GlobalEventName,
     withObject object: Any? = nil,
     userInfo: [String: Any] = [:]) {
-    let event = GlobalEvent(name: name, object: object, userInfo: userInfo)
+    let event = GlobalEvent(name: globalEvent, object: object, userInfo: userInfo)
     session.propagate(event)
   }
   


  private var registeredBubbles = Set<String>()
  
  public final func registerFor<T where T: BubbleNotificationName>(name: T) {
    registeredBubbles.insert(T.domain + "." + name.rawValue)
  }
  
  public final func unregisterFrom<T where T: BubbleNotificationName>(name: T) {
    registeredBubbles.remove(T.domain + "." + name.rawValue)
  }
  
  public final func isRegisteredFor<T where T: BubbleNotificationName>(name: T) -> Bool {
    return registeredBubbles.contains(T.domain + "." + name.rawValue)
  }
  
  public func raise<T where T: BubbleNotificationName>(name: T, withObject object: Any? = nil, sender: Model) {
    if isRegisteredFor(name) {
      handle(BubbleNotification(name: name, object: object), sender: sender)
    } else {
      parent?.raise(name, withObject: object, sender: sender)
    }
  }
  
  public func handle(bubble: BubbleNotification, sender: Model) {}
  
  //Errors
  
  //TODO: extensions
  private var registeredErrors = [String: Set<Int>]()
  
  public final func registerFor<T where T: ErrorCode>(code: T) {
    var allCodes = registeredErrors[T.domain] ?? []
    allCodes.insert(code.rawValue)
    registeredErrors[T.domain] = allCodes
  }
  
  public final func registerForErrorCodes<T where T: ErrorCode>(codes: [T]) {
    var allCodes = registeredErrors[T.domain] ?? []
    let mappedCodes = codes.map { $0.rawValue }
    mappedCodes.forEach { allCodes.insert($0) }
    registeredErrors[T.domain] = allCodes
  }
  
  public final func unregisterFrom<T where T: ErrorCode>(code code: T) {
    if let codes = registeredErrors[T.domain] {
      var filteredCodes = codes
      filteredCodes.remove(code.rawValue)
      registeredErrors[T.domain] = filteredCodes
    }
  }
  


  }
  
}