Finalized Averaging

Still needs testing