Started the state machine and added appropriate structs