Move document conversion into document-to-html module