More refactoring for a standalone version of Closure HTML.