Refactor the default rendering for sections to use replaceElementsBetween()