Move state-machine into own package (yafsm)