Add new note and some refactoring