Get rid from closures in open_element_stack.js. End tag handling for foreign content. More adoption agency steps.