tidy up

remove redundant code for deleting images