Jump to last line on search and improve sorting