Remove references to statemachine