Split out HTML writer from HTML generator