Create state machine with initial state