Change state machine to go goto driven.