Implemented passing context to template
Replaced GenerationContext with template arguments