Started work on the new state machine