Fix semantics of templates with no args
Simplify the syntax tree for definitions