Removed zero values from averages calculation
Removing test data
Re-enabled writing to file code
Added dynamic orientation to CSV