Implement complement for StateMachine, improve complete by removing the well if unnecessary