Improvement on HTMLVisitor, still imperfect on context