Centralised rx/tx functionality into single script.