Clean up of uart operations.