Convert to State Monad

Use simpler, monadic sendMessage to transmit