Add sort by priority
Fix note sort order asc being broken