queue supports external machines (fixes piping)

refactored some of transition methods
added enums
non-negatitation state handlers support (*_state and *_end)
flat queue processing
event names fixes