Moving individual viewer code out of Lightbox into Viewer.