Tidy up the document viewer