usb code cleanup