Refactor AsContent Document converter