Refactored NoteService to use the latest triplestore helper methods.