Expanded statemachine framework