notes refactoring