Re-factored script to get ALL summary data in a single loop... this is much more efficient.