Improve search table with priority and sorting