Refinement / reorganization of HTML renderer