adding caching of templates to export rendering. Moved ERB createing into template helper class
Merge branch 'cache_templates'

Rebasing and merging pull request #124