Move usb legacy handling to separate file