Extracted NoteService, implemented error handling workflow