Functionality to delete tasks