refactor NoteEditView, extract methods