supports nested model properties when building html
refactored templateToArray to produce more advanced domModel and buildHtml to consume it and loop over repeaters