Htmltools refactor