adding caching of templates to export rendering. Moved ERB creating int...

...o template helper class