Fixed memory leaks, crash, data file order on USB device

Some of the leaks I came across were caused by base classes not having a virtual destructor. Always using virtual destructors may be a good habit.

Since the data files on USB devices are not necessarily found in the order we want, we should sort them.