Also, we should eventually change this to not invalidate the DOM quite so often. It's fine for now, however.