Fixed some pretty terrible bugs

-Fixed issue where simGeneration would not be able to perform tail-call
optimization, which was resulting in stack overflows
-Fixed bug where the arrays that store the averages weren't persistent
and were giving useless data.