Added documentation to normalMean function
Simplified the algorithm