Fix setting of baud rate

Removed forced 500000 baud rate, changed baud rate to be any integer value rather than switching on a small set.