Remove task fsm and use stateless fsm.