Added Editing notes functionality and added error handling to deleteNote.