Refactor delete_note and delete_link to tracker