Get tests passing. Add todo to fix race condition if an element is removed immediated after adding to the DOM.