removeNodes = (container, start, end = null) => {
    while (start !== end) {
        const n = start.nextSibling;
        container.removeChild(start);
        start = n;
    }
}
Removes nodes, starting from `start` (inclusive) to `end` (exclusive), from
`container`.