Added delete functionality to both activities