Batching changes to the DOM