support for CodeFragmentRules as classes in templates (prototype)