Add rudimentary handling of alternate settings of USB interfaces - to fix problems with some USB storage devices. Some code readability improvements.