PLEASE REVIEW - previews: refactoring

I don't necessarily need these changes pushed to pu, but I'd like to know if you would do things differently; the changes were made in order to fit the PDF previewer.