 
   add_methods_to_object: (name, object) ->
     object[name] = self.state()
-    object[name+'_events'] = events.all()
+    object[name+'_events'] = events
     object[name+'_states'] = states
     
   add_event_methods: (name, object, event) ->

  self
  
Machine = (name, object, options, block) ->
  events = EventCollection()
  states = []
  callbacks =
    before: []

  
  self =  
    event: (name, block) ->
      event = events.push(Event(name, self))
      add_event_methods(name, object, event)
      if block then block(event)
      
