Replaced Python function in template with ERB loop.
Merge pull request #3 from detly/simplify-template-2

Replaced Python function in template with ERB loop.