Refactor Sort
Fix Sort when notes have no position property