Add CSV generation and download.
Coding standards, and remove unneccessary template.