NoteService.cs refactoring