Added switch statement to process bytes from UART