Rewrote transmit fsm to simplify