Many changes for uploading and viewing images