minor syntax changes, add rules to templates generator