       fatalError("unhandled error: \(error)")
     }
   }
-
-  func onEvent(observer: AXSwift.Observer, event: AXSwift.Notification) {
-    print("\(axElement): \(event)")
-    switch event {
-    case .Moved:
-      updateAttribute(.Pos, .Position, &pos_)
-    case .Resized:
-      updateAttribute(.Size, .Size, &size_)
-    default:
-      print("Unknown event on \(self): \(event)")
-    }
-  }
-
-  private var pos_: CGPoint!
-  var pos: CGPoint {
-    get { return pos_ }
-    set { setAttribute(.Pos, .Position, &pos_, newValue) }
-  }
-
-  private var size_: CGSize!
-  var size: CGSize {
-    get { return size_ }
-    set { setAttribute(.Size, .Size, &size_, newValue) }
-  }
 }

    self.axElement = axElement
    try loadAttributes()

    do {
      try observer.addNotification(.UIElementDestroyed, forElement: axElement)
      try observer.addNotification(.Moved, forElement: axElement)
      try observer.addNotification(.Resized, forElement: axElement)
    } catch let error {
      NSLog("Error: Could not watch [\(axElement)]: \(error)")
    }
  }

  private func loadAttributes() throws {

    }
  }

  // Sets the given property and axElement attribute to the given value (events marked as internal).
  private func setProperty<T: Equatable>(prop: WindowProperty, _ axAttr: AXSwift.Attribute, inout _ store: T!, _ newVal: T) {
    // TODO: check value asynchronously(?), deal with failure modes (set fails, get fails)
    // TODO: purge all events for this attribute? otherwise a notification could come through with an old value.
    do {
