Moving the dynamic state_machine code to has_state concern