Refactor "document from template" view

:construction: