Clean up pie report
Clean up pie report

Using a more functional style makes the code easier to read and also
made determinism easier to deal with.  The trick was slurping all
input lines into memory and then operating over them purely.
Separating IO from computation seems to help a lot.

mndrix/clk