Fix bugs where variable was shadowed.
Add functionality to delete UploadedImages.