Implement memo adding and editing logic