Updates on state machine and State factory