Added a lot more functionality around the photo uploader