- Do some refactoring of the "fetchNotes" code.

Change-Id: Ifca89b055e46f942d570a6b6c72d733945ccde66