Add Averager class and related test case.
Add documentation.