changed sorting algorithm to handle shape correctly
a first attempt to support import of tracks that reside in multiple files (that may have different shape)