Working export and basic printable (view)

Doesn’t call Printable since Printable is still broken. Appears to be
just a matter of fixing the document request, but we should probably
update it to use either Angular or React.

Also included a couple of nice programatic enhancements to simplify the
code a bit.