edit_link and delete_link helper refactor