Moved some auto_xml js into external file