Bug fix for deleted to-do items

- The fix deletes/removes reminders for to-do items that are being
deleted
- And some code cleanup