Finished aggregation routine for metrics
view now working, but metrics need work