Completed functionality for editing notes.