Updated transmit code after testing. Still needs work to be  perfect, but should work fine for most things.