cleanup: rename sm_states to "sm" instead of "state".