Added Averaging feature and enhancements to calc.