added documentation about state machine events

added a new page to the state machine documentation about its events
and some other updates