                     options.to,
                     options.if,
                     options.unless,
-                    hook)  # options.action
+                    (hook or options.action))
 
     transition_builder.all = (options= {}, hook= undefined) ->
-        if current_event?  # inside event definition?
+        if current_event?
             trans_alls = current_all_state_transitions()
             trans_alls.push create_all_state_trans_def(
                 options.to,

        obj = options.extend ? {}


    # state helper function
    #
    all_states = {}
    state_hooks = {}


        call_state_hooks nextState, "enter" if (oldState is false or nextState isnt oldState) and parents.old.indexOf(nextState) is -1


    # ========================================
    # EVENT helper function
    # ========================================

    current_event = null

    check_transition_callbacks = (trans) ->
