refactor home adn templates
refactor improve fix