feat(Template) Add logic expressions
refactor(Template) Remove special logic for subviews
feat(Template)  Add reasonable scope handling