Slight cleanup for avg and sd