Add sorting for notes and notebooks.