First changes to handle deleting an image