mod_aspire: Start refactoring DOM functions