We tried things

Corrected error from total percentage in each section
General code cleaning
Wrote total percentage function
Tried to include date and name into fout statement, but are unsure of
initialization protocol