Updating the USB code from a cleaner example.