Some corrections in the search function, now generating probably valid tracks (or almost)