Added support for template to render cells