rewrote HtmlWriter as struct with Write method; 38/102 tests succeed