   }
   
   public func event(_ event: EventType) {
-    if debugMode { NSLog("FSM Event: \(event)") }
+    if debugMode { NSLog("FSM(\(name ?? "?")) Event: \(event)") }
+    
     lastEvent = event
-    guard let aTransition = transitions.filter({ $0.event == event && $0.state == state }).first else {
-      if debugMode { NSLog("No transition for \(event)@\(state) in \(self.transitions)") }
+    
+    guard let transition = transitions.filter({ $0.event == event && $0.state == state }).first else {
+      if debugMode { NSLog("FSM(\(name ?? "?")) No transition for \(event)@\(state) in \(self.transitions)") }
       return
     }
     
-    guard let targetState = aTransition.target() else {
-      if debugMode { NSLog("No target state!") }
+    guard let targetState = transition.target() else {
+      if debugMode { NSLog("FSM(\(name ?? "?")) No target state! State unchanged: \(state)") }
       return
     }
     

    }
  }
  
  public var name: String = ""
  public var debugMode: Bool = false // Shows some NSLog when set to true
  private var definitions: [StateDefinition] = []
  private var transitions: [StateTransition] = []

  }
  
  public func setState(_ state: StateType) {
    if debugMode { NSLog("FSM(\(name ?? "?")) SetState \(state)") }
    
    let definition = definedState(state)!
    definition.state = state
    
