Refactor Sort Search Notes