Added serial port handling.