Added test cases and fixed a bug in note delete().