[Azoth Sarin] Moved transmission preparation into a separate function.