Refactor document sections.