Setting `textContent` instead of creating text nodes by hand will be simpler, throughout.