Functionized the process to sort items and it changed to be called just before displaying saved items