Added CSV export function to tools.