Removed noisy type signatures from local functions in definition of mean.