Minor cleanup of the image uploader code.