Added gen_fsm structure