Refactored ImageViewer