Download CSV stats

Added ability to download the stats as a CSV. Please merge into develop branch