 import Foundation
 
 public class FSM<StateType: Equatable, EventType: Equatable> {
-
-  struct StateTransition: CustomStringConvertible {
+  
+  public struct StateTransition: CustomStringConvertible {
     var event: EventType
     var state: StateType
     var target: () -> StateType?
-
+    
     init(event: EventType, state: StateType, target: @escaping () -> StateType?) {
       self.event = event
       self.state = state
       self.target = target
     }
-
-    var description: String { return "\(event)@\(state)" }
+    
+    public var description: String { return "\(event)@\(state)" }
   }
-
+  
   public class StateDefinition {
     var state: StateType
     var onEnter: (() -> Void)?
     var onLeave: (() -> Void)?
     var onCycle: (() -> Void)?
-
+    
     init(_ state: StateType) {
       self.state = state
     }
   }
-
+  
   public var name: String = ""
   public var debugMode: Bool = false // Shows some NSLog when set to true
   private var definitions: [StateDefinition] = []
   private var transitions: [StateTransition] = []
-
+  
   private var stateDefinition: StateDefinition {
     didSet {
       previousState = oldValue.state

    setState(targetState)
  }
}

      if debugMode { NSLog("No transition for \(event)@\(state) in \(self.transitions)") }
      return
    }
    
    guard let targetState = aTransition.target() else {
      if debugMode { NSLog("No target state!") }
      return
