html templates refactored