Added functionality to delete images