Refactoring of processPendingNotes()