Moves viewer code into PDFViewer and some code from PageView.