Creates state machine skeleton