Major change to statemachine

Added new drivers. Events are driven asynchroneously. OBS: there are
bugs in statemachine