Added download as CSV functionality.