ImageViewer,ImageGalleryModel, Revised image code