refactoring note creation/editing