Renamed and moved the serial port functions.