Consolidated to a simple but generic ftop StateMachine