Html5Templates refactoring (more functional)