First try at porting the RX functions.